# clinic-grafana

All dashboards in tidb-dashboards and dedicated-dataplane could be redirected from clinic cluster page

## Build

1. `make dashboards` to generate usable grafana dashboards for clinic

2. `make images` to build docker image

## Contribute Guide

- Add Cloud specific dashbaord for dataplane

  Just add to dedicated-dataplane folder

- Add dashboards for TiDB component

  1. contribute to related repo
  2. modify and run `tools/clean_and_pull_all.sh`

- Sync TiDB dashboards

  1. modify versions in `tools/clean_and_pull_all.sh`
  2. run `tools/clean_and_pull_all.sh`

- Add dashbords only for Clinic

  - add dashbords to `clinic-dashboards` by folder

- Update master dashboards

  - just run github action "Grafana" and apply to clinic

## How to apply changes in Clinic

After the PR is merged into `main` branch, the new image will be built and pushed automatically. You can restart the grafana-7 and grafana-9 pod in the `clinic` namespace to apply the changes.

Additionly, if you add new TiDB versions, you will need to restart the clinic pod after new grafana pod is ready to refresh the dashboard list.
