Loki: Add support for "label_values(log stream selector, label)" in templating (#35488)

* Use series endpoint if we have queries expr

* Update documentation
This commit is contained in:
Ivana Huckova
2021-06-11 04:57:40 -04:00
committed by GitHub
parent 5ac2a7cca6
commit 97a59a4855
3 changed files with 57 additions and 39 deletions

View File

@@ -148,10 +148,11 @@ Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentatio
Variable of the type _Query_ allows you to query Loki for a list labels or label values. The Loki data source plugin
provides the following functions you can use in the `Query` input field.
| Name | Description |
| --------------------- | --------------------------------------------------------------- |
| `label_names()` | Returns a list of label names. |
| `label_values(label)` | Returns a list of label values for the `label` in every metric. |
| Name | Description |
| -------------------------------------------| -------------------------------------------------------------------------------------|
| `label_names()` | Returns a list of label names. |
| `label_values(label)` | Returns a list of label values for the `label`. |
| `label_values(log stream selector, label)` | Returns a list of label values for the `label` in the specified `log stream selector`.|
## Annotations