Apache

check_access_log.pl

Description:

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

Current Version

0.1

Last Release Date

2010-12-03

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x

License

GPL


Project Files
Project Notes
Reviews (3) Add a Review
Error when having not 5xx our 4xx error in log
by belgotux, February 28, 2015

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



Great
by Polarix, April 30, 2012

Is necessary install "File::ReadBackwards" and "Date::Manip" by cpan.



It does what it states
by 5Ub-Z3r0, April 30, 2012

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



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.5 (4)
Favorites
0
Views
99,509