Page 1 of 1

Python path on nagios server

Posted: Tue Jan 31, 2017 7:28 pm
by vuduops
I am trying to run a custom plugin from the nagios monitoring server. The plugin script is written python and uses some in modules located in a separate directory.

How can I add these modules to the python path so that the nagios server run the script and display the correct output.

Enclosed below is the output I am seeing on the nagios xi for the service ...

Code: Select all

(No output on stdout) stderr: Traceback (most recent call last):
File "/vvond/etc/nagios/check_accountAudit.py", line 7, in <module>
from vapiutil import nagios
ImportError: No module named vapiutil
Thanks
Krishna

Re: Python path on nagios server

Posted: Wed Feb 01, 2017 10:20 am
by rkennedy
I believe this will vary based on the plugin, but it sounds to be with the system path - http://stackoverflow.com/a/2326045 - this answer should help you out.

If you're still having issues, can you show us a link to the plugin?

Re: Python path on nagios server

Posted: Wed Feb 01, 2017 1:42 pm
by vuduops
Thanks that was helpfull. Please close the ticket