Install PNP4Nagios on Centos


The installation of PNP will be described in more detail. It is expected that nagios was compiled from source and is located in /usr/local/nagios.
Attention: The description applies to the developer version PNP 0.6.0.
Please note that PNP has to be configured after the installation.

Make and more

The installation of PNP is controlled by makefiles. The system is analyzed after invocation of ./configure and the detected values are tranferred to makefiles.

Please unpack PNP as user root:

tar -xvzf pnp4nagios-0.6.16.tar.gz
cd pnp4nagios-0.6.16

By default rrdtool is not included in CentOS. You may need to install it for monitoringpurpose. You can either use source to compile or install using rpm.

To install using rpm all you need is following two commands.

For 32 bit systems

rpm -ivh

For 64 bit systems

rpm -ivh
yum install rrdtool -y

./configure is to be called from the directory pnp4nagios.


Note: Without specifying any options user and group will be “nagios”. If you have different values then please use the parameters ”–with-nagios-user” and ”–with-nagios-group”, respectively. Using Icinga the call might be

./configure --with-nagios-user=icinga --with-nagios-group=icinga

Some lines run across the screen. The output at the end is important.

*** Configuration summary for pnp4nagios-0.6.16 11-21-2011 ***
General Options:
 ------------------------- -------------------
 Nagios user/group: nagios nagios
 Install directory: /usr/local/pnp4nagios
 HTML Dir: /usr/local/pnp4nagios/share
 Config Dir: /usr/local/pnp4nagios/etc
 Location of rrdtool binary: /usr/bin/rrdtool Version 1.4.4
 RRDs Perl Modules: FOUND (Version 1.4004)
 RRD Files stored in: /usr/local/pnp4nagios/var/perfdata Logfile: /usr/local/pnp4nagios/var/perfdata.log
 Perfdata files (NPCD) stored in: /usr/local/pnp4nagios/var/spool
Web Interface Options:
 ------------------------- -------------------
 HTML URL: http://localhost/pnp4nagios
 Apache Config File: /etc/httpd/conf.d/pnp4nagios.conf
 Review the options above for accuracy. If they look okay,
 type 'make all' to compile.

The paths shown should be checked. If the displayed values aren’t correct you can change them calling ./configure with appropriate options.

Attention: “Location of rrdtool binary” means path including name of binary! If necessary it can be specified using the following syntax:

 ./configure --with-rrdtool=/usr/local/rrdtool-1.2.xx/bin/rrdtool
 ./configure --help

shows the supported options.


 make all

compiles the components like NPCD which are written in C

 make install

copies everything to the right places in the file system. The paths were already shows during ./configure.

After the installation of the program and HTML files you can copy a sample Apache configuration file to your web-server config directory

 make install-webconf

You can call

 make install-config

optionally. This way config files for and npcd are copied to etc/pnp.

To install the NPCD Init script call

 make install-init

All these steps are combined in

 make fullinstall

Attention: After copying the configuration file for the web server you have to restart the web server (service httpd restart or /etc/init.d/apache2 restart, respectively).

Originally posted 2016-03-03 01:05:58.


Please enter your comment!
Please enter your name here