Native Windows check_ncpa.py

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
onegative
Posts: 173
Joined: Tue Feb 17, 2015 12:06 pm

Native Windows check_ncpa.py

Post by onegative »

G' Day Community,

So before I go out and try to re-write check_ncpa.py or create a new Powershell version of it to run natively on Windows...

Has anyone already gone through the trouble of fabricating Windows equivalent of SIGALRM embedded in check_ncpa.py?

i.e.

Code: Select all

C:\Users\dg0123_\Desktop>python ./check_ncpa.py -H my-tool-server -T 60 -P 3181 -t mytoken -M /system/agent_version
Traceback (most recent call last):
  File "C:\Users\dg0123_\Desktop\check_ncpa.py", line 352, in <module>
    stdout, returncode = main()
  File "C:\Users\dg0123_\Desktop\check_ncpa.py", line 317, in main
    signal.signal(signal.SIGALRM, timeout_handler(options.timeout))
AttributeError: module 'signal' has no attribute 'SIGALRM'. Did you mean: 'SIGABRT'?
I understand I can get perform a workaround by installing cygwin but that is really not a viable option where company policies restrict what software can be installed.

If anyone has already done all the work, it would save me lots of time as Python is not my first language which incurs additional time learning syntax and short-cuts.

Thanks in advance,
Danny
Locked