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?
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.