Page 1 of 1

Performance data - Counter value not an integer

Posted: Thu Oct 04, 2012 6:26 am
by Uncle_Lumpy
Hallo Nagios people,
I've seen similar questions to this but haven't been able to find the answer I'm looking for....

I am monitoring several Windows servers, mainly Exchange and I'm looking to monitor a Performance Counter for Disk Read speeds.

e.g. command and result
/usr/local/nagios/libexec/check_nt -H exchangexx -p 1248 -v COUNTER -l "\\PhysicalDisk(2 S:)\Avg. Disk sec/Read","S: Drive Latency %.2f" -w 0.02 -c 0.04

S: Drive Latency 0.01 | 'S: Drive Latency %.2f'=0.008815%;0.000000;0.000000;

Which is fine other, than the Warning and Critical values don't trigger. I suspect that this is because they are supposed to specified as Integer values.

Is it possible to either multiply the results i.e. 0.008815 becomes 88.15 so I can use integer W and C values, or, is there some way to use float values for W and C

Thanks for any advice, Uncle_Lumpy.

Re: Performance data - Counter value not an integer

Posted: Thu Oct 04, 2012 11:18 am
by yancy
Uncle_Lumpy,

Sure you could use some kind of shell script to do the math, but it' probably best to not do workarounds like that if possible. I would recomend looking at check_nrpe instead of check_nt.

Here are some examples using check_nrpe:

http://www.nsclient.org/nscp/wiki/Check ... eckCounter

Regards,

-Yancy

Re: Performance data - Counter value not an integer

Posted: Fri Oct 05, 2012 9:09 am
by Uncle_Lumpy
Brilliant! Thanks Yancy.

After a fair amount of fiddling (i.e. a million different variations of "allow_nasty_metacharacters=true" , aarrghhh), all seems to be working ok, complete with sensible pnp4nagios graphs as well.

Much obliged.

Re: Performance data - Counter value not an integer

Posted: Fri Oct 05, 2012 10:27 am
by yancy
Uncle_Lumpy,

Great News! I'll mark this thread as resolved.

Regards,

-Yancy