Pythonscript Module and NRPE



Is there some documentation on getting a python script running through the pythonscript module working with NRPE? I need to run this python script on a server where I am not be able to install python directly so this means I have to run it through the included pythonscript module.

Right now I have this working with the following settings running as an external script:

I have a couple of questions:

  1. Is there a proper way to include external python libraries obtained from github? More specifically I need pexpect to work without any issues. Included the pexpect folder inside …/python/scripts/lib seems to have worked but using some of the functions always seems to display a ‘script not loaded’ or ‘script not found sample’ error at the end of the output.
  2. Why is the output from the scripts placed randomly among the logging output? Sometimes its right at the end, other times its more at the beginning.
  3. Is there any way to turn off the debugging output (e.g no ‘My god, its full of stars…’). This seems to come from and removing works at removing all the logging output however, a ‘can’t load script’ message appears at the end instead.
  4. Not exiting the script using sys.exit also generates a strange “INF: Detected crash…” error. Why would this be the case?

This is version 0.5.39.

Thanks for the help