<div class="gmail_quote">On 1 August 2011 16:37, Henrik Størner <span dir="ltr"><<a href="mailto:henrik@hswn.dk" target="_blank">henrik@hswn.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 01-08-2011 17:14, Henrik Størner wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
On 05-07-2011 11:58, Heather Keen wrote:<br>
</div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've tried lots of different configuration options, and the only<br>
conclusion I can come to is that recovery messages to GROUPs do not<br>
work. :(<br>
</blockquote>
<br>
It's certainly not what you would expect - must agree with that. But<br>
solving it is not quite as easy as one would expect.<br>
</div></blockquote>
<br>
After looking at this once again, I actually think there is a very simple solution to this after all. If we don't check the GROUP rules at all for recovery-messages (i.e. any group setting will match), then xymond_alert will consider all the possible recipients. However, there is another check so it only sends recovery-messages to those recipients that actually did receive the alert. So I think the attached patch should solve this.<br>


<br>
Regards,<br>
Henrik<br>
</blockquote></div><br><div>Henrik,<div><br></div><div>I've been doing a bit more testing with alerts using GROUPS, and I've discovered a slight flaw with this solution, when you are using SCRIPT as the recipient rather than MAIL.  Because it doesn't check the GROUP when it sends a RECOVERED message, you can end up getting multiple RECOVERED messages sent to the same person.  (tested with v4.3.7)</div>

<div><br></div><div>For example:</div><div><br></div><div>GROUP=A SERVICE=procs RECOVERED COLOR=red</div><div>     SCRIPT /home/xymon/server/ext/sms_notification 447777123456 FORMAT=SMS DURATION>5</div><div><div>GROUP=B SERVICE=procs RECOVERED COLOR=red</div>

</div><div><div>     SCRIPT /home/xymon/server/ext/sms_notification 447777123456 FORMAT=SMS DURATION>10</div><div></div></div><div><br></div><div>So you've got two groups of machines, each having the same recipient, but needing a different alert delay.</div>

<div>Now, if procs goes red on a machine in group A, the red alert is handled fine, but when it recovers, 447777123456 actually gets two   recovery messages.</div><div><br></div><div>Note this only happens if the recipient is a SCRIPT command, it works fine if you use MAIL recipients.</div>

<div><br></div><div>Help!</div><div><br></div><div>Cheers,</div><div>Heather</div></div>