This is a plugin for monitoring the SUN One webserver, using a local plugin, running in Unix/Linux/Windows agents.
This plugins reports server response check, process information (status, memory, cpu), volume information, logfile parsing, and performance http parameters. For more information visit the following web page: http://pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=592
3. 1 WEB SERVER MONITORING
1.1. Introduction
This plugins runs on Unix and Windows.
This plugin do several tasks:
• Server response check, given a URL, host and port. Also, matching using a regex to verify
a correct answer.
• Process information. Report status (if it's running and active), total instances, total
memory used by all the instances, and CPU usage for all instances.
• Information about a given fileystem.
• This plugin could parse error logfile and return log information to Pandora FMS.
• Performance information of the Apache HTTP Server. It uses server-status module (you
need to have this enabled), reporting several modules:
◦ Apache restart time
◦ Apache server uptime
◦ Apache accesses
◦ Apache CPU Load
◦ Apache CPU User load
◦ Apache CPU System Load
◦ Apache Request per second
◦ Apache Bytes per second
◦ Apache KB per request
◦ Apache Request currently
◦ Apache Idle Workers
This plugin has it's own configuration file, where you can define all these checks.
1.2. Pre-requisites
You need to have a conf file for each server. In each configuration file, you need to specify:
Page 3
4. • A separate HTTP request for each instance you want to check, contanining: IP, Port, URL
and regexp to match.
• Process name (fullname) to check it's status, Memory and CPU usage.
• Volume name.
• Logfile and string to verify.
• To obtain apache http server information you need to activate “server-status” module.
1.3. Apache Server status.conf
Check your configuration file httpd.conf (Apache 1.3.x) or apache2.conf (Apache 2.x) or
status.conf (in specific versions and Turnkeys)..
These files usually are at:
/etc/apache/
/etc/apache2/
/etc/apache2/mods-available
In Apache 1.3.x, make sure you have this entry on /etc/apache/modules.conf:
LoadModule status_module /usr/lib/apache/1.3/mod_status.so
In Apache 2.x, you need to have installed the module mod_info. Check yoy have it, by typing in
the command line :
a2enmod info
Once located the .conf file, include or un-comment the following contents:
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from <Pandora-Server-IP>
</Location>
Restart your http server, and verify server-status module is running, by entering in your server at
//server-status URL. You should see something like:
Page 4
5. Apache Server Status for localhost
Server Version: Apache/2.2.17 (Linux/SUSE) mod_ssl/2.2.17 OpenSSL/1.0.0c PHP/5.3.5
Server Built: 2010-10-21 14:13:51.000000000 +0000
Current Time: Friday, 13-May-2011 16:09:10 CEST
Restart Time: Friday, 13-May-2011 14:54:34 CEST
Parent Server Generation: 0
Server uptime: 1 hour 14 minutes 35 seconds
Total accesses: 25 - Total Traffic: 168 kB
CPU Usage: u.04 s.02 cu0 cs0 - .00134% CPU load
.00559 requests/sec - 38 B/second - 6.7 kB/request
6 requests currently being processed, 3 idle workers
Page 5
6. 2 PLUGIN CONFIGURATION
Configuration tokens description below. This should be included in a .conf file used with the plugin
execution.
timeout <x>
timeout (in segunds) for HTTP requests.
Sample:
timeout 3
webcheck <web_server>;<host>;<port>;[url];<reg_exp to match>
HTTP check, that requires host, port, URL and evaluate the response with a regexp. All fields are
separated with ; character.
Sample:
webcheck farscape_web;farscape.artica.es;80;http://farscape.artica.es/;Pandora FMS
webcheck local_web;192.168.70.139;80;/;200 OK
logparser <path_to_log>
Requires “grep_log” plugin, usually distributed with pandora agent.
Sample:
logparser c:archivos de programapandora_agentgrep_log.exe
volume <web_server>;<X>
Return free % space in volume <X>
Sample:
volume main_server;C:
process <DNS_Service>;<dsNcService.exe>
Page 6
7. Return information about the process given. Return status, cpu and used memory.
Sample:
process DNS_Service;dsNcService.exe
log <path_to_log>;<regexp to match>
Logfile parse using a regexp.
Sample:
log C:devil.txt;log_test;error
apache_stats <web_server>;<host>;<port>;<url to server-status, usually /server-status>
Report several metrics of httpserver.
apache_stats web_server;192.168.70.139;80;/server-status
2.1. Configuration file examples
webcheck main_server;10.36.18.10:8080;Java System Web Server
volume main_server;/aplicaciones/netsrv
process sunONE_web;webservd -d /aplicaciones/netsrv/webserver7/https-rhpr0265/
Page 7