Graphing Access Log Status with PNP4Nagios, part two 16
The graphs I showed in part one are generated by performance output from a Perl script, check_access_log.pl (attached to this post). The performance data are then captured by pnp4nagios and saved into an RRD file. The default graphing templates provided with pnp4nagios v0.4 didn’t do justice to how interest these data are, so I wrote my own template (to be attached to a future post).
The usage for check_access_log.pl is:
Usage: check_log3.pl [ -v|--verbose ] -l|--logfile=file -m|--m=minutes [ -c|--critical=<threshold>(20) ] [ -w|--warning=<threshold>(10) ] [ -a|--activity=number_of_lines (100) ]
logfileis the path to your httpd access logminutesis how far back from the present you want to parse your log file (5 minutes by default)-c|-wrepresent the percentage of non-200 statuses are considered problematic--activity: only go to warning/critical if activity exceeds this number of lines per check. This prevent the check from going to warning/critical if you’ve taken it out of service.
- File::ReadBackwards; # allows the script to read backwards until the time period criterion is met
- Date::Manip;
- Nagios::Plugin;
Generally, the live httpd access logs will not be on your Nagios server so you’ll need to invoke this over NRPE.
Comments
-
Thanks for sharing this cod
-
I truly appreciate you taking the time to post this. I really liked reading it and am looking forward to more posts from you! Keep 'em coming
-
If something doesn't work, then create your own. That's a motto I live by and it forces me to be very creative. Your solution to your problem seems sound and concrete. When you can figure things out on your own, you empower yourself in ways that nothing else can.
-
Thanks for this great post. Did you do it all on your own? This must've taken a lot of time
-
Thanks for this great post. Did you do it all on your own? This must've taken a lot of time
-
Very nice post! I recommend this blog a really good one.
-
I really love your weblog, Its great to find not absolutely everyone is just posting a ton of rubbish these days! cheapjordans
-
I am not sure where you are getting your information, but great topic
-
This is the perfect blog for anyone who wants to know about this topic. You know so much its almost hard to argue with you (not that I really would want…HaHa). You definitely put a new spin on a subject thats been written about for years. Great stuff, just great!
-
Stuff like these desurves a twit and maybe a bookmark,your content is very good and i thank you for that
-
Blog posts about wedding and bridal are always rare to find , at least with great quality,you qualify for a great blog post writer title,kep the great job happening
-
Corporations are challenging existing business models as they seek ways to speed innovation, focus on their core competencies, and scale to capitalize on opportunities and outpace competitors.
-
it needs a bokmark so i can come back to it later ,nice stuff
-
The one thing exciting about a destination wedding is, you can experiment a lot with your destination wedding dresses. Getting married on a beach is like a dream come true and your destination beach wedding dresses should be in sync with the soothing ambiance endowed upon by the sun, sand and the sea.
-
The bride usually wears white, off-white, silver, or other very light-colored modern style wedding dresses, particularly at her first marriage. But if it comes to the bridal reception dresses, color is not limited.
-
Hi Peter, I noticed you said you would be attaching the pnp4nagios template to a future blog entry, but the latest one is from 2010. Is there an chance you could write a quick entry on it and attach the template? Or, if that's an issue, could you please shoot it to me over email? Thanks, -Todd Groten