Offical site: http://www.pnp4nagios.org/
PNP4Nagios draws graphs of performance data collected by Nagios.
Source used: pnp-0.4.14
Compile and install:
./configure \ --prefix=/usr/lib/nagios \ --mandir=/usr/share/man \ --with-perfdata-dir=/var/log/nagios/perfdata \ --with-perfdata-spool-dir=/var/log/nagios/perfdata/spool \ # <- this option for ncpd mode only --sysconfdir=/etc/nagios/pnp \ --datarootdir=/usr/share/nagios/pnp make make install
Enable in Bulk Mode by settings these lines in /etc/nagios/nagios.cfg:
# Enable performance data prcoessing process_performance_data=1 enable_environment_macros=1 # # service performance data config for PNP # service_perfdata_file=/var/log/nagios/service-perfdata service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVIC ECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$ service_perfdata_file_mode=a service_perfdata_file_processing_interval=15 service_perfdata_file_processing_command=process-service-perfdata-file # # host performance data config for PNP # host_perfdata_file=/var/log/nagios/host-perfdata host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTAT E::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$ host_perfdata_file_mode=a host_perfdata_file_processing_interval=15 host_perfdata_file_processing_command=process-host-perfdata-file
Define the above commands process-service-perfdata-file and process-host-perfdata-file in your command cfg file:
# for PNP bulk mode:
define command{
command_name process-service-perfdata-file
command_line /usr/lib/nagios/libexec/process_perfdata.pl --bulk=/var/log/nagios/service-perfdata
}
define command{
command_name process-host-perfdata-file
command_line /usr/lib/nagios/libexec/process_perfdata.pl --bulk=/var/log/nagios/host-perfdata
}
Edit the config files to your needs:
/etc/nagios/pnp/config.php/etc/nagios/pnp/process_perfdata.cfgEnable a checked service to collect performance data:
define service{
...
process_perf_data 1
...
}
Open the the following to view graph of monitored host:
http://<server name>/nagios/pnp/index.php?host=<monitored host name>
Switch to the new pnp4nagios-0.6.x