[Xymon] SMS to long

Jeremy Laidman jlaidman at rebel-it.com.au
Thu Aug 15 03:21:37 CEST 2013


On 14 August 2013 22:36, Dirk Kastens <dirk.kastens at uni-osnabrueck.de>wrote:

> OK, but this would only work with an external script. We use MAIL with
> FORMAT=sms. Meanwhile we have shortened the URL that is tested by xymon.
> Now we are below the 160 character limit.


You could change from MAIL to SCRIPT, and have the script call $MAIL for
you, after shortening URLs or whatever you wanted.

Or you could redefine MAIL (in xymonserver.cfg) to do a similar thing.  The
example below will remove the first URL it finds, plus anything after the
first 160 chars of what's left, and finally it will ensure that the last
character is a newline (as some MTAs or MUAs might expect this to be the
case):

MAILC="/usr/bin/sed 's,https://[^ ]* ,,' | /bin/dd bs=1 count=160
2>/dev/null | /usr/bin/sed '$s/.$/\n/' | mail"

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130815/3fb55e53/attachment.html>


More information about the Xymon mailing list