How to Monitor Apache With Nagiosby Kirk Bennet
If you need to monitor Apache Web servers and oversee their session status, consider using Nagios software. It can monitor servers that run on different platforms, such as Windows, Linux and AIX. Using Nagios, you can receive alerts when the Web server's client session limit is reached. You can also see the dropped user sessions that appear after the limit is reached. To monitor your servers with Nagios, you use the "mod_status" Apache module. It provides a static HTML page that contains the current server statistics in an easily readable form.
Enable the relevant Apache server configuration settings. Open "/apache/httpd.conf" with any text editor and uncomment the following lines:
Open "apache/modules.conf" with any text editor and verify that the entry "LoadModule status_module /usr/lib/apache/1.3/mod_status.so" exists. If it does not, add it.
Restart the server by using the "/init.d/apache restart" command. The module will not work without a restart, so this step is vital.
Test that the "check_apachestatus" Nagios plugin is working. The command is "/local/nagios/libexec/check_apachestatus.pl -H." Replace "-H" with the server's IP address.
Monitor the Apache server by using the "check_apachestatus" plugin whenever you need to.
- You can see more detailed server statistics if you enable "ExtendedStatus." Simply add the line "ExtendedStatus on" in your "httpd.conf" file.
Items you will need
- Nagios "check_apachestatus.pl" plugin
- Comstock/Comstock/Getty Images