Page 1 of 1

Thresholds for SNMP Monitoring

Posted: Mon Jun 24, 2019 10:26 am
by mkeey
Want to monitor free space using SNMP on some AIX servers.

Did an SNMP Walk and got the values for the "/" directory...
Total = 2048
Free = 1591

We want to alert at...
Warning = 10% or Free = 205
Critical = 5% or Free = 103

Coded a monitor and it went critical immediately...

[[email protected] ~]$ /usr/local/nagios/libexec/check_snmp -H 10.180.199.40 -o 1.3.6.1.4.1.2.6.191.6.2.1.6.1 -P 3 --seclevel=authPriv --secname=USER --authproto=md5 --authpasswd='AUTHPASSWORD' --privpasswd='PRIVPASSWD' --privproto=des -l "Free Space "/"" -m IBM-AIX-MIB.mib -w 204 -c 102
SNMP CRITICAL - Free Space / *1591* | 'Free Space /'=1591;204;102;

Thought that Nagios may be looking at how much disk is being used versus how much is free, so we reversed our logic...

[[email protected] ~]$ /usr/local/nagios/libexec/check_snmp -H 127.0.0.1 -o 1.3.6.1.4.1.2.6.191.6.2.1.6.1 -P 3 --seclevel=authPriv --secname=USER --authproto=md5 --authpasswd='AUTHPASSWORD' --privpasswd='PRIVPASSWD' --privproto=des -l "Free Space "/"" -m IBM-AIX-MIB.mib -w 1843 -c 1945
SNMP OK - Free Space / 1591 | 'Free Space /'=1591;1843;1945;

But, we have no way to know if this is correct or not. Don't feel like creating a 1800 MB file to see if it alerts or not.

Then read something about using a colon in the thresholds and tried this...

[[email protected] ~]$ /usr/local/nagios/libexec/check_snmp -H 127.0.0.1 -o 1.3.6.1.4.1.2.6.191.6.2.1.6.1 -P 3 --seclevel=authPriv --secname=USER --authproto=md5 --authpasswd='AUTHPASSWD' --privpasswd='PRIVPASSWD' --privproto=des -l "Free Space "/"" -m IBM-AIX-MIB.mib -w 204:10 -c 102:5
SNMP OK - Free Space / 1591 | 'Free Space /'=1591;204;102;

That's the same output as the first attempt but it didn't go Critical. Still, I don't know if this is working as desired.

Re: Thresholds for SNMP Monitoring

Posted: Mon Jun 24, 2019 2:31 pm
by tgriep
You want to get a Warning if the free space goes below 205 and a Critical is the free space goes below 105, it that correct?
If you, you would have to set the thresholds like the following.

Code: Select all

-w :204 -c @0:102
This should generate a warning less than 205 and a critical if the value is between 0 and 102.

Re: Thresholds for SNMP Monitoring

Posted: Tue Jun 25, 2019 6:45 am
by mkeey
Ok, I tried your suggestion and got a warning message...

[[email protected] ~]$ /usr/local/nagios/libexec/check_snmp -H HOSTIPADDR -o 1.3.6.1.4.1.2.6.191.6.2.1.6.1 -P 3 --seclevel=authPriv --secname=USER --authproto=md5 --authpasswd='AUTHPASSWD' --privpasswd='PRIVPASSWD' --privproto=des -l "Free Space "/"" -m IBM-AIX-MIB.mib -w :204 -c @0:102
SNMP WARNING - Free Space / *1591* | 'Free Space /'=1591;204;102;

I shouldn't have as the free space is way over 204.

Re: Thresholds for SNMP Monitoring

Posted: Tue Jun 25, 2019 8:00 am
by mkeey
Would this be better?

[[email protected] ~]$ /usr/local/nagios/libexec/check_snmp -H HOSTIPADDR -o 1.3.6.1.4.1.2.6.191.6.2.1.6.1 -P 3 --seclevel=authPriv --secname=USER --authproto=md5 --authpasswd='AUTHPASSWD' --privpasswd='PRIVPASSWD' --privproto=des -l "Free Space "/"" -m IBM-AIX-MIB.mib -w 204:103 -c 102:0
SNMP OK - Free Space / 1591 | 'Free Space /'=1591;204;102;

Re: Thresholds for SNMP Monitoring

Posted: Tue Jun 25, 2019 9:43 am
by tgriep
Yes, that would work as well.

Re: Thresholds for SNMP Monitoring

Posted: Mon Jul 15, 2019 8:15 am
by mkeey
This seems to work well but the end user is pushing for a percentage versus and specific MB value. Is there a way to do percentages? IE: 90% Warning, 95% Critical instead of the current 200:100 Warning and 99:0 Critical.

Re: Thresholds for SNMP Monitoring

Posted: Mon Jul 15, 2019 9:12 am
by tgriep
For percentages, a custom plugin would have to be created as it will have to get the various values from the system and calculate the percentages for you.
I did not find a plugin specifically written for AIX systems but you may find one to modify.

Re: Thresholds for SNMP Monitoring

Posted: Wed Jul 17, 2019 6:20 am
by mkeey
I guess we are sort of at an impasse. You can close this thread. Thanks for your time & assistance - MKeey

Re: Thresholds for SNMP Monitoring

Posted: Wed Jul 17, 2019 6:37 am
by scottwilkerson
mkeey wrote:I guess we are sort of at an impasse. You can close this thread. Thanks for your time & assistance - MKeey
Locking