Thresholds for SNMP Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Thresholds for SNMP Monitoring

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Thresholds for SNMP Monitoring

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Re: Thresholds for SNMP Monitoring

Post 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.
Last edited by mkeey on Tue Jun 25, 2019 8:00 am, edited 1 time in total.
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Re: Thresholds for SNMP Monitoring

Post 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;
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Thresholds for SNMP Monitoring

Post by tgriep »

Yes, that would work as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Re: Thresholds for SNMP Monitoring

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Thresholds for SNMP Monitoring

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Re: Thresholds for SNMP Monitoring

Post by mkeey »

I guess we are sort of at an impasse. You can close this thread. Thanks for your time & assistance - MKeey
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Thresholds for SNMP Monitoring

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked