[Xymon] Insert a newline into your custom xymon message?
Scot Kreienkamp
Scot.Kreienkamp at la-z-boy.com
Thu Sep 24 17:19:12 CEST 2020
Xymon will display HTML inline, so you can do anything HTML. The emails it sends out are plain text by default though, so you would see any html code there.
You can try this:
MSG=”${MSG}\nAppended text”
Then your submit command would be like this:
$XYMON $XYMSERVERS "status+20 $HOSTNAME.$TESTNAME $COLOR `date` $STATUS
$(echo -e ${MSG})
“
Echo -e would interpret the newline and actually insert it at that point.
Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive | Monroe, Michigan 48162 | • 734-384-6403 | | • 1-734-915-1444 | • Scot.Kreienkamp at la-z-boy.com
www.la-z-boy.com<http://www.la-z-boy.com> | facebook.com/lazboy<http://facebook.com/lazboy> | twitter.com/lazboy<http://twitter.com/lazboy> | youtube.com/lazboy<http://youtube.com/lazboy>
[cid:4C-lzbVertical_Tag_400px_d8b9412e-f3ea-46a1-99dc-a7c57261e11e.jpg]
From: Xymon <xymon-bounces at xymon.com> On Behalf Of Jeremy Ruffer
Sent: Thursday, September 24, 2020 11:14 AM
To: Adam Goryachev <mailinglists at websitemanagers.com.au>
Cc: xymon <xymon at xymon.com>
Subject: Re: [Xymon] Insert a newline into your custom xymon message?
ATTENTION: This email was sent to La-Z-Boy from an external source. Be vigilant when opening attachments or clicking links.
I'm wondering if </br> would do it.
Jeremy
On Thu, 24 Sep 2020, 15:36 Adam Goryachev, <mailinglists at websitemanagers.com.au<mailto:mailinglists at websitemanagers.com.au>> wrote:
On 24/9/20 23:16, Gabby Gibbons via Xymon wrote:
Hello,
I'm wondering if there's any way to insert a newline in a message. I know it's possible to do by actually putting it on another line in the script but I don't like the way that it looks because it messes up all the indenting in the script, so that's why I was wondering if there's a newline character that xymon supports, \n doesn't work it just append a literal "\n".
An example of the way I can get it to work, but looks bad:
MSG="${MSG}
appended text"
How I would like it work:
MSG="${MSG}\nappended text"
What about:
MSG=`echo -en "${MSG}\nappended text\n"`
Regards,
Adam
--
_______________________________________________
Xymon mailing list
Xymon at xymon.com<mailto:Xymon at xymon.com>
http://lists.xymon.com/mailman/listinfo/xymon
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200924/232e4845/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4C-lzbVertical_Tag_400px_d8b9412e-f3ea-46a1-99dc-a7c57261e11e.jpg
Type: image/jpeg
Size: 591045 bytes
Desc: 4C-lzbVertical_Tag_400px_d8b9412e-f3ea-46a1-99dc-a7c57261e11e.jpg
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200924/232e4845/attachment-0001.jpg>
More information about the Xymon
mailing list