Yes! There are two ways to do this.
- Set testip globally for everything in hosts.cfg.
At the top of the hosts.cfg you would set this rule:
0.0.0.0 .default. # testip
- Configure xymonnet for different DNS behavior. From the xymonnet man page:
--dns=[ip|only|standard] Determines how xymonnet finds the IP adresses of the hosts to test. By default (the "standard"), xymonnet does a DNS lookup of the hostname to determine the IP address, unless the host has the "testip" tag, or the DNS lookup fails. With "--dns=only" xymonnet will ONLY do the DNS lookup; if it fails, then all services on that host will be reported as being down. With "--dns=ip" xymonnet will never do a DNS lookup; it will use the IP adresse specified in hosts.cfg for the tests. Thus, this setting is equivalent to having the "testip" tag on all hosts. Note that http tests will ignore this setting and still perform a DNS lookup for the hostname given in the URL; see the "xymonnet tags for HTTP tests" section in hosts.cfg(5)
You would change this in your tasks.cfg file. The default looks like this:
"xymonnet" runs the xymonnet tool to perform the network based tests -
i.e. http, smtp, ssh, dns and
all of the various network protocols we need to test.
[xymonnet] ENVFILE /usr/local/www/xymon/server/etc/xymonserver.cfg NEEDS xymond CMD xymonnet --report --ping --checkresponse LOGFILE $XYMONSERVERLOGS/xymonnet.log INTERVAL 5m
Just add --dns=ip to the CMD line