Page 1 of 1

Windows performance counters

Posted: Tue Sep 24, 2013 10:45 am
by vhoover
I am trying to monitor logical disks % of free space via the windows server 2003 r2 (x64) performance counters in Nagios XI. I can get the Nagios to accept the counter, however, it states that 0% is used regardless of what the thresholds are set to. It does not matter it the service check is "OK", "Warning", or "Critical", the data displayed is the same. I run a VBscript on the local box and can see that one is at 52% used. Here is what I have for the service check command:
check_xi_service_nsclient!flidata!COUNTER!-l "\\LogicalDisk[D:\Data1]\% Free Space","Data1 usage is %.2f%%" -w 0.5 -c 0.6!!!!!

Here is the data displayed on the service check:
Data1 usage is 0.00%

What am I doing wrong, or better yet how can this be resolved?

Re: Windows performance counters

Posted: Tue Sep 24, 2013 11:00 am
by abrist
Performance counters can be fickle as they do not always report an error when there is one. It may be that D:|Data1 does not exist. If you change Data1 to something that you know, for sure, doesn't exist, do you still get a 0% usage status?

Re: Windows performance counters

Posted: Tue Sep 24, 2013 11:12 am
by slansing
In addition to what Andy said are you able to get a valid return from this command if you run it from the CLI?:

Code: Select all

/usr/local/nagios/libexec/check_nt -H <windows IP> -p <nsclient port> -s <password> -v COUNTER -l "\\LogicalDisk[D:\Data1]\% Free Space" -w 30 -c 10

Re: Windows performance counters

Posted: Tue Sep 24, 2013 11:27 am
by vhoover
I know for sure that Data1 exists but in changing it to Data001 I got the following response:
Data001 usage is 0.00% | 'Data001 usage is %.2f%%'=0.000000%;0.000000;0.000000;

when I ran the following command from the Nagios Server I get a response of "0"
/usr/local/nagios/libexec/check_nt -H <IP address> -p <port> -s <password> -v COUNTER -l "\\LogicalDisk[D:\Data1]\% Free Space" -w 30 -c 10

Re: Windows performance counters

Posted: Tue Sep 24, 2013 11:35 am
by vhoover
Essentially what I am trying to do is to monitor mount-points on some windows servers one is 2003 and the other two are 2008. The hard part is they do not have letters assigned they are sitting on a single drive in the case of the 2003 server all 13 mount points are sitting on the D drive.

Re: Windows performance counters

Posted: Tue Sep 24, 2013 2:34 pm
by abrist
I get the impression that either:
1. Your mount point or folder name is incorrect
2. The syntax for the performance counter is wrong
3. Or the performance counter does not like in-filesystem mount points.

Re: Windows performance counters

Posted: Tue Oct 01, 2013 1:49 am
by vhoover
I finally got this resolved with the following syntax (censored)
check_xi_service_wmiplus!<username>!<password>!checkmountpoint!-a 'D:/Data10/' -w 86 -c 96 -t 60!!!!
Now if I can olny get it to show the results in gb instead of tb, but I am sure that is a change in one of the three files related to the check_xi_service_wmiplus.