[Xymon] Issue with macro expansion in alerts.cfg and "SCRIPT" inside the macro

Axel Beckert abe at deuxchevaux.org
Tue May 21 15:53:38 CEST 2019


Hi,

from my alerts.cfg:

----------------------------------------------------------------------
$TGSEND=/usr/local/bin/xymon-telegram-bot-send-to
$AXELTG=365653126

HOST=mehari EXSERVICE=libs,dirtyvcs,sftbnc,misc
    SCRIPT $TGSEND $AXELTG DURATION>15 RECOVERED REPEAT=24h COLOR=red,yellow FORMAT=TEXT
    SCRIPT $TGSEND $AXELTG             RECOVERED REPEAT=24h COLOR=purple     FORMAT=TEXT
----------------------------------------------------------------------

This works and already uses wormacros.

After reading "In fact, you can put an entire line into a macro" on
https://www.xymon.com/help/xymon-alerts.html#scripts
I tried this:

----------------------------------------------------------------------
$TGSEND=SCRIPT /usr/local/bin/xymon-telegram-bot-send-to
$AXELTG=365653126

HOST=mehari EXSERVICE=libs,dirtyvcs,sftbnc,misc
    $TGSEND $AXELTG DURATION>15 RECOVERED REPEAT=24h COLOR=red,yellow FORMAT=TEXT
    $TGSEND $AXELTG             RECOVERED REPEAT=24h COLOR=purple     FORMAT=TEXT
----------------------------------------------------------------------

But it silently failed to send out any alert. Nothing in
/var/log/xymon/alert.log nor in /var/log/xymon/notifications.log.

And I don't understand why. Is this a bug in macro expansion? Or do
macros only work for either complete lines or single words, but not
multiple words?

		Kind regards, Axel
-- 
PGP: 2FF9CD59612616B5      /~\  Plain Text Ribbon Campaign, http://arc.pasp.de/
Mail: abe at deuxchevaux.org  \ /  Say No to HTML in E-Mail and Usenet
Mail+Jabber: abe at noone.org  X
https://axel.beckert.ch/   / \  I love long mails: https://email.is-not-s.ms/


More information about the Xymon mailing list