Nagios NRPE
Contents |
1 Introduction
This Document describes the installation of the Nagios Remote Plugin Executer (NRPE) installation on a SME server to be monitored by a Nagios server.
2 Installation
First make sure that the neddix yum repository is configured. Then install the packages.
2.1 NRPE installation
/usr/bin/yum --enablerepo=neddix --enablerepo=base install \ nagios-plugins \ nagios-plugins-setuid \ perl-Config-Tiny \ perl-Class-Accessor \ smeserver-nagios-nrpe \ smeserver-nagios-backup \ perl-Nagios-Plugin \ smeserver-nagios-plugins-mysql \ nagios-plugins-generic \ nagios-of-plugins
2.1.1 Install the VMware ESXi Server CIM Hardware Monitoring (optional)
If you plan to monitor an ESx3i server with CIM compliant hardware, you can configure the ESXi plugin
/usr/bin/yum install openssl-devel perl-XML-SAX
Download and install the VMware Infrastructure (VI) Perl Toolkit
Ignore this warning: The following Perl modules were found on the system but may be too old to work with VIPerl: URI XML::NamespaceSupport
It does not affect the proper function of the nagios plugins.
To get some configuration hints run
rpm -qi nagios-plugins-esx3i
2.1.2 NRPE configuration
Create a the NRPE configuration file /etc/nagios/nrpe.cfg. Use the nrpe.cfg provided by this conrib as a starting point. Add the IP address of your central Nagios server to the variable allowed_hosts. Use the local IP of the central Nagios server if you check the server over the local network or over a VPN, otherwise use the WAN IP.
2.1.3 Allow the central Nagios server to access the NRPE service
Add the IP address of the your central Nagios to Local Networks in the server-manager.
Configure the TCP wrapper. This is required for SSL connections to the NRPE.
config set nrpe service config setprop nrpe HostsAllow "127.0.0.1 NAGIOS_CENTRAL_SERVER_IP" expand-template /etc/hosts.allow
2.1.4 Allow the Nagios plugins to be executed as root (optional)
A few plugins only work when they are executed as root. This configures the sudoers configuration.
config setprop nrpe sudoPlugins yes expand-template /etc/sudoers
Start the service
service nrpe restart
If the NRPE SME server is behind a firewall, you must forward port 5666/tcp to the server.
Test the installation by running this command on the central Nagios server:
/usr/lib/nagios/plugins/check_nrpe -H IPADDRESS
Expected result:
NRPE v2.5.1
3 Uninstall
This removes the installed Nagios packages.
service nrpe stop
rpm -e \ fping \ gd \ nagios \ nagios-nrpe \ nagios-of-plugins \ nagios-plugins \ nagios-plugins-generic \ nagios-plugins-nrpe \ nagios-plugins-setuid \ perl-Class-Accessor \ perl-Config-Tiny \ perl-Crypt-DES \ perl-Math-Calc-Units \ perl-Nagios-Plugin \ perl-Net-SNMP \ perl-Params-Validate \ smeserver-nagios-backup \ smeserver-nagios-nrpe \ smeserver-nagios-plugins-mysql
