Page 1 of 1

check_snmp rate

Posted: Sun Dec 08, 2013 1:15 am
by gborbonus
Can anyone tell me how the rate system is calculating warn, critical or ok state?

I'm using it to check the mail queue status, if a flood comes in (huge change), I'd like to be notified.

So, I have:

/usr/local/nagios/libexec/check_snmp -t 20 -P 3 -L authPriv -a MD5 -x DES -U USERNAME -A PASS -X PASS -H HOST -o .1.3.6.1.4.1.2021.8.1.101.2 --rate -w 15 -c 30

Expected result:

If the mail queue suddenly jumps by 15 or more, warning state and if by 30 or more, critical state. Anything under 15 should be shown as OK.

Result:

Negative numbers, like: -0.0003333333 result in Critical state.
other times -3 will result in OK.

15 or more jump does show warning



Any ideas on what I can do to resolve this?

Re: check_snmp rate

Posted: Mon Dec 09, 2013 3:14 pm
by slansing
This may be what you are running into:
Rate Calculation:
In many places, SNMP returns counters that are only meaningful when
calculating the counter difference since the last check. check_snmp
saves the last state information in a file so that the rate per second
can be calculated. Use the --rate option to save state information.
On the first run, there will be no prior state - this will return with OK.
The state is uniquely determined by the arguments to the plugin, so
changing the arguments will create a new state file.
Are you sure there is not another check that may better serve your needs?

Re: check_snmp rate

Posted: Mon Dec 09, 2013 3:19 pm
by abrist
The historical rate numbers should be in:

Code: Select all

/usr/local/nagios/var/check_snmp/
Are they there and correct?
Additionally, you may want to set --rate-multiplier:
--rate-multiplier
Converts rate per second. For example, set to 60 to convert to per minute

Re: check_snmp rate

Posted: Tue Dec 10, 2013 10:40 pm
by gborbonus
hi,

I believe this is the best check I can use, unless I make one.

yes, the info is in /usr/local/nagios/var/check_snmp/



If you believe there is a better method to check the change rate, please let me know

Re: check_snmp rate

Posted: Wed Dec 11, 2013 4:12 pm
by abrist
What version of check_snmp are you running?

Code: Select all

/usr/local/nagios/libexec/check_snmp -V