[Xymon] Insert a newline into your custom xymon message?

Gabby Gibbons gabby.gibbons at yahoo.com
Thu Sep 24 19:28:15 CEST 2020


 These all worked beautifully, thank you everyone. I think I will go with the echo -en at the xymon call, that seems to be the cleanest way to do it.
    On Thursday, September 24, 2020, 11:24:55 AM EDT, Scot Kreienkamp <scot.kreienkamp at la-z-boy.com> wrote:  
 
 #yiv3793110492 #yiv3793110492 -- _filtered {} _filtered {} _filtered {}#yiv3793110492 #yiv3793110492 p.yiv3793110492MsoNormal, #yiv3793110492 li.yiv3793110492MsoNormal, #yiv3793110492 div.yiv3793110492MsoNormal {margin:0in;font-size:11.0pt;font-family:sans-serif;}#yiv3793110492 a:link, #yiv3793110492 span.yiv3793110492MsoHyperlink {color:blue;text-decoration:underline;}#yiv3793110492 span.yiv3793110492EmailStyle19 {font-family:sans-serif;color:windowtext;}#yiv3793110492 .yiv3793110492MsoChpDefault {font-size:10.0pt;} _filtered {}#yiv3793110492 div.yiv3793110492WordSection1 {}#yiv3793110492 
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  | facebook.com/lazboy  | twitter.com/lazboy | youtube.com/lazboy


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> 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
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. 
_______________________________________________
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/20200924/b1d07f15/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: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200924/b1d07f15/attachment-0001.jpg>


More information about the Xymon mailing list