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 missing cadvisor machine metrics #97006
Fix missing cadvisor machine metrics #97006
Conversation
Hi @lingsamuel. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig node |
/cc @dashpole |
/cc @shubheksha |
/ok-to-test |
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.
lgtm
@@ -551,6 +551,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, | |||
if err != nil { | |||
return nil, err | |||
} | |||
machineInfo.Timestamp = time.Time{} |
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.
Just to refresh my memory, does this cause timestamps not to be set for metrics, or does it set the timestamp at 0?
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.
The collector will not include a timestamp because it is set to zero: https://github.com/google/cadvisor/blob/65fa5b44d3840d465a5c004a0f6722e0fd540137/metrics/prometheus_machine.go#L240
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.
makes sense. A comment would be helpful for future readers.
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.
Added. Leaving this unresolved so others can find this.
/approve |
8420910
to
dea53ee
Compare
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
dea53ee
to
a4037d2
Compare
/retest |
/lgtm This is a regression from a previous version, so labeling it appropriately. |
Can someone approve this? |
/assign @sjenning |
ping @sjenning @mrunalp @derekwaynecarr -- serious metric regression that needs backporting ASAP |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dashpole, lingsamuel, mrunalp The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…06-upstream-release-1.20 Automated cherry pick of #97006: Fix cadvisor machine metrics
…06-upstream-release-1.19 Automated cherry pick of #97006: Fix cadvisor machine metrics
I am currently using Kubernetes v1.19.1 and facing this missing machine_* metrics issue. Can I please get to know to which version I need to in which this issue is fixed. |
Looks like this landed in 1.19.7: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#changelog-since-v1196 |
Signed-off-by: Ling Samuel lingsamuelgrace@gmail.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix missing cadvisor machine metrics.
From #95210 and comment since the author has not been active recently.
Should be backported to 1.19.
Which issue(s) this PR fixes:
Fixes #95204
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: