The test works fine from the command line as followed :
Code: Select all
/usr/local/nagios/libexec/check_nt -H 10.75.105.10 -s "N4gi0s" -p 12489 -v COUNTER -l "\\Terminal Services\\Total Sessions","TS Connections are %.f" -w 10 -c 20
TS Connections are 7 | 'TS Connections are %.f'=7.000000%;10.000000;20.000000;
So I created a service as followed :
Code: Select all
define service {
host_name servername
service_description MS RDP : Current Connections
use service-template
check_command check_xi_service_nsclient!password!COUNTER -l "\Terminal Services\Total Sessions","TS Connections are %.f" -w 10 -c 20!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_nt -H 10.75.105.10 -s "N4gi0s" -p 12489 -v COUNTER -l "\\Terminal Services\\Total Sessions","TS Connections are %.f" -w 10 -c 20
OUTPUT: TS Connections are 7 | 'TS Connections are %.f'=7.000000%;10.000000;20.000000;
So far so good... however. If I run the service through Nagios XI I get Performance Data: 'TS Connections are %.f'=0.000000%;10.000000;20.000000; as result in stead of 7 and I get the following error in the nsclient.log
Code: Select all
2013-05-27 16:39:10: error:modules\CheckSystem\CheckSystem.cpp:1084: ERROR: Counter not found: Terminal ServicesTotal Sessions: Unable to parse the counter path. Check the format and syntax of the specified path. (C0000BC0)
2013-05-27 16:39:10: error:modules\CheckSystem\CheckSystem.cpp:1086: ERROR: Counter not found: Terminal ServicesTotal Sessions: Unable to parse the counter path. Check the format and syntax of the specified path. (C0000BC0)
2013-05-27 16:39:10: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Terminal ServicesTotal Sessions: PdhAddCounter failed: Unable to parse the counter path. Check the format and syntax of the specified path. (C0000BC0) (Terminal ServicesTotal Sessions|Terminal ServicesTotal Sessions)
Extra info : I am using NSClient++-0.3.9-x64 from http://nsclient.org/nscp/downloads
Can someone tell me what's wrong please.
I have the same problem reading other perfmon counters as well.