I am really confused and a good example would do wonders to help my understanding.Thanks,Joe
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ea163790-1e4d-4053-88b5-4ab4b4a7ebfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 20 February 2018 at 22:15, Joe Garcia <joejg...@gmail.com> wrote:Hi all,We have a custom exporter that we wrote in house that queries Spectrum Performance Center. It queries a particular element in SPC on the fly based on the metrics path it is fed and then generates the return for prometheus. Some examples of a query:http://spc.exporter.foo.com/int/router_number_1 - returns data collected from router_number_1http://spc.exporter.foo.com/int/router_number_2 - returns data collected from router_number_2This works fine with static configs but we would like to start using file_sd_config. From what I have read though, the metrics path is attached to the job and all we can put into the SD config file is Targets and Labels not metrics path. In our case the target would always remain the same but the metrics path would change. I believe the answer to this issue is to use relabel_config but I can't figure it out. So I have a few questions:
- From the relabel config documentation it appears that I can change the __metrics_path__ before the scrape is made and would actually make the query against the exporter with the metrics path I want. Is this correct?
- Can I put these relabel items in the SD config file?
- I have no idea from the relabel documentation how to set that up, can someone provide an example?
You can put __metrics_path__ directly in the file SD files.Brian
I am really confused and a good example would do wonders to help my understanding.Thanks,Joe
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ea163790-1e4d-4053-88b5-4ab4b4a7ebfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So that would look something like this in the SD files:
Is that correct?
Since this this is under a single job, would this be scraping all targets at the same time or, as I suspect, prometheus is smart enough to randomly scrape each target within the window the time window assigned?
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/67b8386b-5926-48d0-adee-ddaf6ae68511%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/67b8386b-5926-48d0-adee-ddaf6ae68511%40googlegroups.com.