Home Directory Plugins Log Files check_logfiles

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_logfiles

Current Version
3.0.4
Last Release Date
2009-09-20
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
Owner
Hits
219556
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
check_logfiles is used to scan the lines of a file for regular expressions.
The plugin check_logfiles was designed to operate in mission critical environments where missing log lines after a logfile rotation could not be tolerated. When such a logfile rotation takes place, check_logfiles detects this and analyses the lines of the archived logfile, even if it's compressed.
It normally scans only the lines of a logfile which were added since the last run of the plugin.
The main features are:
- multiple regular expressions can be given
- expressions can be categorized as warning or critical
- it can handle any logfile rotation strategy
- hook scripts (either external scripts or a piece of perl-code in the configuration file) are possible, taking actions when a line matches a pattern. (for example, whenever a critical pattern is found, a nsca message is sent to the nagios server)
- it is written in Perl, but also distributed as a Windows .exe

Reviews (8)
An extremely useful option. I used the acknowledgment link, which generates a syslog entry, to clear the alarm..
defined the string okpatterns
bychetansoftware, December 16, 2016
This plugin is really nice.
I would like to create rpm package of this plugin. Anybody has .SPEC file or rpm package of this plugin please?
Hello,

The plugin works as expected and is really great & useful! amazing job.
I really liked the --sticky flag which givs you great flexibility.

One question, does this script cleanup the tmp files it generates under /tmp $seekfilesdir or $protocolsdir?

Thanks,
David
bymcart, July 9, 2015
1 of 1 people found this review helpful
it really works, just spend a little time studying the documentation
bysambaba, September 5, 2014
1 of 2 people found this review helpful
The command runs successfully only 1 time. The second time we run the command it doesn't show
any errors or warnings as in principle check_logfiles scans a log file until the end-of-file is reached. The offset will then be saved in a so-called seekfile. The next time check_logfiles runs this offset will be used as the starting position inside the log file.

I found this to be a bug as I believe until the log file gets updated or appended, the alert shouldn't disappear. But in reality it only sends an alert once and the next time it shows "OK - no errors".
Very robust code. We were not able to make it reliably work with Nagios notifications or I would rate it higher.

Liked it though and we're using it with cron and a wrapper script to send alerts.
bydavidparks21, October 31, 2011
1 of 1 people found this review helpful
Wow, this plugin clearly has a huge amount of development effort behind it. Very polished and "Just works". Many thanks for the tremendous effort and saving thousands of us uncounted hours.
bybox2, August 13, 2010
3 of 3 people found this review helpful
This plugin is very adaptable across platforms and the configuration file is written with perl which makes it very strong to customize anything you need. Best logfile plugin I've tried by far.