Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCannot scrape targets specified by mDNS name #2537
Comments
This comment has been minimized.
This comment has been minimized.
|
Slightly related, I recently implemented mDNS service discovery. It looks for things advertising |
brian-brazil
added
the
component/service discovery
label
Jul 7, 2017
This comment has been minimized.
This comment has been minimized.
|
We support DNS, with would require specific mDNS support to be added. |
This comment has been minimized.
This comment has been minimized.
|
Do we want to support that? I just realize my new home router isn't adding dhcp clients with their hostname to DNS, so would like to use mdns for my setup at home to discover exporters. |
This comment has been minimized.
This comment has been minimized.
|
We've a moratorium on new SDs, and mDNS isn't exactly something I'd expect to see in a production setup. |
This comment has been minimized.
This comment has been minimized.
|
Arguably it's by far the most common SD mechanism. Not in your typical server infrastructure but using Prometheus in a home network/IoT is IMO a reasonable use case. |
This comment has been minimized.
This comment has been minimized.
|
There's always file_sd. |
This comment has been minimized.
This comment has been minimized.
|
I think you're confusing two faces of mDNS:
They happen to share the same means (and name), but to achieve two quite different goals. As to the first, it is worth noting that Go hasn't always been nice to resolve I sort-of-skirted the issue by using the service-discovery part (see https://github.com/msiebuhr/prometheus-mdns-sd) where I return the resolved addresses to Prometheus. (Look at #1903 for some history and further discussion). |
This comment has been minimized.
This comment has been minimized.
|
@msiebuhr What were the main reasons to close the PR? I'd actually love to see this in Prometheus, with the influx of people using Prometheus for IoT use cases etc. |
This comment has been minimized.
This comment has been minimized.
|
It drags in quite a few large dependencies (low-level networking to get mDNS working), and I was told in private conversation (perhaps @brian-brazil ; cannot remember) that new service discovery mechanism preferably should be built outside core prometheus. Edit: Just re-read @brian-brazil mention a moratorium on new SD's above. That may be where I got it from... But yes, I generally find it weird (from a hobbyist/IoT point-of-view) that Prometheus comes with complex discovery mechanisms for some really big systems and everyone else must implement some custom cron/daemon thing poking at |
This comment has been minimized.
This comment has been minimized.
|
@msiebuhr I fully agree with this. I don't know why proprietary, vendor specific SD mechanisms for things like triton or azure are in scope while the most widely deployed open mechanism isn't. I know that @SuperQ would also like to see mDNS support. So if we can find lazy consensus here, I'd probably call in a official vote on this. |
This comment has been minimized.
This comment has been minimized.
|
We continue to have a moratorium on new SD mechanisms, and once the example file_sd code is in the plan is to close all existing feature requests and point to that instead. SDs take a lot of work to maintain, and history shows that there's little interest in doing so. |
This comment has been minimized.
This comment has been minimized.
|
I don't agree with this plan. |
This comment has been minimized.
This comment has been minimized.
|
There's no sign of an end to the conditions that gave us the moratorium, and I'd rather clearly set expectations with the various requestors of SDs - some of whom have been waiting for 2+ years - than continue to give them false hope. Between the file_sd example and setting expectations I'm hoping that there'll be a surge in the development&maintenance of these by 3rd parties, rather than the current stream of +1s on issues which are ignored. This structure gives us the option of pulling in some of the SDs into Prometheus in the future when things are healthier, but we continue to be unable to accept new SDs or even maintain what we already have. |
moio commentedMar 28, 2017
What did you do?
I am trying to scrape a target that runs
node_exporterby its mDNS name (published through Avahi) in my local network (see configuration below).What did you expect to see?
The same behavior as specifying the IP address in
targets(which works as expected).What did you see instead? Under which circumstances?
State of the endpoint is
DOWNin http://ptometheus.local:9090/targets, whilepingworks as expected.Environment
Latest released:
Also reproduced on self-built
master: