Status information is different than command output
Posted: Thu Jun 19, 2014 5:59 pm
I am trying to check a Windows service using WMI with Nagios XI 2014R1.1.
I added a service check for "Sophos Agent" and the status information under "service details" reads:
OK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded).
However, when I run the command in CCM or via command line it returns what's expected:
COMMAND: /usr/local/nagios/libexec/check_wmi_plus.pl -H x.x.x.x -u 'xxx' -p 'xxx' -m checkservice -a ''\\''Sophos Agent'\\'''
OUTPUT: OK - Found 9 Services(s), 8 OK and 1 with problems (0 excluded). 'Sophos Anti-Virus status reporter' (SAVAdminService) is Running, 'Sophos Anti-Virus' (SAVService) is Running, 'Sophos Agent' (Sophos Agent) is Running, 'Sophos AutoUpdate Service' (Sophos AutoUpdate Service) is Running, 'Sophos Device Control Service' (Sophos Device Control Service) is Running, 'Sophos Message Router' (Sophos Message Router) is Running, 'Sophos Web Control Service' (Sophos Web Control Service) is Running, 'Sophos Web Intelligence Service' (swi_service) is Running, 'Sophos Web Intelligence Update' (swi_update_64) is Stopped.|'Total Service Count'=9; 'Service Count OK State'=8; 'Service Count Problem State'=1; 'Excluded Service Count'=0;
I am not sure what else to check, any help would be greatly appreciated!
Cheers
I added a service check for "Sophos Agent" and the status information under "service details" reads:
OK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded).
However, when I run the command in CCM or via command line it returns what's expected:
COMMAND: /usr/local/nagios/libexec/check_wmi_plus.pl -H x.x.x.x -u 'xxx' -p 'xxx' -m checkservice -a ''\\''Sophos Agent'\\'''
OUTPUT: OK - Found 9 Services(s), 8 OK and 1 with problems (0 excluded). 'Sophos Anti-Virus status reporter' (SAVAdminService) is Running, 'Sophos Anti-Virus' (SAVService) is Running, 'Sophos Agent' (Sophos Agent) is Running, 'Sophos AutoUpdate Service' (Sophos AutoUpdate Service) is Running, 'Sophos Device Control Service' (Sophos Device Control Service) is Running, 'Sophos Message Router' (Sophos Message Router) is Running, 'Sophos Web Control Service' (Sophos Web Control Service) is Running, 'Sophos Web Intelligence Service' (swi_service) is Running, 'Sophos Web Intelligence Update' (swi_update_64) is Stopped.|'Total Service Count'=9; 'Service Count OK State'=8; 'Service Count Problem State'=1; 'Excluded Service Count'=0;
I am not sure what else to check, any help would be greatly appreciated!
Cheers