Wednesday, February 22, 2012

Nagios Grapher - PNP Installation


Nagios Graph - PNP
Download the latest stable version from here and extract it to your favorite source path and change to this.

./configure --with-rrdtool=/usr/local/rrdtool/bin/rrdtool --with-perfdata-dir=/usr/local/nagios/share/perfdata/
make all
make install

Update 2 lines in nagios.cfg, this tells nagios how to process performance data:

process_performance_data=1
service_perfdata_command=process-service-perfdata

Edit one of your command files that is listed in nagios.cfg e.g. misccommands.cfg and add following lines.

define command{
command_name process-service-perfdata
command_line /usr/local/nagios/libexec/process_perfdata.pl
}


Now you have to define the service to process the performance data with PNP. To do this look at your service definitions in services.cfg and check the following option is set in your generic service template or specific service.

process_perf_data 1


This file can be created automatically using a script in the contrib directory, ./makeserviceextinfo, this creates a configuration file in nagios/etc. (Note: Only some entries are created, this will be corrected in version 3.

Now after restarting Nagios, when viewing a Service Detail there is an icon displayed that links through to a graph (once some data has been collected).


Note: The PHP5-GD package must be installed