Xymon Mailing List Archive search

alert scripting

3 messages in this thread

list Kevin VerMeer · Tue, 11 Mar 2014 09:12:35 -0500 ·
In our hosts.cfg file, we include a NAME setting to standardize a naming convention for the several xymon clients.  In creating alert scripts, I would like to display this name, rather than the clients hostname.  Is this possible, without manually grepping through the hosts.cfg file?  It appears that BBHOSTNAME displays the hostname rather than the value set by name.
Suggestions appreciated.
list Galen Johnson · Tue, 11 Mar 2014 14:38:55 +0000 ·
You can do this with a custom script.  I believe there is a thrah in the archive for this but here is what I came up with to handle it:

XYMON_NAME=`$XYMON $XYMONSERVERHOSTNAME "hostinfo host=$BBHOSTNAME" | $SED -e 's/|/\n/g' | $GREP NAME | $CUT -d: -f2`

=G=
quoted from Kevin VerMeer

From: Xymon <xymon-bounces at xymon.com> on behalf of Kevin VerMeer <user-169ead9c8f04@xymon.invalid>
Sent: Tuesday, March 11, 2014 10:12 AM
To: xymon at xymon.com
Subject: [Xymon] alert scripting

In our hosts.cfg file, we include a NAME setting to standardize a naming convention for the several xymon clients.  In creating alert scripts, I would like to display this name, rather than the clients hostname.  Is this possible, without manually grepping through the hosts.cfg file?  It appears that BBHOSTNAME displays the hostname rather than the value set by name.
Suggestions appreciated.
list Kevin VerMeer · Tue, 11 Mar 2014 10:49:04 -0500 ·
Works like a charm.  Thanks.
quoted from Galen Johnson


From: Galen Johnson [mailto:user-87f955643e3d@xymon.invalid]
Sent: Tuesday, March 11, 2014 9:39 AM
To: Kevin VerMeer; xymon at xymon.com
Subject: RE: alert scripting

You can do this with a custom script.  I believe there is a thrah in the archive for this but here is what I came up with to handle it:

XYMON_NAME=`$XYMON $XYMONSERVERHOSTNAME "hostinfo host=$BBHOSTNAME" | $SED -e 's/|/\n/g' | $GREP NAME | $CUT -d: -f2`

=G=
From: Xymon <xymon-bounces at xymon.com> on behalf of Kevin VerMeer <user-169ead9c8f04@xymon.invalid>
Sent: Tuesday, March 11, 2014 10:12 AM
To: xymon at xymon.com
Subject: [Xymon] alert scripting

In our hosts.cfg file, we include a NAME setting to standardize a naming convention for the several xymon clients.  In creating alert scripts, I would like to display this name, rather than the clients hostname.  Is this possible, without manually grepping through the hosts.cfg file?  It appears that BBHOSTNAME displays the hostname rather than the value set by name.
Suggestions appreciated.