Xymon Mailing List Archive search

GROUPs and recovery alerts

list Heather Keen
Thu, 19 Jan 2012 16:47:11 +0000
Message-Id: <user-7a95be3f3844@xymon.invalid>

On 1 August 2011 16:37, Henrik Størner <user-ce4a2c883f75@xymon.invalid> wrote:
On 01-08-2011 17:14, Henrik Størner wrote:
On 05-07-2011 11:58, Heather Keen wrote:
I've tried lots of different configuration options, and the only
conclusion I can come to is that recovery messages to GROUPs do not
work. :(
It's certainly not what you would expect - must agree with that. But
solving it is not quite as easy as one would expect.
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.

Regards,
Henrik
Henrik,

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)

For example:

GROUP=A SERVICE=procs RECOVERED COLOR=red
     SCRIPT /home/xymon/server/ext/sms_notification 447777123456 FORMAT=SMS
DURATION>5
GROUP=B SERVICE=procs RECOVERED COLOR=red
     SCRIPT /home/xymon/server/ext/sms_notification 447777123456 FORMAT=SMS
DURATION>10

So you've got two groups of machines, each having the same recipient,
but needing a different alert delay.
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.

Note this only happens if the recipient is a SCRIPT command, it works fine
if you use MAIL recipients.

Help!

Cheers,
Heather