Grafana: List Metrics

📘

Availability

See the Incident Workflow Actions Overview table for the plans this workflow is available on.


Description

List available Prometheus metric names from a Grafana datasource, optionally scoped by a series selector and lookback window. This action enables incident responders to discover relevant metrics during an active incident without leaving the workflow, making it easier to identify which metrics to query next.

Instructions

  1. If you have not done so, follow the instructions to Create an Incident Workflow.
  2. When the instructions prompt you to add actions, select this action.
  3. Enter the following Inputs and click Save.
  4. Continue following instructions to Publish the Workflow.
  5. 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.

NameDescription
Connection InputThe Grafana Connection to use.
DatasourceThe Prometheus datasource UID to discover metrics from.
Match
(Optional)
PromQL series selector to scope results. Example: {job="api"} or {namespace="prod"}.
Time Window
(Optional)
Lookback window for discovery; metric names are scoped to series active within it.

Outputs

NameDescription
Metric NamesArray of metric name strings.
Metric CountNumber of metric names returned.
ResultValue that shows if the action was successful or not. Either Success or Failed.
Result SummaryBrief description of what the action did or if it failed.
ErrorBrief description that is populated if the action failed.
📘

Scoping discovery

Use Match with a PromQL series selector, for example, {job="api"} or {namespace="prod"}, to narrow results to a specific service or environment, and Time Window to avoid returning stale or inactive metric names.