Performance data - Counter value not an integer

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Uncle_Lumpy
Posts: 2
Joined: Thu Oct 04, 2012 6:16 am

Performance data - Counter value not an integer

Post 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.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Performance data - Counter value not an integer

Post 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
Uncle_Lumpy
Posts: 2
Joined: Thu Oct 04, 2012 6:16 am

Re: Performance data - Counter value not an integer

Post 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.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Performance data - Counter value not an integer

Post by yancy »

Uncle_Lumpy,

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

Regards,

-Yancy
Locked