PNP4Nagios: Graph Your Nagios Alerts
Introduction
PNP is an addon to Nagios which analyzes performance data provided by plugins and stores them automatically into RRD-databases (Round Robin Databases, see RRD Tool).
Prerequisites
First, create a folder where to unzip the installation files. Here, we are going to use /etc/nagios3/pnp4nagios
:
|
|
Then get the file, unzip and go into the folder:
|
|
Activate the Apache2 rewrite module:
|
|
Edit the php5 conf file in /etc/php5
on this line:
|
|
If not installed yet, install GCC (C compiler)
|
|
Installation
Configure the installation, using the folder you want to install pnp4nagios in:
|
|
Launch every make command:
|
|
Configuration
In the nagios generic services file add:
|
|
And in the generic hosts file add:
|
|
Edit the nagios.cfg file and be sure those line are uncommented:
|
|
In any service or host configuration file, add (use generic-*.cfg for example):
|
|
Now for any host and service you want to use pnp4nagios with, on its “use” line, add this for a host:
host-pnp
and for a service:
srv-pnp
Example:
|
|
You can add it on a generic host or service used by a group of hosts or services. This will be inherited.
Onmouseover graphs in cgi interface
Copy the ssi files in the pnp4nagios contrib folder (pnp4nagios-0.6.0/contrib/ssi/*) in the nagios ssi folder (/usr/share/nagios3/htdocs/ssi/):
|
|
Finally, restart apache2 and nagios and everything will work fine. You can see the PNP4Nagios interface to: http://nagios-srv/pnp4nagios
Last updated 26 Aug 2011, 15:43 CEST.