Set DNS server on folder level

Hi all,

We have certain hosts that cannot be looked up with the default DNS server, but are accessible by IP address. The DNS sever that can be used to retrieve their ip-addresses is also accessible from the CheckMK server.Certain checks we can configure to use a specific DNS server, but for the initial “is-this-host-up” check, that is not possible, as far as I know (but maybe I’m wrong!) We could of course add the IP-address when configuring the host, but I’d like to be more flexible when possible, in case the IPaddress changes (some of these hosts are URLs). Since all these hosts are in one folder, is there a way to instruct CheckMK to use a different DNS server for hosts in this folder?

This is not possible. Checkmk uses the system DNS resolver from /etc/resolv.conf.

Okay, fair enough. But is there perhaps another solution for this I haven’t thought of?

Hi @Wummeke,

for monitoring in general it’s better to use fixed IPs to the monitored hosts instead of DNS. If your DNS servers don’t work your monitoring isn’t as well. We use DNS too because of the convenience but if you thought through completely you come to the conclusion that IPs are the better solution for technical monitoring.
It’s right, there are some cases where you need the DNS especially, but in most cases you wouldn’t need it.

checkmk offers some automation functions to change a lot of host values at once and on the command line. You could use the operating system tools to resolve your DNS to IPs and change the hosts directly to lower the manual work.

Does your CheckMK run on a CheckMK appliance or installed on some linux server? If installed on a linux server you could install and configure a bind server on the system and use this to forward dns requests to the responsible dns servers.

1 Like

hi @uwoehler We use a Linux server for Checkmk. However, I think your suggested sollution won’t work either, since almost all DNS lookups work fine in the current situation, except for a few hosts in a specific WATO folder. I don’t see how a bind server can fix that since I think that it is just a replacement for DNS. (But I am not familiar with bind, so I could be wrong of course!)

My solution of course does not change anything folder specific, but I expect that you can resolve those hostnames using another dns server and that this is probably hosting another domain. So you could use bind to send dns requests for this special dns domain to the server that can resovle it.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.