[Xymon] unset 'testip' per-host after using in .default.

Adam Thorn alt36 at cam.ac.uk
Fri Jun 28 21:25:46 CEST 2024


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


More information about the Xymon mailing list