Prometheus: Provide label values match parameter API when supported prometheus instance is configured (#56510)

Provide label values API with match parameter when prometheus datasource has configured supported prometheus type and version
This commit is contained in:
Galen Kistler
2022-10-24 09:47:35 -05:00
committed by GitHub
parent 3d7439d97d
commit 3cbbf706cf
3 changed files with 39 additions and 15 deletions
@@ -219,3 +219,10 @@ For more information, see the [SAML configuration documentation](https://grafana
You can now map OAuth groups and roles to Server Admin for the GitLab, GitHub, AzureAD, Okta, and Generic OAuth integrations.
To enable this functionality, set the `allow_assign_grafana_admin` configuration option to `true` in the desired OAuth integration section.
For more information, see the [authentication configuration documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/) for each OAuth client.
## Match parameter support in prometheus labels API
Prometheus users running Prometheus v2.24 and higher can use the [labels endpoint](https://prometheus.io/docs/prometheus/latest/querying/api/#querying-label-values) instead of the [series endpoint](https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers) for the [`label_values` function]({{< relref "../datasources/prometheus/#query-variable" >}}).
This decreases load times for templated high-cardinality Prometheus instances.
If you want to benefit from this endpoint you must first configure the Prometheus type and version in any Prometheus data sources' [configuration]({{< relref "../datasources/prometheus/" >}}).