I think Adam's solution is probably the best fit for your needs.

However, if you need a bit more flexibility (eg if adding BLUE to ALERTCOLORS causes blue dots to show on your "Current non-green systems" page, as if they were active faults), there may be (ie, I have not tested) another solution.  You can use the "xymond_channel" binary to tap into the "stachg" (status change) channel, filtering for any event that changes colour from red to blue or from blue to red (or any other transition you're interested in). The following command waits for such events, and for each it spits out the associated status message that you might use in an email message:

$ sudo -u xymon xymoncmd xymond_channel --channel=stachg --metafilter='\|(blue\|red|red\|blue)\|' cat

Here I'm using "cat" to send the message stream into, just for demonsting. You would want to replace "cat" with a script that extracts the text between lines matching regex /^@@/ and inject them into an email program.

There might be a way to redirect this output back into to Xymon on the "page" channel, which then allows your existing alerts.cfg configuration to be used for managing your emails in the same way you would for red alerts, etc. However I suspect there will be limited features (eg there isn't a DELAYBLUE option) or work-arounds required (eg specifying a colour of "!red,!yellow,!purple" to match "blue" events?)

J

On Tue, 3 Dec 2024 at 07:53, Grant Taylor via Xymon <xymon@xymon.com> wrote:
On 12/2/24 1:06 PM, Adam Thorn via Xymon wrote:
> This isn't functionality I make use of so read the following as "a
> thought that might or might not be useful" rather than "this will
> definitely work".

Understood.  I'm treating this as "something I found on a mailing list
that I'm going to try and see if it helps".  Emphasis on "I" and "try".
Meaning that I'm responsible for any side effects, not you.  ;-)

> I suspect you should look at the values of:
>
> ALERTCOLORS : Comma-separated list of the colors that may trigger an
> alert-message.  The default is "red,yellow,purple".
>
> OKCOLORS : Comma-separated list of the colors that may trigger a
> recovery-message.  The default is "green,clear,blue"
>
> ...as defined in your xymonserver.cfg (and I've quoted from man
> xymonserver.cfg). Taking blue out of OKCOLORS and adding it to
> ALERTCOLORS is probably required for what you want (and then restart
> xymond), but that might also have unexpected effects on your other rules
> in alerts.cfg unless you've been careful to always specify a COLOR on
> those.

I think I understand.

It sounds like I want to try treating BLUE as a color that should alert
/ have reminders sent out about.

As such, changing from alert able BLUE to non-alert able GREEN should
cause a recovered email to be sent.

Thank you Adam, that is both something specific to read up on and what I
was asking for.  :-)



--
Grant. . . .
unix || die

_______________________________________________
Xymon mailing list -- xymon@xymon.com
To unsubscribe send an email to xymon-leave@xymon.com