Python Plugin Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lzieziula
Posts: 7
Joined: Wed Sep 20, 2017 12:39 pm

Python Plugin Error

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Python Plugin Error

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lzieziula
Posts: 7
Joined: Wed Sep 20, 2017 12:39 pm

Re: Python Plugin Error

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Python Plugin Error

Post by lmiltchev »

Instead of this:

Code: Select all

$USER1$/check_nvidia
you should have this:

Code: Select all

$USER1$/check_nrpe
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked