Page 1 of 1
how to set warning disk usage alert between 89-90% a warning
Posted: Wed Sep 26, 2018 1:57 pm
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
Re: how to set warning disk usage alert between 89-90% a war
Posted: Wed Sep 26, 2018 2:06 pm
by jforcier
This will only warn you if your check is ≥ 89 and ≤ 90.
More on thresholds and ranges:
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Re: how to set warning disk usage alert between 89-90% a war
Posted: Wed Oct 03, 2018 9:07 am
by ganeshsambandam
Will @89:90 works for all the wizards like nrpe, NCPA etc?
Re: how to set warning disk usage alert between 89-90% a war
Posted: Wed Oct 03, 2018 9:44 am
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
Re: how to set warning disk usage alert between 89-90% a war
Posted: Wed Oct 03, 2018 10:44 am
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?
Re: how to set warning disk usage alert between 89-90% a war
Posted: Wed Oct 03, 2018 11:04 am
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
Re: how to set warning disk usage alert between 89-90% a war
Posted: Wed Oct 03, 2018 11:17 am
by lmiltchev
In this case, you could use "-w 88 -c 90".
Re: how to set warning disk usage alert between 89-90% a war
Posted: Mon Oct 22, 2018 6:07 am
by ganeshsambandam
If i use "-w 88 -c 90". will alert creates if usage is 89.5% ?
Re: how to set warning disk usage alert between 89-90% a war
Posted: Mon Oct 22, 2018 11:10 am
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