-
Notifications
You must be signed in to change notification settings - Fork 1k
[Overvability] Add Grafana dashboard for karmada-apiserver component
#6850
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Joe Nathan Abellard <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary of ChangesHello @jabellard, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the observability of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new Grafana dashboard for the karmada-apiserver component, along with accompanying README files. The dashboard provides valuable insights into the apiserver's performance and health.
My review focuses on ensuring consistency and correctness. I've pointed out a bug in a PromQL query for the version panel that would cause it to fail, and suggested using the karmada_build_info metric for consistency with other Karmada components. I've also made minor suggestions to add missing newlines to the new markdown files.
| "targets": [ | ||
| { | ||
| "refId": "A", | ||
| "expr": "sum by (git_version) ( kubernetes_build_info{})", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PromQL query is incorrect. The kubernetes_build_info metric uses a gitVersion label (camelCase), but the query attempts to group by git_version (snake_case). This will cause the panel to fail to display the version information.
For consistency with other Karmada components like karmada-controller-manager, please use the karmada_build_info metric, which correctly uses the git_version label. If karmada-apiserver does not yet expose this metric, it should be updated to do so. This change will improve monitoring consistency across the project.
Additionally, the extra spaces in the query should be removed for cleanliness.
| "expr": "sum by (git_version) ( kubernetes_build_info{})", | |
| "expr": "sum by (git_version) (karmada_build_info{})", |
| @@ -0,0 +1,3 @@ | |||
| # Grafana Dashboards | |||
|
|
|||
| This directory contains Grafana dashboards for monitoring and visualizing the operational state of Karmada components. No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a newline at the end of the file to adhere to common file formatting conventions.
| This directory contains Grafana dashboards for monitoring and visualizing the operational state of Karmada components. | |
| This directory contains Grafana dashboards for monitoring and visualizing the operational state of Karmada components. | |
| @@ -0,0 +1,3 @@ | |||
| # Karmada API Server Insights | |||
|
|
|||
| Insights for Karmada API server. No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Hey @RainbowMango. Lately, I've been doing a lot of work to enhance observability for our managed multi-cluster platform built on top of Karmada, and will be sharing some of the dashboards I've built with the community. This is the first. I will have more coming! |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6850 +/- ##
==========================================
- Coverage 45.87% 45.64% -0.23%
==========================================
Files 690 692 +2
Lines 57392 57703 +311
==========================================
+ Hits 26331 26341 +10
- Misses 29425 29717 +292
- Partials 1636 1645 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@jabellard That looks great! Could we use an issue to track and document these tasks? |
|
Thanks @jabellard, interesting. But I don't get how to run it if I want to explore it on my side. Are you going to add more guides or demonstrate at the community meeting? |
Hey @RainbowMango. I've been building dashboards to enhance observability for our managed Karmada platform and will be sharing some of them with the community. The ones I have shared so far are ready for use, but with the assumption that a Prometheus stack has already been setup and is scraping metrics from the Karmada control plane component pods. I'd love to show these dashboards in action on our managed Karmada platform, but unfortunately can't present internal systems without approval. I will be submitting a proposal for KubeCon EU Observability Day to showcase that work. I'm exited about that and will share the proposal with you soon. For now, here's what I can do:
What do you think? /cc @zhzhuang-zju |
|
@jabellard Thank you for your detailed response and for looking forward to the proposal.
I prefer creating a new script that installs the Kube Prom stack to a cluster where Karmada is already installed. This approach would make the script more versatile. For other matters, I don't have any issues, but I believe we need a comprehensive guide covering the entire process from installation to getting Grafana up and running. I noticed that you've documented a documentation task in issue #6852, which is great. |
Yeah. I can do that. @RainbowMango , thoughts? |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: