check_nt limit using decmals

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
bahjaat
Posts: 3
Joined: Tue May 29, 2012 4:30 am

check_nt limit using decmals

Post by bahjaat »

I'm struggling with the warning and critical limits with the check_nt command.

I'm using the following:

Code: Select all

./check_nt -H <hostname> -p 12489 -v COUNTER -l "\\PhysicalDisk(5 M:)\\Avg. Disk sec/Read","Avg. Disk sec/Read","s" -w 1 -c 2
which works fine, but the results are in milliseconds like 0.00236
Result:

Code: Select all

label = 0.05 s | label=0.049584s;1.000000;2.000000;
Now I want to set the warning to 0.003 for example. But when I'm using the following code the limits are falling back to zero.

Code: Select all

./check_nt -H <hostname> -p 12489 -v COUNTER -l "\\PhysicalDisk(5 M:)\\Avg. Disk sec/Read","Avg. Disk sec/Read","s" -w "0.002" -c "0.003"
Result:

Code: Select all

label = 0.00 s | label=0.004813s;0.000000;0.000000;
Anyone?
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: check_nt limit using decmals

Post by jsmurphy »

The -w and -c switches for check_nt only accept an integer (a whole number) there's not really much you can do about that. I'm not really sure but the check_wmi_plus.pl plugin might do floats.
bahjaat
Posts: 3
Joined: Tue May 29, 2012 4:30 am

Re: check_nt limit using decmals

Post by bahjaat »

Ok, that's clear, but still a pity. So I will check the check_wmi_plus.pl plugin right now.
Thanks for clarifying my issue.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_nt limit using decmals

Post by slansing »

You can also try contacting the creator of the check_wmi_plus plugin if you have questions specific to it. Generally people who upload plugins on the Exchange are pretty good about replying.
Locked