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

grafana(dm): fix grafana expr #4405

Merged
merged 10 commits into from
Jan 25, 2022
Merged

grafana(dm): fix grafana expr #4405

merged 10 commits into from
Jan 25, 2022

Conversation

Ehco1996
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #4404

What is changed and how it works?

use right expr

  • fix standard's lag lable not show
    stander lag label

  • fix binlog file gap between master and syncer
    截屏2022-01-19 下午3 04 15

  • fix binlog file gap between relay and syncer
    截屏2022-01-19 下午3 01 32

  • fix binlog file gap between master and relay
    截屏2022-01-19 下午3 05 00

Check List

Tests

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

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

`None`.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 19, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • glorv
  • lance6716

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 the release-note-none Denotes a PR that doesn't merit a release note. label Jan 19, 2022
@Ehco1996 Ehco1996 added the area/dm Issues or PRs related to DM. label Jan 19, 2022
@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 19, 2022
@glorv glorv added needs-cherry-pick-release-5.3 Should cherry pick this PR to release-5.3 branch. needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. labels Jan 19, 2022
"format": "time_series",
"hide": false,
"interval": "$interval",
"intervalFactor": 2,
"legendFormat": "{{task}} - {{instance}}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remain {{task}} - {{instance}} as each task will produce a different value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this metric: dm_relay_binlog_file don't have label task so this legend looks like this - 127.0.0.1:8621



dm_relay_binlog_file{instance="127.0.0.1:8262", job="dm-worker-1", node="master"} | 1
-- | --
dm_relay_binlog_file{instance="127.0.0.1:8262", job="dm-worker-1", node="relay"}


Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @glorv ptal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can use group_right

dm_relay_binlog_file{instance="172.16.5.177:8101", node="relay"} - ON(instance) group_right dm_syncer_binlog_file{instance="172.16.5.177:8101", node="syncer"}

please find a good solution from https://prometheus.io/docs/prometheus/latest/querying/operators/#many-to-one-and-one-to-many-vector-matches

Copy link
Contributor Author

@Ehco1996 Ehco1996 Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to only syncer_binlog_fie have many to on relationship with relay_binlog_file, only one dashboard need to be adjusted. added in 28f5994 and fa5c966, preview link is here

@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2022

Codecov Report

Merging #4405 (6509f70) into master (e469fb3) will decrease coverage by 0.0465%.
The diff coverage is 54.6268%.

Flag Coverage Δ
cdc 60.1004% <61.4349%> (-0.0871%) ⬇️
dm 52.0950% <41.0714%> (-0.0085%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master      #4405        +/-   ##
================================================
- Coverage   55.8077%   55.7611%   -0.0466%     
================================================
  Files           495        495                
  Lines         61246      61333        +87     
================================================
+ Hits          34180      34200        +20     
- Misses        23614      23714       +100     
+ Partials       3452       3419        -33     

@Ehco1996
Copy link
Contributor Author

could you please take another look for this pr ? thanks 🧡🧡🧡

/cc @lance6716 @glorv

"format": "time_series",
"hide": false,
"interval": "$interval",
"intervalFactor": 2,
"legendFormat": "{{task}} - {{instance}}",
"legendFormat": "{{{instance}}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"legendFormat": "{{{instance}}",
"legendFormat": "{{instance}}",

could you provide an environment to let me verify the layout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! my bad , add preview link in about review comments now

@@ -3059,7 +3059,7 @@
"steppedLine": false,
"targets": [
{
"expr": "dm_syncer_binlog_file{source_id=~\"$source\", task=~\"$task\", node=\"master\"} - ON( task,source_id) dm_syncer_binlog_file{source_id=~\"$source\", task=~\"$task\", node=\"syncer\"}",
"expr": "dm_syncer_binlog_file{source_id=~\"$source\", task=~\"$task\", node=\"master\"} - ON(task,source_id) dm_syncer_binlog_file{source_id=~\"$source\", task=~\"$task\", node=\"syncer\"}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preview link

@@ -3716,12 +3716,12 @@
"steppedLine": false,
"targets": [
{
"expr": "dm_relay_binlog_file{instance=~\"$instance\", node=\"relay\"} - ON(instance, task) dm_syncer_binlog_file{instance=~\"$instance\", task=~\"$task\", node=\"syncer\"}",
"expr": "dm_relay_binlog_file{instance=~\"$instance\", node=\"relay\"} - ON(instance) dm_syncer_binlog_file{instance=~\"$instance\", task=~\"$task\", node=\"syncer\"}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preview link

@@ -5088,7 +5088,7 @@
"steppedLine": false,
"targets": [
{
"expr": "dm_relay_binlog_file{instance=~\"$instance\", node=\"master\"} - ON(instance, job) dm_relay_binlog_file{instance=~\"$instance\", node=\"relay\"}",
"expr": "dm_relay_binlog_file{instance=~\"$instance\", node=\"master\"} - ON(instance) dm_relay_binlog_file{instance=~\"$instance\", node=\"relay\"}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preview link

@@ -450,23 +450,23 @@
"targets": [
{
"exemplar": true,
"expr": "histogram_quantile(0.90, sum(rate(dm_syncer_replication_lag_bucket{instance=~\"$instance\",task=~\"$task\"}[$interval])) by (le,instance,task))",
"expr": "histogram_quantile(0.90, sum(rate(dm_syncer_replication_lag_bucket{source_id=~\"$source\",task=~\"$task\"}[$interval])) by (le,task,source_id))",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preview link

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 24, 2022
@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 Jan 24, 2022
@glorv
Copy link
Contributor

glorv commented Jan 24, 2022

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: fa5c966

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 24, 2022
@Ehco1996
Copy link
Contributor Author

/run-all-tests

@lance6716
Copy link
Contributor

/run-integration-tests /tidb=pr/30558
/run-kafka-integration-test /tidb=pr/30558

@ti-chi-bot
Copy link
Member

@Ehco1996: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

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.

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.

@Ehco1996
Copy link
Contributor Author

/run-integration-tests /tidb=pr/30558
/run-kafka-integration-test /tidb=pr/30558

/run-dm-integration-tests
/run-dm-compatibility-test
/run-leak-test

@ti-chi-bot ti-chi-bot merged commit 9d0ec39 into pingcap:master Jan 25, 2022
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot added a commit that referenced this pull request Jan 26, 2022
ti-chi-bot added a commit that referenced this pull request Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. needs-cherry-pick-release-5.3 Should cherry pick this PR to release-5.3 branch. needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 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.

dashboard: binlog file gap between relay have no data
5 participants