Federation is fine - although you could also just query the regular 'query' 
API endpoint.

Your label query is failing because of curl interpreting metacharacters 
specially. Add the "-g" flag to curl and you should be OK.

On Tuesday, 1 December 2020 at 19:22:44 UTC [email protected] wrote:

> I scrape several node exporters and create a new metric in a rule. For 
> example, each node exporter exports a *node_active_jobs* metric, and 
> let's say that one of the labels is *job_class*, and I my rules file says:
>
>
>
>
>
>
> *groups:  - name: alljobs     rules:    - record: active_jobs       expr: 
> sum (node_active_jobs) by (job_class) *
> How can I make the resulting *active_jobs *metric visible to some other 
> scraper (in myh case: the Google Compute Engine autoscaler). The closest I 
> have come to is use *http://localhost:9090/federate?match[]=active__jobs 
> <http://localhost:9090/federate?match[]=active__jobs>,* but (a) this also 
> appends a timestamp to the metric, which confuses the autoscaler, and (b) 
> does not allow me to specify labels (*curl 
> 'http://localhost:9090/federate?match[]=active__jobs{job_class= 
> <http://localhost:9090/federate?match[]=active__jobs%7Bjob_class=>"priority"} 
> *fails 
> with 1:35: parse error: could not parse remaining input "=\"priority\""...
>
> Help?
>
>
>
>
>

-- 
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/85a5f55f-7635-451f-a86c-2ba16b311283n%40googlegroups.com.

Reply via email to