2

I am SNMP polling a router and checking the amount of errors on an interface. Since SNMP counters can not be cleared on the device I am storing the last value received in a temp file. If there is an increase in the current polled value from the last I would like to set an alarm. Obviously after the second iteration of this the last seen value will then become the current value. For this reason I want to be able to hold an alarm until acknowledgment and then return back to the OK state. For example assume I got these values (polled every 30 seconds):

10, 10, 10, 30, 30, 30, ....

There is obviously no alarm set between the first and second values since there is no delta. Between the second and third we are still good. Between three and four there is a delta and an alarm needs to be set. Now between four and five there is no delta but I need to hold the alarm from the last time (since it would not make sense to set an alarm for 30 seconds).

1
  • Use something other than nagios to collect the data into an RRD (mrtg?). Setup a nagios alert to check the RRD if there is a spike of errors in the RRD in the last hour/day/whatever?
    – Zoredache
    Jun 18, 2013 at 16:43

1 Answer 1

0

There are existing scripts that do exactly what you need.

check_snmp_int.pl, for example, can do it. You may also be able to use any of a handful of other SNMP-based variants in this category.

There might also be something specifically written for the type of hardware you're using.

1
  • 1
    regarding the manubulon plugins - they got problems with recent net snmp perl libs. therefore i'm keeping an unofficial cvs2git import with some collected patches here: github.com/dnsmichi/manubulon-snmp
    – dnsmichi
    Jun 18, 2013 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .