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

fix(monitor): add node_role label for k8s_node_status_ready #1364

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

xiaosuiba
Copy link
Contributor

@xiaosuiba xiaosuiba commented Jun 10, 2021

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind bug

What this PR does / why we need it:
node_ready metrics chart in node monitoring is malfunctioning currently due to a lack of node_role label in k8s_node_status_ready. This pr will fix it by add node_role label to k8s_node_status_ready.
QL use in chart:

SELECT max(value) AS k8s_node_status_ready FROM global.autogen.k8s_node_status_ready WHERE node_role = 'Node' AND time >= '2021-06-10 05:58:52' AND time < '2021-06-10 06:58:52' GROUP BY time(1m), node

record in influxdb(before pr):

time name cluster_display_name cluster_id node prometheus prometheus_replica tenant_id value
1623133420405000000 k8s_node_status_ready TKE global ***** kube-system/k8s prometheus-k8s-0 default 1

record in influxdb(after pr):

time name cluster_display_name cluster_id node node_role prometheus prometheus_replica tenant_id value
1623307900405000000 k8s_node_status_ready TKE global ***** Node kube-system/k8s prometheus-k8s-0 default 1

Which issue(s) this PR fixes:

Fixes #1355

Special notes for your reviewer:
Currently I just copy the rule from 'k8s_node_status_ready_with_node_role', please check if it will affect something else.

Does this PR introduce a user-facing change?:

NONE


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@huxiaoliang huxiaoliang merged commit c1e4552 into tkestack:master Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

“异常状态” in the node monitoring is displayed incorrectly
2 participants