Python path on nagios server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

Python path on nagios server

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Python path on nagios server

Post 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?
Former Nagios Employee
vuduops
Posts: 81
Joined: Wed Sep 07, 2016 1:34 pm

Re: Python path on nagios server

Post by vuduops »

Thanks that was helpfull. Please close the ticket
Locked