For AI agents and assistants: visit https://docs.pagerduty.com/llms.txt for the index.
Workflow Actions
Grafana: List Labels
Lists Prometheus label names, or the values for a specific label, from a Grafana datasource.
Availability
See the Incident Workflow Actions Overview table for the plans this workflow is available on.
Description
List Prometheus label names, or the values for a specific label, from a Grafana datasource. Use this action to discover which labels exist, and which values they take, before filtering metrics with PromQL during incident response.
Instructions
- If you have not done so, follow the instructions to Create an Incident Workflow.
- When the instructions prompt you to add actions, select this action.
- Enter the following Inputs and click Save.
- Continue following instructions to Publish the Workflow.
- When the action runs, you will see the Outputs listed below.
Inputs
Field References
Fields with the {+} icon accept Field References, which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click {+}, or enter {{, and select relevant fields. Refer to the Field References article for more information.
| Name | Description |
|---|---|
| Connection Input | The Grafana Connection to use. |
| Datasource | The Prometheus datasource UID to discover labels from. |
| Label Name (Optional) | If set, lists the values of this label, for example namespace. If empty, lists all label names. |
| Match (Optional) | A PromQL series selector to scope results, for example {job="api"}. |
| Time Window (Optional) | Lookback window. Labels and values are scoped to series active within it. One of 5m, 15m, 30m, 1h, 6h, 12h, 1d, 7d, or 30d. Defaults to 1h (Past 1 Hour). |
Outputs
| Name | Description |
|---|---|
| Label Names | Array of label names. Populated when Label Name is empty. |
| Label Values | Array of values for the requested Label Name. Empty when listing label names. |
| Count | Number of label names or label values returned. |
| Mode | label_names or label_values. |
| Result | Value that shows if the action was successful or not. Either Success or Failed. |
| Result Summary | Brief description of what the action did or if it failed. |
| Error | Brief description that is populated if the action failed. |