-
Notifications
You must be signed in to change notification settings - Fork 599
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
chore(grafana): relative CPU usage #17401
Changes from 2 commits
39503a2
040bcce
57fa4b3
28ba9fd
127b8ef
cebff3b
9de03b4
586be50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,13 +88,24 @@ def section_cluster_node(outer_panels): | |
"cpu usage (total) - {{%s}} @ {{%s}}" | ||
% (COMPONENT_LABEL, NODE_LABEL), | ||
), | ||
panels.target( | ||
panels.target( | ||
f"sum(rate({metric('process_cpu_seconds_total')}[$__rate_interval])) by ({COMPONENT_LABEL}, {NODE_LABEL}) / avg({metric('process_cpu_core_num')}) by ({COMPONENT_LABEL}, {NODE_LABEL}) > 0", | ||
"cpu usage (avg per core) - {{%s}} @ {{%s}}" | ||
% (COMPONENT_LABEL, NODE_LABEL), | ||
), | ||
], | ||
), | ||
panels.timeseries_cpu( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is depend on k8s metrics, that means we need a flag to ensure it only can be used in Cloud ENV There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me look into that... So far I was fine with the way it is. In the risedev env it will simply show no data |
||
"Node CPU relative", | ||
"CPU usage relative to resource limit of container", | ||
[ | ||
panels.target( | ||
"(sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",container=~\"$component\",pod=~\"$pod\"}[$__rate_interval])) by (namespace, pod)) / (sum(kube_pod_container_resource_limits{namespace=~\"$namespace\",pod=~\"$pod\",container=~\"$component\", resource=\"cpu\"}) by (namespace, pod))", | ||
"cpu usage @ {{%s}} @ {{%s}}" | ||
% (COMPONENT_LABEL, NODE_LABEL), | ||
), | ||
], | ||
), | ||
panels.timeseries_count( | ||
"Meta Cluster", | ||
"RW cluster can configure multiple meta nodes to achieve high availability. One is the leader and the " | ||
|
Large diffs are not rendered by default.
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.
I guess
update
means there already has been one grafana running 🤔 no need to callrisedev full
to start a new cluster.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.
Will undo this change. I added it here, because I did not have a cluster running 😁