pingcap / pingcap/tidb

Migrate dashboards to Grafana Foundation SDK

Open
#66,261 1 comment 0 reactions 0 assignees View on GitHub
contribution first-time-contributor type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

Currently there are a number of Grafana dashboards. They are managed several ways.
* A [jsonnet fork](https://github.com/pingcap/tidb/blob/3b69f59094f7b3cb1fb4f9763de94fff54a4de0f/pkg/metrics/grafana/generate_json.sh#L18-L22)
* Manually updated
* TiKV uses [Python grafanalib](https://github.com/tikv/tikv/blob/b1028c06d08b5859f0b09cbe8c312c4782ae85b9/metrics/grafana/tikv_details.dashboard.py#L40C6-L41)

There is an issue to update to the upstream supported [grafonnet-lib](https://github.com/grafana/grafonnet-lib), but this project is archived.

## Recommendation

We migrate dashboard management to the Grafana [Foundation SDK](https://github.com/grafana/grafana-foundation-sdk). This library is the supported way to manage generating Grafana dashboards as code.

Migrating dashboards to this SDK makes makes it easier for teams to generate customized dashboards for specific environments. For example changes to the variable lookups based on environment specific needs.

There are several supported languages. My recommendation is to use the Go version to match the main TiDB codebase.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.