We have a hierachical prometheus setup with some server scraping others. We'd like to have some servers scrape all metrics from others.
Currently we try to use match[]="{__name__=~".*"}"
as a metric selector, but this gives the error parse error at char 16: vector selector must contain at least one non-empty matcher
.
Is there a way to scrape all metrics from a remote prometheus without listing each (prefix) as a match selector?
Prometheus federation is a Prometheus server that can scrape data from other Prometheus servers. It supports hierarchical federation, which in our case resembles a tree.
In Prometheus terms, an endpoint you can scrape is called an instance, usually corresponding to a single process. A collection of instances with the same purpose, a process replicated for scalability or reliability for example, is called a job.
Yes, you can do: match[]="{__name__=~".+"}"
(note the +
instead of *
to not match the empty string).
Prometheus requires at least one matcher in a label matcher set that doesn't match everything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With