Integrating PNP (PNP is not Perfparse) with CentOS 4.x / Nagios 2.x
From Nagios Wiki
Contents |
[edit] Purpose
various ways to configure PNP, the way we're focusing on and why
[edit] PNP
[edit] Visualization Nagios Has
[edit] What PNP Does Extra that Nagios Can't
[edit] Prerequesites
php-gd
[edit] Installing Nagios
general instructions from minimal install
[edit] Installing PNP
[edit] General Instructions
wget and untar configure make install modify Nagios appropriately
various ways one can configure PNP, and the way we're chosing
[edit] CentOS Specific Instructions
cd /tmp wget http://downloads.sourceforge.net/pnp4nagios/pnp-0.4.3.tar.gz tar -xvzf pnp-0.4.3.tar.gz cd pnp-0.4.3 ./configure --prefix=/usr/share/nagios
what output should look like
*** Configuration summary for pnp 0.4.3 13-10-2007 ***:
General Options:
-------------------------
Nagios user/group: nagios,nagios
Install ${prefix}: /usr/share/nagios
HTML Dir: /usr/share/nagios/share/pnp
Config Dir: /usr/share/nagios/etc/pnp/
Path to rrdtool: /usr/bin/rrdtool
RRD Files stored in: /usr/share/nagios/share/perfdata
Is Update: Please backup your installation!
Review the options above for accuracy. If they look okay,
type 'make all' to compile.
make all && make install (if fail, "yum install gcc-c++")
where it puts various parts you'll be using later
files you'll be changing (in what order, and rational for that order)
ln -s /usr/share/nagios/share/pnp /usr/share/nagios/pnp
[edit] cfg file changes
http://www.ederdrom.de/pnp/doc_complete
(Your mileage may vary if you have a frond end GUI that configures Nagios)
[edit] nagios.cfg
vim /etc/nagios/nagios.cfg
# PROCESS PERFORMANCE DATA OPTION # This determines whether or not Nagios will process performance # data returned from service and host checks. If this option is # enabled, host performance data will be processed using the # host_perfdata_command (defined below) and service performance # data will be processed using the service_perfdata_command (also # defined below). Read the HTML docs for more information on # performance data. # Values: 1 = process performance data, 0 = do not process performance data process_performance_data=1
and
# HOST AND SERVICE PERFORMANCE DATA PROCESSING COMMANDS # These commands are run after every host and service check is # performed. These commands are executed only if the # enable_performance_data option (above) is set to 1. The command # argument is the short name of a command definition that you # define in your host configuration file. Read the HTML docs for # more information on performance data. host_perfdata_command=process-host-perfdata service_perfdata_command=process-service-perfdata
/etc/nagios/commands.cfg
define command {
command_name process-service-perfdata
command_line /usr/bin/perl /usr/share/nagios/libexec/process_perfdata.pl
}
define command {
command_name process-host-perfdata
command_line /usr/bin/perl /usr/share/nagios/libexec/process_perfdata.pl -d HOSTPERFDATA
}
/etc/nagios/services.cfg
define serviceextinfo {
host_name localhost service_description load action_url /nagios/share/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
}

