Xymon Mailing List Archive search

IP of host in mail subject

2 messages in this thread

list Gabo Suárez · Mon, 30 Jul 2018 14:35:19 -0500 ·
 Hi greetings from Ecuador,


Please your help, I need that the XYMON monitoring mails include the IP of
the host-client


How do i do it?


*Gabriel Suárez*
list Jeremy Laidman · Sat, 4 Aug 2018 21:30:09 +1000 ·
On 31 July 2018 at 05:35, Gabo Suárez <user-9fd710edf0d1@xymon.invalid> wrote:
Hi greetings from Ecuador,
Hello Gabo
quoted from Gabo Suárez

Please your help, I need that the XYMON monitoring mails include the IP of
the host-client
How do i do it?
The IP address of the client is in the variable $MACHIP. I think this
variable is only available to scripts, not the standard MAIL function. To
do this, you can create a script that sends an email.

For example, use this in alerts.cfg:

HOST=client.host.name
    SCRIPT /usr/local/bin/mailscript placeholder FORMAT=TEXT

Then create a script that goes something like this:

#!/bin/sh
mail -s "$BBHOSTNAME $BBSVCNAME - $BBCOLORLEVEL $ACKCODE $RECOVERED
$DOWNSECMSG" $RCPT <<EOF
$BBALPHAMSG
IP is $MACHIP
EOF

For more information about the Xymon alert environment variables, check out
the Alerts documentation:

http://xymon.sourceforge.net/xymon/help/xymon-alerts.html

 and the alerts.cfg man page:

http://xymon.sourceforge.net/xymon/help/manpages/man5/alerts.cfg.5.html

J