Home Directory Plugins Web Servers Apache check_access_log.pl

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_access_log.pl

Current Version
0.1
Last Release Date
2010-12-03
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
License
GPL
Hits
99460
Files:
FileDescription
check_access_log.plcheck_access_log.pl
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!
Parses the last 5 minutes (-m option) of your httpd access log and goes to warning or critical if the number of 200 OK is below your threshold. Use with pnp4nagios and templates on my sites for some lovely graphs of your status breakdown over time.

Requires: nrpe, Nagios::Plugin, File::ReadBackwards, Date::Manip
Reviews (3)
When you haven't any error in your apache log file, you've got this error :
Use of uninitialized value in addition (+) at ./check_access_log.pl line 152.
Use of uninitialized value in addition (+) at ./check_access_log.pl line 152.
Illegal division by zero at ./check_access_log.pl line 152.


You can fix it with this diff :
diff /tmp/check_access_log.pl.ori /tmp/check_access_log.pl
152,153c152,156
if ( defined $status_score{'20X'} || defined $status_score{'30X'} ) {
> $failure_rate=
> sprintf("%0.2f", 100 - (($status_score{'20X'} + $status_score{'30X'})/$lines) * 100.0);
> }

You also need that nagios can access to apache access file
byPolarix, April 27, 2012
Is necessary install "File::ReadBackwards" and "Date::Manip" by cpan.
by5Ub-Z3r0, April 20, 2012
1 of 1 people found this review helpful
Excellent plugin, it does exactly what it states.

It comes also with a pnp4nagios template, available here:
http://blog.pburkholder.com/wp-content/uploads/2011/01/check_access_log.php_.txt