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
change kubelet probe metrics to counter #76074
Conversation
/cc @brancz @logicalhan |
Given that none of the popular alert/dashboard definitions use this metric, I'm inclined to just remove the old metric. |
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.
I'm okay with just deleting the old metric as well. As mentioned in the issue, I would be surprised if anyone is actually using it for alerting since it is probably pretty noisy.
@@ -98,16 +101,27 @@ func newWorker( | |||
w.initialValue = results.Success | |||
} | |||
|
|||
w.proberResultsMetricLabels = prometheus.Labels{ | |||
"probe_type": w.probeType.String(), | |||
"container_name": w.container.Name, |
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.
Woah, this is weird. I realize you didn't write this, but curious if anyone knows why we would have multiple labels on a metric which would always share the same label value?
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.
Are you talking about container and contaiber_name?
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.
Either. The previous implementation of this seems to store the same value for in both the container label and the container_name label. Same thing happens for pod and pod_name, which I find quite odd.
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.
You can verify it by outputting the actual metric output via curl.
prober_probe_result{container="etcd-container",container_name="etcd-container",namespace="kube-system",pod="etcd-server-events-kubernetes-master",pod_name="etcd-server-events-kubernetes-master",pod_uid="1234",probe_type="Liveness"} 0
Why do we have two labels which always have the same value in either of them?
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.
Super weird.
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.
This was for migration purposes. For a long time these and cadvisor metrics used pod_name and container_name label keys, which violate the instrumentation guidelines. For migration purposes in 1.14 both are present.
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.
Ah, that would explain it.
@brancz @logicalhan removed old metrics |
looks good from instrumentation side /lgtm still needs a kubelet approver though @derekwaynecarr @tallclair |
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
@dashpole, thoughts?
/lgtm |
/retest |
friendly ping @derekwaynecarr @tallclair , could you please help review it? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielqsj, tallclair 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 |
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
What type of PR is this?
/kind feature
/sig instrumentation node
What this PR does / why we need it:
As discussion in #75839, we prefer to using counter type of metrics for kubelet probe rather than gauge type.
Which issue(s) this PR fixes:
Fixes #75839
Special notes for your reviewer:
Does this PR introduce a user-facing change?: