[Xymon] Variables in config files

Scot Kreienkamp Scot.Kreienkamp at la-z-boy.com
Wed May 16 20:13:52 CEST 2018


As a followup, the other problem with the .default line is that it ignores any custom tags that I have on the hosts.  I have custom tags on many hosts that I use with custom tests and xymongrep, and the custom tags on .default lines are never matched.


Scot Kreienkamp |Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive| Monroe, Michigan 48162 | Office: 734-384-6403 | | Mobile: 7349151444 | Email: Scot.Kreienkamp at la-z-boy.com
From: Scot Kreienkamp
Sent: Wednesday, May 16, 2018 1:54 PM
To: 'xymon >> xymon at xymon.com' <xymon at xymon.com>
Subject: Variables in config files

Hi everyone,

Is there a way to define a line or part of a line as a variable in the config files, then use that variable in other places, other than the .default line?  I know it's possible in alerts, but how about hosts.cfg and hosts.d/*, or analysis.cfg and analysis.d/*?

For example, like this:

$DOWNTIME='DOWNTIME=*:6:2200:2359:Scheduled maintenance,*:0:0000:0400:Scheduled maintenance'


0.0.0.0   test1.lzb.hq # $DOWNTIME

0.0.0.0   test2.lzb.hq # $DOWNTIME



Yes, I realize I could use the .default line, but I can't set that once then have that available everywhere.  If I change it later in the config then it won't be available to the rest of the config yet to come.  For the variables I'd like to be able to set the variable and have it available throughout the entire config.  That way I only have to change it in one place.  Right now I have the .default line duplicated many times in my config, and if I have to make a change to them all it starts to become a lot of work.



Thanks!

Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive | Monroe, Michigan 48162  | * 734-384-6403 | | * 7349151444 | *  Scot.Kreienkamp at la-z-boy.com<mailto:%7BE-mail%7D>
www<http://www.la-z-boy.com/>.la-z-boy.com<http://www.la-z-boy.com/> | facebook.<https://www.facebook.com/lazboy>com<https://www.facebook.com/lazboy>/<https://www.facebook.com/lazboy>lazboy<http://facebook.com/lazboy> | twitter.com/lazboy<https://twitter.com/lazboy> | youtube.com/<https://www.youtube.com/user/lazboy>lazboy<https://www.youtube.com/user/lazboy>

[cid:image001.jpg at 01D3ED20.1BE22C20]



This message is intended only for the individual or entity to which it is addressed.  It may contain privileged, confidential information which is exempt from disclosure under applicable laws.  If you are not the intended recipient, you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information.  If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20180516/eb5395ba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 21288 bytes
Desc: image001.jpg
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20180516/eb5395ba/attachment.jpg>


More information about the Xymon mailing list