Pages

Tuesday, August 23, 2016

Nagios Plugin Apache - "check_apachestatus_auto.pl"

1. DESCRIPTION

- Plugin Name :-  check_apachestatus_auto.pl
- Plugin Purpose :- To check for performance related parameters for Apache Server

2. PRE-REQUISITS

- Perl modules needed are strict;  Getopt::Long;  LWP::UserAgent;  Time::HiRes qw(gettimeofday tv_interval);  Digest::MD5 qw(md5 md5_hex);
- Nagios plugins repository
- Mod_status enabled on Remote Apache Server.

3. PLUGIN DETAILS

- Plugin is written in Perl
- Plugin simply checks for performance parameter details and provides a summary of it for apache server
- Based on configured threshold for the specifed parameter alert is thrown

4. INPUT

- IP address of Cassandra Database or Hostname of Cassandra Database (Note:- Hostname is getting resolved from Nagios Server)

5. OUTPUT

Possible outputs are as below,
- “UNKNOWN 500 Can't connect to XX.XXX.XX.XXX:80 (Bad hostname 'XX.XXX.XX.XXX')”
Whenever plugin execution is not able to reach the specified apache host XX.XXX.XX.XXX

- “APACHE OK - 0.018 sec. response time, Busy/Idle 1/10, open 245/256, ReqPerSec 1.2, BytesPerReq 17612, BytesPerSec 22016|Idle=10 Busy=1 OpenSlots=245 Slots=256 Starting=0 Reading=0 Sending=1 Keepalive=0 DNS=0 Closing=0 Logging=0 Finishing=0 ReqPerSec=1.250000 BytesPerReq=17612 BytesPerSec=22016.000000 Accesses=5”
Successful execution of plugin gives above summary information about remote apache server.

6. EXAMPLE

/usr/lib64/nagios/plugins/check_apachestatus_auto.pl -H [ IP Address/Hostname ] -w [ Warning Threshold ] -c [ Critical Threshold ]

7. Plugin can be downloaded from Link


No comments:

Post a Comment