check_snmp rate

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gborbonus
Posts: 2
Joined: Sun Dec 08, 2013 1:08 am

check_snmp rate

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_snmp rate

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_snmp rate

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
gborbonus
Posts: 2
Joined: Sun Dec 08, 2013 1:08 am

Re: check_snmp rate

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_snmp rate

Post by abrist »

What version of check_snmp are you running?

Code: Select all

/usr/local/nagios/libexec/check_snmp -V
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked