PNP4Nagios is a gem of an add-on; it allows a Nagios administrator to easily add RRD-style graphs and efficient long-term trending capabilities to Nagios. This graphing framework makes extensive use of templates and is easy to customize. It consists of a PHP-based front using Kohana framework.
Pnp4nagios uses kohana framework for web frontend and kohana requires php 5.2.x has to be installed. In my previous post I have describe how to upgrade to php 5.2.x on centos which comes with 5.1.x.
Perl >= 5.x
PHP >= 5.2. for the Webfrontend based on Kohana
PHP-extension zlib, session and GD.
Nagios >= 2.x
Joerg Linge have written excellent documentation for pnp4nagios and using it one can easily install and configure PNP in no time.
In my case I have used the following ./configure line to have rrd data under nagios directories and rest of pnp4nagios goes its own directories in filesystem.
./configure --with-perfdata-logfile=/var/nagios/perfdata.log --with-perfdata-dir=/var/nagios/perfdata --with-perfdata-spool-dir=/var/nagios/spool/perfdata
After installing follow the pnp docs for start generating graphs and web integration with Nagios.
Before going for production use, decide which mode is right for your Nagios installation.
In our case we go with Bulk Mode with NPCD as per docs...
Nagios again uses a temporary file to store the data and executes a command after expiration of a certain time. Instead of immediate processing by process_perfdata.pl the file is moved to a spool directory. As moving a file inside the same filesystem nearly takes no time nagios is able to execute crucial work immediately.
The NPCD daemon (Nagios Performance C Daemon) will monitor the directory for new files and will pass the names to process_perfdata.pl. Processing of performance data is decoupled completely from nagios. NPCD itself is able to start multiple thread for processing the data.
One of the cool feature of pnp4nagios to have separate pages of graphs for hosts/services on a single page.
Once again Joerg have an excellent docs for configuring pages.
Once installed and configured pnp4nagios provides trending and capacity planning which allows organizations to plan for infrastructure upgrades before outdated systems catch them by surprise.