Pnp4nagios Pi – Installing pnp4nagios

Pnp4nagios Pi – Installing pnp4nagios

Introduction

This article explains how to implement pnp4nagios on a Raspberry Pu running Raspian Buster Lite and Nagios Core 4.4.5.

pnp4nagios is an add-on for Nagios Core which analyzes performance data provided by plugins and stores them automatically into RRD-databases. This data can then be displayed as graphs for host and service checks.

Prerequisites

In order to implement pnp4nagios on a Raspberry Pi running Raspian Buster Lite and Nagios 4.4.5 the following pre-requisites must be met:

  • Nagios Core installed

Preparing to install pnp4nagios

Before installing pnp4nagios the prerequisite packages need to be installed and the software downloaded

To prepare for the installation of pnp4nagios perform the following steps:

  • Logon to the Raspberry Pi and execute the following command to become root:
sudo -i
  • The next step is to install the pre-requisite packages by executing the following commands:
apt-get update
apt-get -y install rrdtool librrds-perl php-gd php-xml
  • Once the prerequisite packages have been installed download and unpack the source code by executing the following commands:
cd /tmp
wget -O pnp4nagios-0.6.26.tar.gz https://sourceforge.net/projects/pnp4nagios/files/latest
tar -zxf pnp4nagios-0.6.26.tar.gz

Compiling and installing pnp4nagios

Once the system has been prepared and the software downloaded, perform the following steps to compile and install pnp4nagios:

  • To configure pnp4nagios execute the following commands:
cd pnp4nagios-0.6.26/
./configure --with-httpd-conf=/etc/apache2/sites-enabled
make all
  • To install pnp4nagios once it has been compiled execute the following commands:
make install
make install-webconf
make install-config
make install-init

Configure and start / restart daemons

The last part of the installation process for pnp4nagios is to configure and start / restart daemons on the server by performing the following steps:

  • To configure and start the npcd daemon execute the following commands:
systemctl daemon-reload
systemctl enable npcd.service
systemctl start npcd
  • The final step is to restart Apache on the server by executing the following command:
systemctl restart Apache

Next, proceed on to the next article in the series to configure Nagios commands.

Leave a Reply

Your email address will not be published.