<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Steve;<br>
<br>
Not sure if this is exactly what you're looking for, but there is a way
to limit which email(s) get sent out.<br>
<br>
As of SmokePing 2.1.0, you can assign a priority setting to alerts.
>From the SmokePing manual:<br>
<br>
<dl>
<dt><strong>priority</strong></dt>
<dd>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.</dd>
</dl>
So what you could do is set up your rules like this:<br>
<br>
+loss15<br>
type = loss<br>
pattern = >15%<br>
comment = Some loss, poor performance, link still up<br>
priority = 100<br>
+loss50<br>
type = loss<br>
pattern = >50%<br>
comment = Lots of loss, awful performance, link still up<br>
priority = 50<br>
+loss100<br>
type = loss<br>
pattern = >99%<br>
comment = Link down.<br>
priority = 0<br>
<br>
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.<br>
<br>
Not sure if that's exactly what you're looking for, but I hope it helps!<br>
<br>
- Peter<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:srj@netprl.com">srj@netprl.com</a> wrote:
<blockquote
cite="mid:Pine.LNX.4.58.0708181209490.4449@halaxy.netprl.com"
type="cite">
<pre wrap="">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
<a class="moz-txt-link-abbreviated" href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.ch</a>
<a class="moz-txt-link-freetext" href="https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users">https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users</a>
</pre>
</blockquote>
</body>
</html>