kubernetes-sigs / prometheus-adapter

An implementation of the custom.metrics.k8s.io API using Prometheus
Apache License 2.0
1.9k stars 551 forks source link

point prometheus adapter to a custom aggregator service? #624

Closed TheCodeYoda closed 9 months ago

TheCodeYoda commented 9 months ago

My use-case is to accumulate a certain metric from multiple prometheus shards, given that I can't do that as --prometheus-url accepts only one prometheus URL, was thinking of writing an aggregator service which queries from all shards and exposes the metrics on /metrics in prometheus exposition format, Now if I give the url of the aggregator service to the prometheus adapter would it work?

dgrisonnet commented 9 months ago

/triage accepted /assign /kind support

dgrisonnet commented 9 months ago

The simplest way to solve your problem would be to have a unified interface for your metrics such as a Thanos Querier (https://thanos.io/v0.10/query.md/) for example