Nagios
Plugins
A Nagios plugin that parses the status page of an apache server, the plugin returns the response time, the amount of idle, busy, open and total slots. The perfdata returns the status of all slots including Requests/sec, Bytes/Request and Bytes/sec. Optionally you can specify how much slots should be available. Use http(s) and basic user authentication with non standard server-status urls. This is an enhanced version of an enhanced version of Lieven De Bodt’s check_apachestatus.pl.
Why an extra plugin?
First it uses the ?auto parameter instead of parsing the human readable status output – this reduces possible parsing errors. Then it uses a different syntax of the url parameter. And notably most of all it recalculates the Request/sec and the other values by itself instead of using the given apache server-status values.
Why recalculating the Request/sec vaules?
The Requests/sec and the other values given by the apache server status are calculated by the overall accesses since the uptime of the server, thus reflecting the average values since the server start. Normally a server has a very long uptime and so any access peaks aren’t noted by the given average values. The plugin compares the actual uptime and the access values every time it is called by the previous stored values (/tmp/ folder, change the appropriate value in the script if you need another path) . This returns more precise and actual data.
Examples:
./check_apachestatus_atuo.pl -H www.myhost.com ./check_apachestatus_auto.pl -H www.myhost.com -w 20 -c 5 ./check_apachestatus_auto.pl -H www.myhost.com -U username -P password ./check_apachestatus_auto.pl -H www.myhost.com -u /administration/apache2 ./check..auto.pl -H ahost.com -u http://admin.bhost.com/ap/server-status?auto
./check_apachestatus_auto.pl -h
Apache Monitor for Nagios version 1.2
GPL licence, (c)2009 Dennis D. Spreen
Usage: ./check_apachestatus_auto.pl -H [-p
] [-t ] [-w -c ] [-V] [-u ] [-U user -P pass -r realm]
-h, --help
print this help message
-H, --hostname=HOST
name or IP address of host to check
-p, --port=PORT
Http port
-u, --url=URL
Specific URL to use, instead of the default http://hostname/server-status
-U, --user=user
Username for basic auth
-P, --pass=PASS
Password for basic auth
-r, --realm=REALM
Realm for basic auth
-X, --proxy=PROXY
Proxy-URL for http and https (mandatory)
-t, --timeout=INTEGER
timeout in seconds (Default: 15)
-w, --warn=MIN
number of available slots that will cause a warning
-1 for no warning
-c, --critical=MIN
number of available slots that will cause an error
-V, --version
prints version number
Note :
The script will return
* Without warn and critical options:
OK if we are able to connect to the apache server's status page,
CRITICAL if we aren't able to connect to the apache server's status page
* With warn and critical options:
OK if we are able to connect to the apache server's status page
and #available slots > ,
WARNING if we are able to connect to the apache server's status page
and #available slots <= ,
CRITICAL if we are able to connect to the apache server's status page
and #available slots <= ,
UNKNOWN if we aren't able to connect to the apache server's status page
-----------------------------------------------------------------------
nagios_mdaemon_stats.exe (win32 NRPE)
A Nagios NRPE plugin that parses the status page of a MDaemon server, the plugin returns the SMTP, POP, Spam, virus, SPF, DK cache, IP cache, LDAP cache and tarpit statistics of the MDaemon mail server.
MDaemon Statistics Plugin for Nagios v1.0 Win32 (c)2009 Dennis D. Spreen Usage nagios_mdaemon_stats.exe [-h] [-V] [-d delay] [-r retry] [-p path] [-v] -h, --help print this help message -V, --version print version number -d, --delay=delayInMs retry delay (ms) for opening mdaemon dat files (Default: 500) -r, --retry=retrycount retry count for opening MDaemon dat files (Default: 3) -p, --path=directorypath MDaemon dat file directory (Default: use path from Registry key) -v, --verbose Add additional output information (does not affect PerfData) Use -v -v to output all PerfData information on screen as well -----------------------------------------------------------------------
nagios_mdaemon_check.exe (win32 NRPE)
A Nagios NRPE plugin that checks the active connections to and from a MDaemon server,
the plugin checks and returns the SMTP, POP, IMAP, WorldClient and Webadmin connections.
WorldClient and Webadmin connection detection is limited because of the stateless
connections to the server.
Example 1:
nagios_mdaemon_check.exe -w 30 -c 50
Warns if total connections exceed 30 and returns critical if >=50
Example 2:
nagios_mdaemon_check.exe -w 30 -c 50 -wSMTPout 20 -cSMTPin 30
Warms if total connections exceed 30 or SMTPout connections are greater or equal than 20
and returns critical if total connections are greater or equal to 50 or SMPTin connections
are greater or equal than 30.
MDaemon Check Plugin for Nagios v1.0/Win32
(c)2009 Dennis D. Spreen (dennis@spreendigital.de)
Usage nagios_mdaemon_check.exe -w -c [-wX] [-cX] [-h] [-V] [-d delay] [-r retry] [-p path] [-v]
-w, --warn=x
warn if total connections >= x
-c, --crit=x
critical if total connections >= x
-wX, --warnX, -cX, --critX=x
warn or critical if specified connections >= x
replace X with
SMTPin, SMTPout, SMTPSSL, SMTPTotal, POPin, POPout, POPSSL, POPTotal,
IMAPin, IMAPSSL, IMAPTotal, WCin, WCSSL, WCTotal, WAin, WASSL, WATotal
-h, --help
print this help message
-V, --version
print version number
-d, --delay=delayInMs
retry delay (ms) for opening mdaemon dat files (Default: 500)
-r, --retry=retrycount
retry count for opening MDaemon dat files (Default: 3)
-p, --path=directorypath
MDaemon dat file directory (Default: use path from Registry key)
-v, --verbose
Add additional output information (does not affect PerfData)
Use -v -v to print out debug information as well
About
Recent Posts
- VerySimpleXML – a lightweight Delphi XML reader and writer
- Solving circular unit references with class helpers
- How to change the language of the Cisco SPA504G
- Eclipse on Mac OS X – Workspace error on NFS mounts
- Lua 5.1 for Delphi 2010
- WordPress Plugin – QR Code Tag v1.0
- Favourite Android applications
- Hint: Blank Typo3 installation screen
- How to create an ESXi v4 Whitebox ISO with Windows Tools
- Ext: tt_news – no translation for name of months
Search
Categories
Tags
Archives
Delphi Feeds
- OmniThreadLibrary Documentation: ParallelTask
- You can’t remove open-source code from public use
- Laying out Smart applications with Layout Manager [3]
- HotFix 1 is live!
- From OP4JS to Smart Mobile Studio
- Update 4 Hotfix 1 now available for Delphi, C++Builder and RAD Studio XE2
- Charles Petzold Rides Again (+ praise for Kindle and O’Reilly)
- Delphi Language links/info
- Limit The Number Of Characters For The TListView's Editor Control
- Embarcadero Academy–The Multithreading Session
I'm an avid programmer working on a variety of platforms in a variety of languages with a wide technical interest.

