Page 1 of 1
Python Plugin Error
Posted: Fri Dec 22, 2017 2:58 pm
by lzieziula
Hello,
I am attempting to configure a custom plugin on Nagios and am getting the attached screenshot error. When I attempted to troubleshoot, it seems like some sort of update may need installed on the Nagios box? I’m unsure and a little confused on how to proceed. For reference, my plugin is a python script. Let me know if you have a solution or idea.
Thanks,
Lauren
Re: Python Plugin Error
Posted: Fri Dec 22, 2017 3:03 pm
by cdienger
It looks like the script may be trying to access something that doesn't exist or may not have permissions to access. Are you able to run the script from the command line? What parameters are you passing it?
Re: Python Plugin Error
Posted: Tue Jan 09, 2018 9:33 am
by lzieziula
So I double checked both the NSC config file, the Nagios command the the script itself. I can run the script from the server in the cmd line.
Here is what I have in the NSC file under external scripts:
check_nvidia=E:\app\Python27\python.exe scripts\check_nvidia.py
And here is what I have in Nagios for the check command:
$USER1$/check_nvidia -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
Like I said, it can be run successfully on the server itself. There must be some sort of discrepancy with my configuration to connect it to Nagios. Any ideas?
Re: Python Plugin Error
Posted: Tue Jan 09, 2018 11:17 am
by lmiltchev
Instead of this:
you should have this:
Other words, you call check_nvidia (defined in the nsclient.ini file) via check_nrpe.
Your check, run from the command line on the Nagios XI server should look something like this:
Code: Select all
./check_nrpe -H <remote ip> -c check_nvidia -a <args>
Note: I am not sure if you are passing any args to check_nvidia.py. It would help if you showed us the actual check run on the Windows machine from the CMD prompt. Also, post the entire nsclient.ini file in case it is still not working for you.