Xymon Mailing List Archive search

CLIENT and/or COMMENT in email alert

2 messages in this thread

list Charles Phillips · Fri, 27 Sep 2013 07:03:05 -0400 ·
Is it possible to add the CLIENT or COMMENT tag of a host to the email 
alert?
list Jeremy Laidman · Mon, 30 Sep 2013 11:47:45 +1000 ·
quoted from Charles Phillips
On 27 September 2013 21:03, Charles Phillips <user-486f8d59b8d5@xymon.invalid> wrote:
Is it possible to add the CLIENT or COMMENT tag of a host to the email
alert?
I suspect that it's not possible without using a SCRIPT to generate the
email.  You could use xymongrep to pull out the hosts.cfg entry and parse
it for values for CLIENT and COMMENT.

Probably easier to parse the output of the "hostinfo" command for xymon,
like so:

$XYMON $XYMSRV 'hostinfo host=my.host.name'

Or use "xymondboard" to query and ask for the fields XMH_CLIENTALIAS
(CLIENT) and XMH_COMMENT, like so:

$XYMON $XYMSRV 'xymondboard
host=my.host.namefields=hostname,XMH_COMMENT,XMH_CLIENTALIAS' | head
-1

J