how to set warning disk usage alert between 89-90% a warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

how to set warning disk usage alert between 89-90% a warning

Post by ganeshsambandam »

how to set warning disk usage alert between 89-90% as warning using snmp wizard for Linux/Unix servers.

We are using below commands for warning 89% and error 90%.

-C camops --v2c -m "^/var$" -w 89 -c 90 -f
jforcier

Re: how to set warning disk usage alert between 89-90% a war

Post by jforcier »

Code: Select all

-w @89:90
This will only warn you if your check is ≥ 89 and ≤ 90.

More on thresholds and ranges:
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: how to set warning disk usage alert between 89-90% a war

Post by ganeshsambandam »

Will @89:90 works for all the wizards like nrpe, NCPA etc?
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: how to set warning disk usage alert between 89-90% a war

Post by ganeshsambandam »

I'm getting an error when use that with snmp wizard, looks like it's not required for ncpa since it's doing calculation and giving output in decimal value. Please check and let me know the correct one to be used for snmp

./check_snmp_storage_wizard.pl -H 10.160.44.60 -C NAGIOS-SNMP --v2c -m "^/var$" -w @89:90 -c 90 -f
Argument "@89:90" isn't numeric in numeric lt (<) at ./check_snmp_storage_wizard.pl line 287.
/var: 76%used(4479MB/5920MB) (>@89:90%) : WARNING | '/var'=4479MB;0;5328;0;5920
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: how to set warning disk usage alert between 89-90% a war

Post by lmiltchev »

This particular plugin (check_snmp_storage_wizard.pl) takes only numeric values (integers), and doesn't follow the Nagios Plugins Development Guidelines in regards to thresholds.
From the plugin's usage (help) menu:
-w, --warn=INTEGER
percent / MB of disk used to generate WARNING state
you can add the % sign
-c, --critical=INTEGER
percent / MB of disk used to generate CRITICAL state
you can add the % sign
Having said that, looking at your original post, using the "-w 89 -c 90" thresholds should give you exactly what you need... If the value is greater than 89 but less than (or equal to) 90, you would get a WARNING. If the value is greater than 90, you would get a CRITICAL.

Isn't that what you wish to accomplish?
Be sure to check out our Knowledgebase for helpful articles and solutions!
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: how to set warning disk usage alert between 89-90% a war

Post by ganeshsambandam »

actually the requirement is to have warning alert of the usage between 89 to 90 which means if the usage is 89% also should give an alert. So equal to 89% should have an alert for warning. Please suggest
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: how to set warning disk usage alert between 89-90% a war

Post by lmiltchev »

In this case, you could use "-w 88 -c 90".
Be sure to check out our Knowledgebase for helpful articles and solutions!
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: how to set warning disk usage alert between 89-90% a war

Post by ganeshsambandam »

If i use "-w 88 -c 90". will alert creates if usage is 89.5% ?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: how to set warning disk usage alert between 89-90% a war

Post by lmiltchev »

Yes, you will get a warning alert as 89.5% is higher than the warning threshold of 88, but it's lower than the critical threshold of 90. This is exactly what you said the requirement was:
actually the requirement is to have warning alert of the usage between 89 to 90 which means if the usage is 89% also should give an alert. So equal to 89% should have an alert for warning. Please suggest
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked