Windows performance counters

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vhoover
Posts: 123
Joined: Mon Sep 09, 2013 12:17 pm

Windows performance counters

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Windows performance counters

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Windows performance counters

Post 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
vhoover
Posts: 123
Joined: Mon Sep 09, 2013 12:17 pm

Re: Windows performance counters

Post 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
vhoover
Posts: 123
Joined: Mon Sep 09, 2013 12:17 pm

Re: Windows performance counters

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Windows performance counters

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vhoover
Posts: 123
Joined: Mon Sep 09, 2013 12:17 pm

Re: Windows performance counters

Post 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.
Locked