[smokeping-users] alerts question - AND operator?
Peter Kristolaitis
alter3d at alter3d.ca
Sat Aug 18 23:03:27 CEST 2007
Hi Steve;
Not sure if this is exactly what you're looking for, but there is a way
to limit which email(s) get sent out.
As of SmokePing 2.1.0, you can assign a priority setting to alerts.
From the SmokePing manual:
*priority*
if multiple alerts 'match' only the one with the highest priority
(lowest number) will cause and alert to be sent. Alerts without
priority will be sent in any case.
So what you could do is set up your rules like this:
+loss15
type = loss
pattern = >15%
comment = Some loss, poor performance, link still up
priority = 100
+loss50
type = loss
pattern = >50%
comment = Lots of loss, awful performance, link still up
priority = 50
+loss100
type = loss
pattern = >99%
comment = Link down.
priority = 0
This way, if your loss is e.g. 90%, both loss50 and loss15 will match,
but the priority rules mean that an alert only get sent out for the
loss50 alert.
Not sure if that's exactly what you're looking for, but I hope it helps!
- Peter
srj at netprl.com wrote:
> Hi, Is there an easy way to use a logical AND with smokeping alerts?
>
> For example, I'd like to send distinct alerts based on the following
> conditions:
>
> (loss > 15%) AND (loss < 50%) # Poor performance, circuit still up
> (loss >= 50%) AND (loss < 100%) # Awful performance, circuit still up
> (loss == 100%) # Circuit down
>
> The only documented operators I can find for the alerts section of the
> config file are:
>
> <,>,>=,<=,==S,* *,U,==,=!
>
> I guess I could do something like this:
>
> (loss < 100%) # Loss but circuit still up
> (loss == 100%) # Circuit down
>
> But then we wouldn't know how severe the loss is, and we would
> like to be able to differentiate.
>
> Thought I'd be lazy and ask first before putting time into this.
>
> Thanks!
> Steve 08/18/2007
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20070818/78c7d167/attachment.html
More information about the smokeping-users
mailing list