Install Nagios nrpe client and plugins in Ubuntu/Debian

To install Nagios nrpe client and plugins in Ubuntu/Debian run following command:

$ apt-get install nagios-nrpe-server nagios-plugins

After installing client and plugins you need to change allowed_hosts configuration in nrpe.cfg file.

By default allowed_hosts value in nrpe.cfg is 127.0.0.1

allowed_hosts=127.0.0.1

You need to replace 127.0.0.1 with Nagios master IP address.

If your Nagios master IP address is 192.168.2.10, then allowed_hosts value looks like below:

allowed_hosts=192.168.2.10

After updating this value restart nagios-nrpe-server daemon with following command:

$ service nagios-nrpe-server restart

Now you need to check if slave is accessible from master or not with following command:

$ /usr/lib/nagios/plugins/check_nrpe -H 192.168.2.11

Output:

NRPE v2.12

where 192.168.2.11 is slave IP address,

and NRPE v2.12 is NRPE plugin version in slave servers

If you wont get NRPE plugin version, mostly the problem is with nrpe.cfg file or your firewall in slave is not allowing to access.

-Sany

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s