This is the plugin I'm using
https://exchange.nagios.org/directory/P ... ck/details
I have tried passing the argument is multiple format but no matter how I try I have only managed to make it work in one specific way an which a single argument.
Here is misunterpreting the : after test because those : shouldn't be there
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.1.1 -t 'xxxxxxxxxxxxxxxxxx' -P 5693 -M 'plugins/check_ad.vbs' -T 600 -a "'/test:Advertising,DFSREvent,SysVolCheck,KccEvent,MachineAccount'" -vvv
Connecting to: https://192.168.1.1:5693/api/plugins/check_ad.vbs/%27%2Ftest%3AAdvertising%2CDFSREvent%2CSysVolCheck%2CKccEvent%2CMachineAccount%27?token=xxxxxxxxxxxxxxx&check=1
File returned contained:
{"returncode": 2, "stdout": "CRITICAL - :Advertising: CRITICAL. DFSREvent: CRITICAL. SysVolCheck: CRITICAL. KccEvent: CRITICAL. MachineAccount': CRITICAL.", "cmd": "cscript C:\\Program Files\\Nagios\\NCPA\\plugins\\check_ad.vbs '/test:Advertising,DFSREvent,SysVolCheck,KccEvent,MachineAccount' //NoLogo"}
CRITICAL - [b]:[/b]Advertising: CRITICAL. DFSREvent: CRITICAL. SysVolCheck: CRITICAL. KccEvent: CRITICAL. MachineAccount': CRITICAL.
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.1.1 -t 'xxxxxxxxx' -P 5693 -M 'plugins/check_ad.vbs' -T 600 -q 'args=/test:Advertising,DFSREvent,SysVolCheck,KccEvent,MachineAccount' -vvv
An error occurred:
not enough values to unpack (expected 2, got 1)
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.1.1 -t 'xxxxxxxxx' -P 5693 -M 'plugins/check_ad.vbs' -T 600 -q "args=/test:Advertising,DFSREvent,SysVolCheck,KccEvent,MachineAccount" -vvv
An error occurred:
not enough values to unpack (expected 2, got 1)
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.1.1 -t 'xxxxxxxxxxxxxxx' -P 5693 -M 'plugins/check_ad.vbs' -T 600 -a "/test:Advertising" -vvv
Connecting to: https://192.168.1.1:5693/api/plugins/check_ad.vbs/%2Ftest%3AAdvertising?token=xxxxxxxxxxxxxxx&check=1
File returned contained:
{"returncode": 3, "stdout": "UNKNOWN - Invalid arguments :test:Advertising , use /help for list of valid arguments", "cmd": "cscript C:\\Program Files\\Nagios\\NCPA\\plugins\\check_ad.vbs test:Advertising //NoLogo"}
UNKNOWN - Invalid arguments :test:Advertising , use /help for list of valid arguments
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.1.1 -t 'xxxxxxxxxxxxxxx' -P 5693 -M 'plugins/check_ad.vbs' -T 600 -a '/test:Advertising' -vvv
Connecting to: https://192.168.1.1:5693/api/plugins/check_ad.vbs/%2Ftest%3AAdvertising?token=xxxxxxxxxxxxxxx&check=1
File returned contained:
{"returncode": 3, "stdout": "UNKNOWN - Invalid arguments :test:Advertising , use /help for list of valid arguments", "cmd": "cscript C:\\Program Files\\Nagios\\NCPA\\plugins\\check_ad.vbs test:Advertising //NoLogo"}
UNKNOWN - Invalid arguments :test:Advertising , use /help for list of valid arguments
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.1.1 -t 'xxxxxxxxxxxxxxx' -P 5693 -M 'plugins/check_ad.vbs' -T 600 -q args='/test:Advertising' -vvv
Connecting to: https://192.168.1.1:5693/api/plugins/check_ad.vbs/?token=xxxxxxxxxxxxxxx&check=1&args=%2Ftest%3AAdvertising
File returned contained:
{"returncode": 0, "stdout": "OK - Advertising: OK.", "cmd": "cscript C:\\Program Files\\Nagios\\NCPA\\plugins\\check_ad.vbs /test:Advertising //NoLogo"}
OK - Advertising: OK.