[Nagios] Return code of 255 is out of bounds error occurs when NRPE is not running

Tadashi Shigeoka ·  Thu, January 4, 2018

When a Return code of 255 is out of bounds error is returned from a Nagios monitoring target, it’s often because NRPE is not running.

Nagios | ナギオス

[Background] What is NRPE

NRPE (Nagios Remote Plugin Executer) is a plugin for monitoring remote hosts from Nagios.

It’s installed on the monitoring target host server when you need to execute arbitrary commands on the monitoring target host, such as for resource monitoring.

Starting NRPE

First, let’s start NRPE to prevent Nagios alerts.

$ sudo /etc/init.d/nrpe start
Starting nrpe:                                             [  OK  ]

$ ps aux | grep nrpe
nrpe      1593  0.0  0.2  43576  1360 ?        Ss   05:15   0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
ec2-user  1596  0.0  0.1 110284   848 pts/0    S+   05:15   0:00 grep nrpe

Enable NRPE Auto-start

Next, since the underlying problem is probably that NRPE auto-start is not enabled, let’s enable it with the chkconfig command.

$ sudo chkconfig nrpe on
$ chkconfig --list nrpe
nrpe             0:off  1:off  2:on  3:on  4:on  5:on  6:off

That’s all from the Gemba where I don’t want to receive unnecessary Nagios notifications by auto-starting NRPE.