Issue with Check_NT Counter showing 0 as the result

Hi,
I have Nagios 3.0.3 installed on Fedora 9. I have setup a service check for a Windows perfmon counter. It seems to run fine, I don’t get any errors, but I get Zero as the results. This check is to see the number of users logged onto OWA on an exchange server. I run the same performance counter on the Windows server and it will show 4 when nagios keeps reporting 0. I changed the warning level of the service check to 1 and it does not change status. Here is how I have the service check setup.

define service{
use generic-service
hostname EX02
service_description Number of Users logged on OWA
check_command check_nt!COUNTER! -l “\MSExchange\Current Unique Users”,"%.f users logged onto OWA" -w 1 -c 100
}

This is the result I get in Nagios…
Number of Users logged on OWA OK 0 users logged onto OWA

Any ideas?

thanks,
Ruben

Solved my own issue.
I was reading a few other post on here and found one that talks about the nsclient.log file located on the Windows server. I looked at it and found “ERROR: Counter not found: \MSExchange\Current Unique Users: The specified performance object was not found on the computer.”

After checking the counter in Windows perfom, I found the counter is MSExhcnage OWA\Current Unique Users. I changed the command to
check_command check_nt!COUNTER! -l “\MSExchange OWA\Current Unique Users”,"%.f users logged onto OWA" -w 1 -c 100
}

Now it is working fine. It reports the correct number of users logged onto OWA.

Lesson learned… Always double check your spelling.

Thanks,
Ruben