-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Grab kube_node_info as kubernetes_state.node.count #4383
Conversation
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.
Thanks for the patch, looks reasonable. The existing tests need to be fixed, and it'd be nice to assert the new metric as well. We need to update metadata.csv, too.
Some people might want to graph kubelet counts grouped by kubelet_version or os_image, e.g. to track a Kubernetes upgrade over time.
Codecov Report
|
Codecov Report
|
I knew there was more. I fixed metadata (collecting the metric once a minute is plenty) and the tests. I didn't clean up unusual characters in the tags (spaces, colons, slashes), e.g. in os_image and container_runtime_version: should it be done? |
Thanks @therc! The interval in metadata.csv doesn't impact the collection freq, it's used for in-app interpolation between the As for unusual characters, this is handled automatically. Characters that are not valid in tag values are replaced with cc @JulienBalestra until the feature we talked about lands I think you will find this useful. |
Thanks, @hkaj. I saw that, as far as the tests are concerned, the invalid characters are preserved, but it makes sense for them to be sanitised downstream (in the statsd client, dd-agent or even on the server side, perhaps all). |
@therve is this good to go? |
What does this PR do?
It picks the kubelet's kube_node_info metric and exports it as kubernetes_state.node.count.
Motivation
Some people might want to graph kubelet counts grouped by kubelet_version or os_image, e.g. to track a Kubernetes upgrade over time.
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached