On 31 July 2018 at 05:35, Gabo Suárez <jgsuareza1984 at gmail.com> wrote:
Hi greetings from Ecuador,
Hello Gabo
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