Search code examples
prometheuspromql

Prometheus endpoint of all available metrics


I was curious concerning the workings of Prometheus. Using the Prometheus interface I am able to see a drop-down list which I assume contains all available metrics. However, I am not able to access the metrics endpoint which lists all of the scraped metrics. The http://targethost:9090/metrics endpoint only displays the metrics concerning the Prometheus server itself. Is it possible to access a similar endpoint which lists all available metrics. I could perform a query based on {__name__=~".+"} but I would prefer to avoid this option.


Solution

  • The endpoint for that is http://localhost:9090/api/v1/label/__name__/values

    API Reference