Page 1 of 2

Return code of 127 is out of bounds. Check if plugin exists

Posted: Thu Jun 10, 2021 3:11 pm
by scpeterson
After using NCPA wizard to add a RedHat Linux 7 host into the Nagios console I keep getting a critical error on all of the services associated with that server with status information of (Return code of 127 is out of bounds. Check if plugin exists). I installed the NCPA agent on the server and configured the Token and restarted the services. After that I use the NCPA wizard in NagiosXI to add the server in.

I would appreciate any help you could provide.

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Fri Jun 11, 2021 9:39 am
by gsmith
Hi

Please provide me with a System Profile from the xi server (instructions below).

From the RHEL7 machine please provide me with:
/usr/local/ncpa/etc/ncpa.cfg
and the output of 'ls -l /usr/local/ncpa/plugins'

To send us your system profile.
1. Login to the Nagios XI GUI using a web browser.
2. Click the "Admin" > "System Profile" Menu
3. Click the "Download Profile" button
4. Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.
Thanks

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Mon Jun 14, 2021 11:14 am
by scpeterson
I have attached the ncpa.cfg I did remove one line that contained our community_string value.
The output from the command [ls -l /usr/local/ncpa/plugins] is [total 0]

I have the profile.zip file ready to share when needed.

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Mon Jun 14, 2021 5:25 pm
by gsmith
Hi,

You need to have the plugin copied to /usr/local/ncpa/plugins of the RedHat & machine that you
are trying to monitor.

Do that and let me know how it works.

Thanks

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Tue Jun 15, 2021 2:55 am
by Manuel
Hi,

there seems to be a problem between nagios and the newest linux distributions on the nagios-server side.
I updated my centos 8 yesterday and now have the same error. The NCPA-Clients on my monitored Windows machines didn't change and worked before.
I allready tried uninstalling the NCPA Config Wizard and did a new install. Nothing helped.

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Tue Jun 15, 2021 8:17 am
by scpeterson
Please excuse me for I am new to Nagios. I thought the install of the NCPA agent would do that for me? That install seemed to install the plugins the first time I ran it on the server but after removing the NCPA agent and reinstalling it the plugins do not seem to be reinstalled.

Where can I find the plugins I need to copy? on the Nagios server?

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Tue Jun 15, 2021 1:26 pm
by gsmith
It depends on what you are trying to monitor.

First let's make sure ncpa is set up correctly.

Try this from your XI server:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <ncpaserver> -t mytoken -M 'processes' --warning=100 --critical=200
It should respond with the number of processes on the ncpaserver.

If it doesn't work at all make sure port 5693 is opened up on the RHEL7 server.

Let me know what happens.

Thanks

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Tue Jun 15, 2021 1:50 pm
by scpeterson
The response I get from that command is attached. I had to send you a picture since the outupt would not copy and paste.

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Tue Jun 15, 2021 2:08 pm
by gsmith
Hi


It looks like python isn't installed. Please install it and then run the check_ncpa.py command again.

If you need help getting Python installed please let me know

Thanks

Re: Return code of 127 is out of bounds. Check if plugin exi

Posted: Tue Jun 15, 2021 3:05 pm
by scpeterson
I have three versions of python installed:

yum install python39
Package python39-3.9.2-1.module+el8.4.0+10237+bdc77aac.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

yum install platform-python-3.6.8-37.el8.x86_64
Package platform-python-3.6.8-37.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

yum install python2
Package python2-2.7.18-4.module+el8.4.0+9577+0b56c8de.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Is there a certian version of Python that Nagios likes best?