NCPA calling batch file with arguments ---- Help !
Posted: Thu Feb 15, 2018 7:28 am
Hello,
I am quite new to Nagios and have reached the stage where I need to call external batch files which include argument. I have tested this using nrpe and it is successful although would like to use NCPA.
I have move the batch file 'check_windows_time.bat' to the /plugins directory.
From the windows server plugins directory using cli I run the batch file successfully using - the args after the.bat are ntp source and offset
check_windows_time 10.0.0.1 30 10 and receive the correct output -
OK: Time is+00.0250767s from 10.0.0.1:'Offset'=00s;30;10;0
How do I call this from the Nagios box using check_ncpa.py
from /usr/local/libexec
./check_ncpa.py -v -H 10.0.0.100 -t MyToken -P 5693 -M 'plugins/check_windows_time.bat' ???????
I am quite new to Nagios and have reached the stage where I need to call external batch files which include argument. I have tested this using nrpe and it is successful although would like to use NCPA.
I have move the batch file 'check_windows_time.bat' to the /plugins directory.
From the windows server plugins directory using cli I run the batch file successfully using - the args after the.bat are ntp source and offset
check_windows_time 10.0.0.1 30 10 and receive the correct output -
OK: Time is+00.0250767s from 10.0.0.1:'Offset'=00s;30;10;0
How do I call this from the Nagios box using check_ncpa.py
from /usr/local/libexec
./check_ncpa.py -v -H 10.0.0.100 -t MyToken -P 5693 -M 'plugins/check_windows_time.bat' ???????