--On Thursday, August 24, 2006 13:58:49 +0200 Emilio Mira Alfaro
<[EMAIL PROTECTED]> wrote:
> Hi list,
>
> I'm trying to configure mon to alert when one of our routers interfaces
> flaps 3 times during 30 secs. I also would like mon not to send more
> than 1 alert every 30 minutes I came up with this config:
>
> watch mad_log_flapping
> service path_a
> description flapping on path_a
> period wd {Mon-Sun}
> alertafter 3 30s
> alertevery 30m
> #trapduration 30s
> alert mail.alert <email_address>
>
> I'm redirecting SNMP traps from the router to mon using snmptrap2mon.pl.
> The thing is that if I redirect linkUp and linkDown traps, the service
> never come down and mon never sends and alert even when there are more
> than 2 transitions (linkDown & linkUp). If only linkDown traps are
> redirected, mon sends the alerts as it should but the services is always
> down (it shows up on red on moncgi) after a flapping occurs, which
> bothers me. This is mainly because no linkUp traps are redirected. I've
> tried option "trapduration 30s" but on the lastet CVS release mon
> complains with "unknown syntax [trapduration 30s], line 59".
>
trapduration is a configuration option that belongs in a service
definition, but outside of a period definition. The current Mon code is
much more strict about options that are misplaced, where earlier versions
would just ignore those options.
> I'd like to have the service on green while there is no flapping and, if
> there is flapping (3 interface transitions during 30 secs), put in on red
> during 30 min and bring it back to green if no more flapping happens.
>
trapduration won't quite get you this behavior. When the trap status
expires the service will go back to the untested state, not the OK state.
This may be acceptable to you...
To get the behavior you describe you need to make snmptrap2mon.pl to send a
mon trap with status OK for linkUp traps, I suspect its currently sending
failure alerts for both linkDown and linkUp traps.
-David
_______________________________________________
mon mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/mon