[Xymon] Advanced HTML Mail Alert Perl script

Brandon Dale BDale at kitchengroup.com.au
Wed Mar 23 21:51:28 CET 2016


Both those changes would be nice, I know in one of the older versions I ended up just changing the https and bb-hostvc reference in the script.

I also noticed:


1.       Looks better if you add a new line character after the message and before the event duration bit at the bottom.


<PRE>$BBHTMLMSG\n\n$RECOEVENT Event Duration Time:  $DOWNSECS Secs\n</PRE>\n</FONT>\n</BODY>";


2.       I don't know perl at all so this might just be me not understanding how this should work, in the changes for 2.0 "..Colorstatus depends on BBALPHAMSG for Recover Status.." how does this work ? I tried it on a test machine against the svcs test where red is bad green is good and I got two emails with subjects like this:

Xymon [846968] testserver01.svcs CRITICAL (RED)

Xymon [] testserver01.svcs Recovered to (TESTSERVER01:SVCS)

                I didn't quite understand the subject is the second email, is the idea that the colour has been removed so it doesn't confuse people if the OK colour is for example yellow?


3.       Might not be something others want as It's pretty dependant on the setup, but in one of the older versions we made some changes to the subject line so it would say CRITICAL for red WRANING for yellow STOPPED REPORTING for purple etc as from memory it would use the word CRITICAL by default for most things which we didn't like. I think (not knowing perl syntax, and spending only about 5 minutes) got a similar thing working here

Changed my $SUBJECT="CRITICAL"; to $SUBJECT="Unkown Status";

Under sub parse_info added:

if($BBCOLORLEVEL eq "red"){$SUBJECT="CRITICAL"}
if($BBCOLORLEVEL eq "yellow"){$SUBJECT="WARNING"}
if($BBCOLORLEVEL eq "purple"){$SUBJECT="Stopped Reporting"}

Also just wanted to say thanks for uploading this Helge it's a really nice improvement especially for people using outlook.

Regards,

Brandon.

From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Andrey Chervonets
Sent: Thursday, 24 March 2016 4:26 AM
To: Andrey Chervonets <A.Chervonets at cominder.eu>
Cc: xymon at xymon.com
Subject: Re: [Xymon] Advanced HTML Mail Alert Perl script

Another note:  the link generated does not reflect real  web-server URL.

For example, we use:
HTTPS  instead of HTTP
special port, instead of default one.

It would be nice script could read UTL starter from some config file


Best regards,

Andrey Chervonets
----------------------
SIA CoMinder
http://www.cominder.eu/




From:        Andrey Chervonets/Cominder/LV
To:        xymon at xymon.com<mailto:xymon at xymon.com>
Date:        23.03.2016 19:20
Subject:        Re: Advanced HTML Mail Alert Perl script
________________________________


I have tested it on xymon 4.3.17 - working good, but some notes:

It generated at mail body start the link like:

See http://hostname/xymon-cgi/bb-hostsvc.sh?HOST=target_host&SERVICE=disk

But there is no bb-hostsvc.sh  on server.

But instead we have svcstatus.sh  . Whether it was changes to bb-hostsvc.sh   in latest xymon versions?
Or perl sript version on xymonton is just fork of addon for older versions ?


Best regards,

Andrey Chervonets
----------------------
SIA CoMinder
http://www.cominder.eu/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160323/6312c066/attachment.html>


More information about the Xymon mailing list