Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix inconsistent Prometheus cAdvisor metrics #51473
What this PR does / why we need it:
We need this because otherwise kubelet is exposing different sets of Prometheus metrics that randomly include or do not include containers.
See also google/cadvisor#1704; quoting here:
Prometheus requires that all metrics in the same family have the same labels, so we arrange to supply blank strings for missing labels
Since containers are collected in (somewhat) random order, depending on which kind is seen first you get one set of metrics or the other.
Changing the container labels function to always add the same set of labels, adding
Which issue this PR fixes (optional, in
Special notes for your reviewer:
I have made the same fix in two places. I am 98% sure the one in
Hi @bboreham. 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
I understand the commands that are listed here.
[APPROVALNOTIFIER] This PR is APPROVED
Associated issue: 50151
The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing
Aug 29, 2017
14 checks passed
referenced this pull request
Aug 29, 2017
No need to wait for others to do this.