Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

grafana dashboards support multiple cluster #715

Merged

Conversation

zjj2wry
Copy link
Contributor

@zjj2wry zjj2wry commented Jan 26, 2021

What problem does this PR solve?

Many users(come from DBaaS、operator、tiup) monitor multiple TiDB clusters in one Grafana, this PR make Grafana dashboards support multiple clusters and not affect single cluster usage. Cluster variable is hidden by default.

What is changed and how it works?

  • add a tidb_cluster label in all expr
  • add cluster variable in Grafana templating

How it Works:
load it to your Grafana :))

Single Cluster:
No change

Multiple Cluster:
Construct a label that can uniquely identify the cluster. in tidb_operator, you can use {namespace}-{cluster_name} as your {tidb_cluster} variable.
add this configuration to your prometheus config

relabel_configs:
  - source_labels:
      - namespace
      - name
    separator: "-"
    target_label: tidb_cluster

Check List

Tests

  • No code

Code changes

Side effects

  • no effects

Related changes

Release note

  • metrics: grafana dashboards support multiple clusters

@CLAassistant
Copy link

CLAassistant commented Jan 26, 2021

CLA assistant check
All committers have signed the CLA.

@kennytm
Copy link
Collaborator

kennytm commented Jan 26, 2021

/lgtm

@ti-srebot ti-srebot added the status/LGT1 LGTM1 label Jan 26, 2021
@overvenus
Copy link
Member

/lgtm

@ti-srebot ti-srebot removed the status/LGT1 LGTM1 label Jan 26, 2021
@overvenus
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 92184eb into pingcap:master Jan 26, 2021
ti-srebot pushed a commit to ti-srebot/br that referenced this pull request Jan 26, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #717

ti-srebot added a commit that referenced this pull request Jan 27, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants