Skip to content

steadybit/extension-grafana

Repository files navigation

Steadybit extension-grafana

A Steadybit extension to integrate Grafana into Steadybit.

Learn about the capabilities of this extension in our Reliability Hub.

Prerequisites

You need to have a Grafana service token. The token must have the following permissions:

  • to read alert rules
  • to read/write annotations

Configuration

Environment Variable Helm value Meaning Required Default
STEADYBIT_EXTENSION_SERVICE_TOKEN grafana.serviceToken Grafana Service Token yes
STEADYBIT_EXTENSION_API_BASE_URL grafana.apiBaseUrl Grafana API Base URL (example: https://yourcompany.grafana.io) yes
STEADYBIT_EXTENSION_DISCOVERY_ATTRIBUTES_EXCLUDES_ALERTRULE discovery.attributes.excludes.alertrule List of Alert Rule Attributes which will be excluded during discovery. Checked by key equality and supporting trailing "*" no

The extension supports all environment variables provided by steadybit/extension-kit.

Installation

Using Docker

docker run \
  --rm \
  -p 8080 \
  --name steadybit-extension-grafana \
  --env STEADYBIT_EXTENSION_SERVICE_TOKEN="{{SERVICE_TOKEN}}" \
  --env STEADYBIT_EXTENSION_API_BASE_URL="{{API_BASE_URL}}" \
  ghcr.io/steadybit/extension-grafana:latest

Using Helm in Kubernetes

helm repo add steadybit-extension-grafana https://steadybit.github.io/extension-grafana
helm repo update
helm upgrade steadybit-extension-grafana \
    --install \
    --wait \
    --timeout 5m0s \
    --create-namespace \
    --namespace steadybit-agent \
    --set grafana.serviceToken="{{SERVICE_TOKEN}}" \
    --set grafana.apiBaseUrl="{{API_BASE_URL}}" \
    steadybit-extension-grafana/steadybit-extension-grafana

Register the extension

Make sure to register the extension on the Steadybit platform. Please refer to the documentation for more information.

FAQ

The extension-grafana is unauthorized to fetch data from grafana (status code 401)

Do you provide the service account token to the extension ? Does the token still exists on Grafana ?

warning: If you want the service account token to survive a Grafana pod deletion or restart, you need to persist the Grafana data in a DB.