This is a cache of https://support.nagios.com/kb/article/nrpe-return-code-of-127-is-out-of-bounds-plugin-may-be-missing-613.html. It is a snapshot of the page at 2025-05-14T00:12:28.422+0000.
NRPE - Return Code Of 127 Is Out Of Bounds - Plugin May Be Missing
Home » Categories » Products » NRPE » Troubleshooting » Common Problems

NRPE - Return Code Of 127 Is Out Of Bounds - Plugin May Be Missing

Problem Description

This KB article addresses the following NRPE error:

Return Code Of 127 Is Out Of Bounds - Plugin May Be Missing

 

Assumed Knowledge

The following KB article contains an explanation of how NRPE works and may need to be referenced to completely understand the problem and solution that is provided here:

NRPE - Agent and Plugin Explained

 

Troubleshooting The Error

This error is usually experienced when the plugin referenced by the command directive in nrpe.cfg is either missing from the libexec folder or the command directive is named incorrectly. It could also imply that the command name passed through NRPE from the Nagios xi server is not defined in the nrpe.cfg file on the remote host.

The first troubleshooting step is to know the name of the command you are requesting NRPE to execute. Referring to the following screenshot from a service definition in the Nagios xi Core Configuration Manager (CCM):

 

 

You can see the command is called:

check_foo

 

On your remote host make sure that the command is defined in nrpe.cfg, for example:

command[check_foo]=/usr/local/nagios/libexec/check_foo.sh $ARG1$


Now that you have identified the command definition, verify the spelling of check_foo in $ARG1$ (in CCM) matches the exact spelling of the command directive name command[check_foo].

Next, make sure the plugin being executed on the remote host actually exists. In this example, the name of the plugin is:

/usr/local/nagios/libexec/check_foo.sh


Execute the following command on the remote host to see if it exists:

ls -la /usr/local/nagios/libexec/check_foo.sh


If it does not exist, then the output would be something like:

ls: cannot access /usr/local/nagios/libexec/check_foo.sh: No such file or directory

 

If this is your problem, you will have to copy the plugin to the /usr/local/nagios/libexec/ folder.

Make sure the filename check_foo.sh has the correct file extension. Different plugins have different file extensions (.sh, .bin, .pl, .py, etc.).  The path must include the extension of the plugin, but the command directive name, wrapped in 'command[]' does not need an extension.

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How To Clear Solaris Service Maintenance Status
Viewed 31915 times since Mon, Mar 6, 2017
CHECK_NRPE: Error - Could not connect to xxx.xxx.xxx.xxx: Connection reset by peer
Viewed 26875 times since Fri, Jul 14, 2017
Disabling Port 113 IDENT Requests
Viewed 6030 times since Tue, Mar 12, 2019
NRPE - CHECK_NRPE: Error - Could Not Complete SSL Handshake
Viewed 124212 times since Fri, Jul 14, 2017
NRPE - Linux Cached Memory Not Added to Free Memory
Viewed 10044 times since Wed, Jan 27, 2016
NRPE - UNKNOWN: No Handler For That Command
Viewed 15019 times since Mon, Jul 17, 2017
NRPE - Connection Refused By Host
Viewed 15736 times since Mon, Jul 17, 2017
NRPE - Return Code Of 126 Is Out Of Bounds - Plugin May Not Be Executable
Viewed 8705 times since Fri, Jul 14, 2017
NRPE - Warning: This Plugin Must Be Either Run As Root Or Setuid
Viewed 11634 times since Mon, Jul 17, 2017
NRPE - Error While Loading Shared Libraries: libssl.so
Viewed 12204 times since Mon, Jul 17, 2017