Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics: support multi-k8s in grafana dashboards #4099

Merged
merged 11 commits into from
Mar 8, 2022

Conversation

just1900
Copy link
Contributor

@just1900 just1900 commented Feb 23, 2022

Signed-off-by: just1900 [email protected]

What problem does this PR solve?

Issue Number: ref #4129

Problem Summary:

K8s community and organizations are increasingly deploying multiple Kubernetes clusters to improve availability, isolation and scalability. Since TiDB Operator have support deploying tidb across-kubernetes, this PR will address the multi-k8s issue without affecting existing single-cluster use case.

What is changed and how it works?

What's Changed:

  • add a k8s_cluster label in all expr
  • add k8s_cluster variable in Grafana templating

How it works:

  • For users with single-k8s, nothing need to be changed, just use it as before.
  • For users with multi-k8s:
    • first add kubernetes label to identify k8s cluster in your prometheus' external_labels.
    • set field "hide" to '0' to show variables in grafana via sed -i s/"hide": 2/"hide": 0/g <path/to/dashboard.json>
    • load it to grafana

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

metrics: support multi-k8s in grafana dashboards

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 23, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JaySon-Huang
  • flowbehappy

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 23, 2022
@flowbehappy flowbehappy self-requested a review March 7, 2022 03:29
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 7, 2022
@flowbehappy
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@flowbehappy: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

@flowbehappy: /merge in this pull request requires 2 approval(s).

In response to this:

/merge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot removed the status/LGT1 Indicates that a PR has LGTM 1. label Mar 8, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Mar 8, 2022

Coverage for changed files

no c/c++ source change detected

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16755      9447             43.62%    188616  95709        49.26%

full coverage report (for internal network access only)

Signed-off-by: JaySon-Huang <[email protected]>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 8, 2022
@JaySon-Huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

@JaySon-Huang: /merge in this pull request requires 2 approval(s).

In response to this:

/merge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 8, 2022
@flowbehappy
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@flowbehappy: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: c5dac82

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 8, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Mar 8, 2022

Coverage for changed files

no c/c++ source change detected

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16755      9447             43.62%    188616  95710        49.26%

full coverage report (for internal network access only)

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 8, 2022

Coverage for changed files

no c/c++ source change detected

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16755      9447             43.62%    188616  95710        49.26%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit b0958e7 into pingcap:master Mar 8, 2022
@just1900
Copy link
Contributor Author

just1900 commented Mar 8, 2022

@JaySon-Huang Could you please help add the cherrypick label to 5.0 5.1 5.2 5.3 5.4👀?

@flowbehappy flowbehappy added the needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. label Mar 9, 2022
ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Mar 9, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4206.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants