Trouble pulling Windows counter data
Posted: Thu Aug 04, 2016 7:08 pm
Hi,
I have the below service defined and you can see that running the check as nagios in the shell, it returns data. When the service runs, it barfs up the following. Any hints on getting the syntax right? I've tried many different combinations of escape for the $ and \ chars and quoting to no avail. Waa!
NSClient - ERROR: Invalid return from command: check_pdh
An example of a working counter service:
On the one that works, I've used both \ and \\ in front of the counter and it doesn't seem to mind either one.
I have the below service defined and you can see that running the check as nagios in the shell, it returns data. When the service runs, it barfs up the following. Any hints on getting the syntax right? I've tried many different combinations of escape for the $ and \ chars and quoting to no avail. Waa!
NSClient - ERROR: Invalid return from command: check_pdh
Code: Select all
[nagios@lnag001 ~]$ /usr/local/nagios/libexec/check_nt -H host -s "passwd" -p 12489 -v COUNTER -l "\\MSSQL$QA4:Catalog Metadata(NP_RADIUS)\Cache Hit Ratio"
58
Code: Select all
define service {
service_description DB_Log_Cache_Hit_Ratio_NP_RADIUS
use default_service
hostgroup_name MS_SQL_Servers
check_command check_xi_service_nsclient!passwd!COUNTER!-l "\\MSSQL$QA4:Databases(NP_RADIUS)\Log Cache Hit Ratio"!!!!!
check_interval 1
register 1
}
Code: Select all
define service {
service_description DB_Cache_Hit
use default_service
hostgroup_name MS_SQL_Servers
check_command check_xi_service_nsclient!passwd!COUNTER!-l "\\Database(svchost)\Database Cache % Hit"!!!!!
check_interval 1
register 1
}
Code: Select all
COUNTER =
Check any performance counter of Windows NT/2000.
Request a -l parameters with the following syntax:
-l "\\<performance object>\\counter","<description>
The <description> parameter is optional and is given to a printf
output command which requires a float parameter.
If <description> does not include "%%", it is used as a label.
Some examples:
"Paging file usage is %%.2f %%%%"
"%%.f %%%% paging file used."