Solve: Nagios: Return code of 13 is out of bounds

Overview

Nagios is a great product for monitoring IT infrastructure. Since it is an open source product users can develop there own plugins to monitor what ever parameter they like to monitor. If you are using a plugin to monitor something and it shows “Return code of 13 is out of bounds” on Nagios Screen the problem in most cases is the permission not set properly.

Solve: Return code of 13 is out of bounds

The first thing you should be doing is to hop over to the server being monitored and run the plugin from the commandline. If the plugin works fine from commandline, but is failing if nagios runs the check, you can be sure that the permissions set on the plugin is playing the spoil sport. Change the ownership to nagios and make sure right permissions are set.


chown nagios:nagios plugin-name
chmod 751 plugin-name

Example


chown nagios:nagios /usr/lib/exec/check_disk
chmod 751 /usr/lib/exec/check_disk