Openfiler – Installing The Nagios NRPE Add-on
Introduction
This article explains how to configure NRPE and the Nagios Plugins on an Openfiler server for monitoring through Nagios.
The infrastructure used for this article was an Openfiler 2.3 virtual machine being monitored by a Fedora Core 10 64-bit server running Nagios. Both virtual machines were hosted on a Fedora Core 8 64-bit server running VMware Server 1.0.8.
The version of NRPE used for this test was v2.12 and can be downloaded from http://www.nagios.org/download/addons
The version of Nagios Plugins used for this test was 1.4.14 and can be downloaded fromhttp://prdownloads.sourceforge.net/sourceforge/nagiosplug
Pre-requisites
In order to configure NRPE and the Nagios Plugins on an Openfiler 2.3 server for monitoring in Nagios the following pre-requisites must be met :-
- An installed Openfiler 2.3 server / appliance
- An existing Nagios installation
- Openssl libraries installed on the Openfiler 2.3 server / appliance
- The NRPE source tarball
- The Nagios-Plugins source tarball
Installing the Openssl libraries
In order to compile and install the NRPE source the additional Openssl library package is required on the server. To install the Openssl library on to the server perform the following steps :-
- Logon to the console as the root user
- At the command prompt execute the command below :-conary update openssl:devel
Create the nagios user
Before installing NRPE and the Nagios Plugins we must first create the nagios user on the system. To create the nagios user perform the following steps :-
- Logon to the console as the root user
- At the command prompt execute the command below :-useradd nagios
- Set the password for the user by executing the command below and entering the password desired when prompted :-passwd nagios
Compiling and installing the Nagios Plugins
Once the Openssl library has been installed on the server the next step is to compile and install the Nagios Plugins. In order to compile and install the Nagios Plugins on the server perform the following steps :-
- Logon to the console as the root user
- Copy the Nagios Plugins source tarball to the /tmp folder and then unpack it using the command below :-tar -zvxf nagios-plugins-1.4.14.tar.gz
- Change directory in to the nagios-plugins-1.4.14 folder
- To compile and install the software execute the following commands :-./configure
make
make install
Compiling and installing NRPE
Once the Nagios Plugins have been installed on the server the next step is to compile and install the NRPE source code. In order to compile and install NRPE on the server perform the following steps :-
- Logon to the console as the root user
- Copy the NRPE source tarball to the /tmp folder and then unpack it using the command below :-tar -zvxf nrpe-2.12.tar.gz
- Change directory in to the nrpe-2.12 folder
- To compile and install the software execute the following commands :-./configure
make
make install
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd - Edit the /etc/services and append the following line to the bottom of the file :-nrpe 5666/tcp
- Save and exit the file
- Edit the file /etc/xinetd.d/nrpe and change the only_from line from 127.0.0.1 to the IP address of your Nagios server as shown below using 192.168.1.1 as an example :-only_from = 192.168.1.1
- Save and exit the file
- Restart the xinetd service on the Openfiler server by performing the following command :-service xinetd restart
- To confirm that the NRPE service has been started as part of the xinetd server perform the following command and confirm that it shows NRPE as LISTENING :-netstat -l | grep nrpe