This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
ehln
Posts: 5 Joined: Fri Aug 02, 2019 4:36 pm
Post
by ehln » Thu Aug 08, 2019 8:51 pm
Hello,
I'm getting an error of "Return code of 127 is out of bounds. Check if plugin exists" when trying to check services with NCPA. I've uninstalled the plugin and reinstalled the plugin; still getting the same error. I've verified that there is data within the check_ncpa.py file. The permissions match the rest of the plugins. I'm running the VMware image of XI version 5.6.5. I've ran a couple discovery commands from other threads and have listed the output below.
Code: Select all
[root@***edit***NAGIOS libexec]#
[root@***edit***NAGIOS libexec]# ./check_ncpa.py -H ***edited*** -t '***edited***' -P -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
: No such file or directory
[root@***edit***NAGIOS libexec]#
Code: Select all
[root@***edit***NAGIOS libexec]# ./check_ncpa.py
: No such file or directory
[root@***edit***NAGIOS libexec]#
Code: Select all
[root@***edit***NAGIOS libexec]# file check_ncpa.py
check_ncpa.py: a /usr/bin/env python\015 script text executable
[root@***edit***NAGIOS libexec]#
Code: Select all
[root@***edit***NAGIOS libexec]# ls -la ./check_ncpa.py
-rwxrwxr-x 1 apache nagios 10567 Aug 7 16:15 ./check_ncpa.py
[root@***edit***NAGIOS libexec]#
You do not have the required permissions to view the files attached to this post.
lmiltchev
Bugs find me
Posts: 13589 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Fri Aug 09, 2019 9:09 am
I would check first if lind endings are set to "unix" in the script. Make sure they are not set to "dos". Open the plugin in "vi" editor, type:
and hit "Enter". Save and exit by typing:
and hitting "Enter" again. Test your plugin again.
If this doesn't work, run the following commands, and show the output:
Code: Select all
which python
python --version
env | grep -i python
which env
ls -al /usr/bin/env
Be sure to check out our
Knowledgebase for helpful articles and solutions!
ehln
Posts: 5 Joined: Fri Aug 02, 2019 4:36 pm
Post
by ehln » Fri Aug 09, 2019 5:17 pm
That fixed it. The plugin is now working.
Thank you!
mbellerue
Posts: 1403 Joined: Fri Jul 12, 2019 11:10 am
Post
by mbellerue » Mon Aug 12, 2019 9:38 am
Excellent, glad to hear it's working! Closing thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
Be sure to check out our
Knowledgebase for helpful articles and solutions!