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 upfile_sd_config: Support custom metrics_path #4121
Comments
klausenbusk
changed the title
static_configs: Support custom metrics_path
file_sd_config: Support custom metrics_path
Apr 28, 2018
This comment has been minimized.
This comment has been minimized.
|
This is already possible. It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided. |
brian-brazil
closed this
Apr 28, 2018
This comment has been minimized.
This comment has been minimized.
How? The only way I can think of, is either listen on a "lot" of ports or creating a custom Prometheus config generator (which create a
So I should ask the community for workarounds instead of opening a feature request? How does that make sense? I'm wondering if we are talking past each other? |
This comment has been minimized.
This comment has been minimized.
Sorry for the noise. I did spend some more time on this and did stumble on #4001, which works perfectly for my setup. I wasn't aware of that I could simply change |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
klausenbusk commentedApr 28, 2018
Proposal
Use case. Why is this important?
We have around 300 Linux machine at different customers behind NAT, as they are behind NAT we use SSH to setup remote port forwarding, so Prometheus can scrape the
node_exportermetrics from them. It works, but SSH doesn't scale very well (~ 1,5MB per machine) and security wise it isn't ideal (we need to trust the "machine" as OpenSSH doesn't provide any control over remote port forwarding (all or nothing)).In the progress of evaluating other options, I did discover that Promethues doesn't provide a easy to configure multiple
metrics_pathfor a target.Right now we use a
file_sd_config, like so:and my idea was to built a custom SSH/proxy/http server on top of Golang ssh package. So I would end up with a SSH server the machine connect to and a HTTP server Prometheus scrape from.
Something like, but I can't do that, as Prometheus doens't provide a option to adjust the path per "target" (I'm not sure what the right term is).
Ideally I could do something like: