Prometheus: Add capability to filter label names by metric in template variable editor (#70452)

* Adds new text input in prometheus template variable UI that allows label names function to filter values by metric. 
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
This commit is contained in:
Galen Kistler
2023-06-22 14:11:06 -05:00
committed by GitHub
co-authored by Brendan O'Handley
parent 44972d0cd5
commit 7cb1f6541e
8 changed files with 126 additions and 28 deletions
@@ -28,7 +28,7 @@ Select a Prometheus data source query type and enter the required inputs:
| Query Type | Input(\* required) | Description | Used API endpoints |
| -------------- | ------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------- |
| `Label names` | none | Returns a list of all label names. | /api/v1/labels |
| `Label names` | `metric` | Returns a list of all label names matching the specified `metric` regex. | /api/v1/labels |
| `Label values` | `label`\*, `metric` | Returns a list of label values for the `label` in all metrics or the optional metric. | /api/v1/label/`label`/values or /api/v1/series |
| `Metrics` | `metric` | Returns a list of metrics matching the specified `metric` regex. | /api/v1/label/\_\_name\_\_/values |
| `Query result` | `query` | Returns a list of Prometheus query result for the `query`. | /api/v1/query |