[Xymon] Question on controlling alerts.

Ralph M ralphmitchell at gmail.com
Wed Jul 1 07:00:19 CEST 2020


This may not be the best way, but what I do for filesystems and processes
is to use SCRIPT as the alert method.  The script is handed the entire
content of the message that triggered the alert in the BBALPHAMSG
environment variable.  If you take a look at the
xymon/server/etc/alerts.cfg file you'll see a list of all the other
environment variables that get passed.

I currently have the following filesystems alerting for a server:

&yellow /archive (94% used) has reached the WARNING level (90%)
&yellow /stuff (90% used) has reached the WARNING level (90%)

In the web page display, the &yellow is replaced by the yellow dot image,
but in BBALPHAMSG it's as above.  So, in bash:

     YELLOW=`echo "$BBALPHAMSG" | grep &yellow | sed -e 's/&yellow //'`
     RED=`echo "$BBALPHAMSG" | grep &red | sed -e 's/&red //'`

separates out the red and yellow tagged filesystems and removes the color.
I can then iterate through each list looking at the first word on each line
to see which filesystem has a problem and then spit out an appropriate
message to whomever needs to be informed.  You can use whatever programming
language you're comfortable with, as long as you can access BBALPHAMSG in
the environment.

Ralph Mitchell




On Wed, Jul 1, 2020 at 12:27 AM Jacob P Jordan <jacob at shadowsoft.com> wrote:

> If I have multiple files being checked or multiple services being
> checked how do I control alerts for a specific item.  Such as two
> processes:  Process1 and Process2.  One of them goes red.  How do I send
> an alert based on the correct item.  Is it indexed or something.  I have
> looked in forums and email history for last several years but have not
> found how to do this?
>
> Thanks Paul Jordan
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200701/111f3654/attachment.htm>


More information about the Xymon mailing list