pynag/pynag — pull request #116 by awiddersheim (2013-10-30 17:09:32+00:00)
Title: Fixes to send_nsca() in Plugins.simple

Added the ability to specify location of send_nsca binary and cfg. Renamed ncsahost to nscahost. Added documentation about possible arguments. Switched from using popen to runCommand() provided in Utils.

When trying the example in https://github.com/pynag/pynag/wiki/Using-Passive-Plugin I was having issues. When using popen on my machine I would get deprecation warnings. Also, with not being able to specify a send_nsca.cfg the command would always fail for me even if the binary was in the path. I don't normally have the binary in my path so it is ideal if you can specify where it is along with the cfg file.

I wrestled over whether runCommand() should raise_error_on_fail=True or if errors should be passed back to the calling pluing and handled there. You can probably go either way.

If this gets merged I'd also change the wiki to reflect some of the changes/additions.