[Xymon] alert using global variable instead of command configured in xymonserver.cfg

J.C. Cleaver cleaver at terabithia.org
Thu Oct 29 16:16:30 CET 2015


On Thu, October 29, 2015 8:22 am, Jesse Johnson wrote:
> After upgrade to 4.3.21 the global mail variable is being used instead of
> the custom command configured inside of xymonserver.cfg
>
> from xymoneserver.cfg:
>
> # For the xymond_alert module
> MAIL="sendmail -f XYMON -s"                             # Command used to
> send an e-mail with a subject
> MAILC="sendmail -f XYMON "                              # Command used to
> send an e-mail with no subject
>
>
>
> from xymond_alert:
>
> xymon at zeus:/usr/local/xymon/server/bin$ ./xymond_alert --test 111-KMC454E
> conn
*snip*
> 00003362 2015-10-29 08:54:14 Mail alert with command '/var/mail/xymon
> "Xymon [12345] 111-KMC454E:conn CRITICAL (RED)" peter.becker at chl.cc'
> xymon at zeus:/usr/local/xymon/server/bin$
>
>
> After setting Global MAIL variable manually:
>
> xymon at zeus:/usr/local/xymon/server/bin$ MAIL="sendmail -f XYMON"
> xymon at zeus:/usr/local/xymon/server/bin$ ./xymond_alert --test 111-KMC454E
> conn
*snip*
> 00003489 2015-10-29 08:56:51 Mail alert with command 'sendmail -f XYMON
> "Xymon [12345] 111-KMC454E:conn CRITICAL (RED)" peter.becker at chl.cc'
> xymon at zeus:/usr/local/xymon/server/bin$


Hi Jesse,

Are you running xymond_alert in a shell that's already loaded the
xymonserver.cfg environment? Typically xymond_alert (and xymond_anything)
are run via xymonlaunch, which loads those configs into the environment
before executing. Without it, it's simply looking in your shell's normal
$MAIL variable (which on some systems is just the directory...)


For testing like this, use:
xymoncmd --env=(/path/to/)xymonserver.cfg ./xymond_alert --test
111-KMC454E conn

If your xymonserver.cfg file is in a "standard" location, you may not need
to specify the --env by hand.


HTH,

-jc




More information about the Xymon mailing list