Grafana

This page lists Robusta actions related to Grafana.

Like all Robusta actions, these can be triggered by Prometheus/AlertManager, Kubernetes changes, and more.

Prerequisites

You will need a Grafana API key with write permissions.

Generating a Grafana API key.

Builtin actions

Add deployment lines to grafana

Playbook Action: add_deployment_lines_to_grafana

Add annotations to Grafana when a Kubernetes resource is updated and the image tags change.

Supports Deployments, ReplicaSets, DaemonSets, StatefulSets, Jobs, and Pods

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - add_deployment_lines_to_grafana:
      grafana_api_key: '********'
      grafana_dashboard_uid: 09ec8aa1e996d6ffcd6817bbaff4db1b
      grafana_url: http://grafana.namespace.svc
  triggers:
  - on_deployment_update: {}

The above is an example. Try customizing the trigger and parameters.

required:
grafana_api_key (str)

grafana key with write permissions.

grafana_dashboard_uid (str)

dashboard ID as it appears in the dashboard's url

optional:
grafana_url (str)

http(s) url of grafana or None for autodetection of an in-cluster grafana

grafana_dashboard_panel (str)

when present, annotations will be added only to panels with this text in their title.

cluster_name (str)

written as one of the annotation's tags

cluster_zone (str)
custom_tags (str list)

custom tags to add to the annotation

Add alert lines to grafana

Playbook Action: add_alert_lines_to_grafana

No description

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - add_alert_lines_to_grafana:
      grafana_api_key: '********'
      grafana_dashboard_uid: 09ec8aa1e996d6ffcd6817bbaff4db1b
      grafana_url: http://grafana.namespace.svc
  triggers:
  - on_prometheus_alert: {}

The above is an example. Try customizing the trigger and parameters.

required:
grafana_api_key (str)

grafana key with write permissions.

grafana_dashboard_uid (str)

dashboard ID as it appears in the dashboard's url

optional:
grafana_url (str)

http(s) url of grafana or None for autodetection of an in-cluster grafana

grafana_dashboard_panel (str)

when present, annotations will be added only to panels with this text in their title.

cluster_name (str)

written as one of the annotation's tags

cluster_zone (str)
custom_tags (str list)

custom tags to add to the annotation