louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
59.84k stars 5.35k forks source link

Specify what DNS resolver is being used #1302

Open abrondijk opened 2 years ago

abrondijk commented 2 years ago

⚠️ Please verify that this feature request has NOT been suggested before.

🏷️ Feature Request Type

UI Feature

🔖 Feature description

You should add a field to allow for custom DNS resolvers to be used, for monitors that monitor a hostname rather than an IP.

✔️ Solution

image

An extra field under the advanced section, that defaults to the global DNS server of the container/installation.

❓ Alternatives

No response

📝 Additional Context

This would allow uptime-kuma to monitor whether services are accessible/performing as they should be in different networks.

An example: a service hosted in the same network as uptime-kuma, might have a local DNS entry point to the local IP address, while it might also have a public DNS entry pointing to the public IP. The service might work perfectly fine inside the local network, while it may not be publicly accessible.

lebochequirit commented 2 years ago

I have a server that's exposed to the outside with dyndns and another one running behind a NAT with Traefik and wildcard Let's encrypt certificates, thus mapped to a public domain. The containers have no exposed ports anymore. For my few local computers I have just host file entries. Would be good to have uptime-kuma bend to a local DNS server for certain services or just have a certain IP given to map the domain to.

webartifex commented 2 years ago

Currently the only way to achieve this is to run two different Uptime instances and specifying different /etc/resolv.conf files.

christopherpickering commented 2 years ago

I have the same situation as well. It seems like it can be easily done with code like this packages - https://www.npmjs.com/package/axios-with-dns

I have a public website that is also available on the intranet where uptime kuma is installed... but only want to monitor from a pubic dns lookup.

unixorn commented 1 year ago

This would also make it easier to monitor that a given DNS server is actually up. I run 2 piholes and want to know if one of them is not serving traffic

XHyperDEVX commented 1 year ago

One of my PiHoles has Uptime Kuma on the same machine and floods PiHole with all the ping requests. Changing the DNS service of Uptime Kuma would be the 100% perfect solution to solve this problem. And apparently others would like it too.

etaxi341 commented 1 month ago

+1 any news on this?