1 # my global config$
2 global:$
3 scrape_interval: 15s # Set the scrape interval to every 15
seconds. Default is every 1 minute.$
4 evaluation_interval: 15s # Evaluate rules every 15 seconds. The
default is every 1 minute.$
5 # scrape_timeout is set to the global default (10s).$
6 $
7 # Alertmanager configuration$
8 alerting:$
9 alertmanagers:$
10 - static_configs:$
11 - targets:$
12 - localhost:9093$
13 $
14 # Load rules once and periodically evaluate them according to the
global 'evaluation_interval'.$
15 rule_files:$
16 # - "first_rules.yml"$
17 - 'alerts.yml'$
18 # - "second_rules.yml"$
19 $
20 # A scrape configuration containing exactly one endpoint to scrape:$
21 # Here it's Prometheus itself.$
22 scrape_configs:$
23 # The job name is added as a label `job=<job_name>` to any timeseries
scraped from this config.$
24 - job_name: 'federate'$
25 metrics_path: '/federate'$
26 params:~$
27 'match[]':$
28 - '{job="prom"}'$
29 static_configs:$
30 - targets: ['localhost:9090']$
31 - job_name: 'prom'$
32 metrics_path: '/'$
33 static_configs:$
34 - targets: ['localhost:12156']$
My expectation:- I will get all the metrics with the job name 'prom' on my
localhost:9090/federate, but I didn't get anything there. I know I am doing
something wrong. Can someone please guide me?
Moreover, I do have some doubts:
1) Can we change the route name other than 'federate' or is it fixed?
2) The federation endpoint collects all metrics just for the recent
timestamp and from the local system of the Prometheus server. right?
On Saturday, February 29, 2020 at 2:44:39 AM UTC+5:30, Andrey Kezikov wrote:
>
>
> When you requesting for /metrics endpoint - you reaching inner exporter on
> the node, what gives you information about prometheus itself as it can
> query itself for own status to save into history.
>
> Ben proposing you to use federation endpoint to retrieve all collected
> metrics from the Prometheus, you can try it with GET request to Prometheus,
> replacing in your URL part *'/metrics*' with federation endpoint and
> query: '*/federate?match[]={__name__=~"up"}*'
>
> It will return you all metrics for your query. You can use more broad
> regexp, but it will put huge load on prometheus itself and possible
> "out-of-time" responses, so would be better to request reduce request
> scopes to exactly what you need to see in datadog
>
>
> On Friday, February 28, 2020 at 11:13:04 AM UTC-8, adi garg wrote:
>>
>> Hey Ben, I tried reading about federation point, but I am not able to
>> connect how it can be helpful for my problem. can you please elaborate?
>>
>> On Friday, February 28, 2020 at 5:36:39 PM UTC+5:30, adi garg wrote:
>>>
>>> Isn't there any way to do this just by using datadog conf file?
>>>
>>> On Friday, February 28, 2020 at 4:59:59 PM UTC+5:30, Ben Kochie wrote:
>>>>
>>>> Try the federation endpoint.
>>>>
>>>> https://prometheus.io/docs/prometheus/latest/federation/
>>>>
>>>> On Fri, Feb 28, 2020 at 11:56 AM adi garg <[email protected]> wrote:
>>>>
>>>>> Hello experts,
>>>>> I need to pass the metrics collected by Prometheus to datadog, I know
>>>>> that we need to make changes in datadog's conf file present in
>>>>> openmetrics.d directory. But as Prometheus only shows metrics about it's
>>>>> own server on /metrics. How can we send them to datadog?
>>>>> Thnks,
>>>>> Aditya Garg
>>>>>
>>>>> --
>>>>> 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 [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/prometheus-users/5f88afae-2716-4464-806a-69d8c67f1471%40googlegroups.com
>>>>>
>>>>> <https://groups.google.com/d/msgid/prometheus-users/5f88afae-2716-4464-806a-69d8c67f1471%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/c1c573dd-39b8-455c-bd97-8336d2e6305b%40googlegroups.com.