Xymon Mailing List Archive search

unset 'testip' per-host after using in .default.

2 messages in this thread

list John Thurston · Fri, 28 Jun 2024 09:14:31 -0800 ·
The 'testip' tag tells xymonnet to "use the IP listed in the hosts.cfg 
file", rather than performing a lookup in DNS of the hostname.

It can be included in a .default. line. But once it is in that .default. 
line, I can not find a way to disable 'testip' for a single host.

Is there a way to do this?

-- 
--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska
list Adam Thorn · Fri, 28 Jun 2024 20:25:46 +0100 ·
quoted from John Thurston
On 28/06/2024 18:14, John Thurston wrote:
The 'testip' tag tells xymonnet to "use the IP listed in the hosts.cfg file", rather than performing a lookup in DNS of the hostname.

It can be included in a .default. line. But once it is in that .default. line, I can not find a way to disable 'testip' for a single host.

Is there a way to do this?
Whilst not documented, a little experimentation suggests you can just have multiple .default. lines in host.cfg, with each one applying to all the lines that follow until you redefine the .default. host: I generally expect xymon config files to be parsed fairly straightforwardly from top to bottom. So, e.g.

# set my defaults
0.0.0.0 .default. # tag1 tag2 tag3

#
# list of hosts that will have tag1, tag2, tag3
#

# tempoarily clear all default tags

0.0.0.0 .default. #

# next host will only have tag4, not tag1-3

1.2.3.4 special.example.com # tag4

# and now put the original defaults back in place

0.0.0.0 .default. # tag1 tag2 tag3

#
# keep listing more hosts....
#

Adam