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

[ksmcore] Remap unknown to warning for 'node.ready' service check #10549

Merged
merged 2 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func statusForCondition(status string, positiveEvent bool) metrics.ServiceCheckS
}
return metrics.ServiceCheckOK
case "unknown":
if positiveEvent {
return metrics.ServiceCheckWarning
}
return metrics.ServiceCheckUnknown
default:
log.Tracef("Unknown 'status' label: '%s'", status)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ func Test_nodeConditionTransformer(t *testing.T) {
expectedServiceCheck: &serviceCheck{
name: "kubernetes_state.node.ready",
tags: []string{"node:foo", "condition:Ready", "status:unknown"},
status: metrics.ServiceCheckUnknown,
status: metrics.ServiceCheckWarning,
message: "foo is currently reporting Ready = unknown",
},
expectedMetric: &metricsExpected{
Expand Down
12 changes: 12 additions & 0 deletions releasenotes/notes/ksmcore-6fd90b79747b6321.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Each section from every release note are combined when the
# CHANGELOG.rst is rendered. So the text needs to be worded so that
# it does not depend on any information only available in another
# section. This may mean repeating some details, but each section
# must be readable independently of the other.
#
# Each section note must be formatted as reStructuredText.
---
enhancements:
- |
KSMCore `node.ready` service check now reports `warning`
instead of `unknown` when a node enters an unknown state.