prometheuspromql

How can I create a query in PromQL so that it displays all the metrics that contain the xxx label?


How can I create a query in PromQL so that it displays all the metrics that contain the xxx label? I can't find which metric the label belongs to.


Solution

  • To get all metrics that have non-empty* label xxx you might use query

    {xxx!=""}
    

    Demo of all metrics containing label cpu here.


    * : empty label in Prometheus is the same as non-existent label