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

cluster: add ngm metrics to promtheus config #1806

Merged
merged 5 commits into from
Mar 24, 2022

Conversation

nexustar
Copy link
Collaborator

@nexustar nexustar commented Mar 22, 2022

What problem does this PR solve?

What is changed and how it works?

Check List

Tests

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

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 22, 2022
@nexustar nexustar added this to the v1.9.3 milestone Mar 22, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2022

Codecov Report

Merging #1806 (0c7e437) into master (9798f51) will decrease coverage by 6.04%.
The diff coverage is 17.65%.

@@            Coverage Diff             @@
##           master    #1806      +/-   ##
==========================================
- Coverage   53.07%   47.02%   -6.04%     
==========================================
  Files         303      287      -16     
  Lines       34644    33776     -868     
==========================================
- Hits        18385    15883    -2502     
- Misses      14099    16106    +2007     
+ Partials     2160     1787     -373     
Flag Coverage Δ
cluster 41.10% <17.65%> (-0.24%) ⬇️
dm 24.73% <17.65%> (-0.10%) ⬇️
playground ?
tiup ?
unittest 21.29% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
pkg/cluster/ansible/inventory.go 57.78% <ø> (ø)
pkg/cluster/template/config/prometheus.go 78.35% <0.00%> (+4.56%) ⬆️
pkg/cluster/spec/monitoring.go 67.80% <18.75%> (-4.93%) ⬇️
main.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/utils/hash.go 0.00% <0.00%> (-81.25%) ⬇️
components/playground/monitor.go 0.00% <0.00%> (-81.05%) ⬇️
pkg/repository/model/publish.go 0.00% <0.00%> (-80.00%) ⬇️
components/playground/command.go 0.00% <0.00%> (-79.17%) ⬇️
pkg/cluster/template/config/ngmonitoring.go 0.00% <0.00%> (-76.47%) ⬇️
cmd/env.go 25.00% <0.00%> (-70.00%) ⬇️
... and 56 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9798f51...0c7e437. Read the comment docs.

@ti-chi-bot
Copy link
Member

@crazycs520: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

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.

for i := 0; i < servers.Len(); i++ {
monitoring := servers.Index(i).Interface().(*PrometheusSpec)
uniqueHosts.Insert(monitoring.Host)
cfig.AddNGMonitoring(monitoring.Host, uint64(monitoring.NgPort))
Copy link
Contributor

Choose a reason for hiding this comment

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

What will happen if there is no ngm instance available in the cluster?

return c
}

// AddGrafana add an kafka exporter address
// AddGrafana add an Grafana exporter address
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
// AddGrafana add an Grafana exporter address
// AddGrafana add an Grafana address

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 24, 2022
@AstroProfundis
Copy link
Contributor

/merge

@AstroProfundis AstroProfundis merged commit cba67ca into pingcap:master Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
5 participants