add k8s.container.status.state metric #1784
Open
+130
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1672
Changes
Adds
k8s.container.status.state
metric, it would allow us to alert and monitor containers in not ready state.I'm still not sure if this should be multiple different metrics or a single one 🤔
The current problems, with single metric:
Waiting state - "ContainerCreating", "CrashLoopBackOff", "CreateContainerConfigError", "ErrImagePull", "ImagePullBackOff"
Terminated state - "OOMKilled", "Completed", "Error", "ContainerCannotRun"
Alternative approach would be to do what KSM does:
k8s.container.status.state
metric withoutreason
attribute.k8s.container.status.waiting_reason
metric for waiting reason enum.k8s.container.status.terminated_reason
metric for terminated reason enum.This is not intended to merge, I would appreciate any feedback to see what we want to do here.
Merge requirement checklist
[chore]