Skip to content
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

Scrapes cAdvisor port for metrics in Kubernetes 1.7 #477

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

alindeman
Copy link
Contributor

Kubernetes 1.7 inadvertently stopped reporting cAdvisor metrics on the main /metrics endpoint. They are now only reported on the cAdvisor /metrics endpoint. As a temporary solution, I've added the cAdvisor port to the kubelet endpoint and servicemonitor so they get scraped as well.

I'm not totally sure it's a good idea to merge this, since the original behavior might be restored soon, but I did want to bring it up in this repository in an attempt to save other folks some headdesking trying to figure out why pod-level metrics are not being reported in Kubernetes 1.7.

As a stopgap for my use case, I've built my own container with this fix and pushed it to a registry. Hopefully the original behavior will be restored in an upcoming point release of Kubernetes.

@coreosbot
Copy link

Can one of the admins verify this patch?

@fabxc
Copy link
Contributor

fabxc commented Jul 13, 2017

ok to test

Copy link
Contributor

@fabxc fabxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Just one small comment.

I discussed out of band that this was an accidental bug fix. We've been arguing for this to happen for a long time. I'm hoping for this to just get forward-fixed.

@@ -10,6 +10,9 @@ spec:
- port: http-metrics
interval: 30s
honorLabels: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed now as it only was needed for cAdvisor metrics.
Those being exposed on separate endpoints now is actually good from a monitoring perspective.

@fabxc
Copy link
Contributor

fabxc commented Jul 13, 2017

Can you run make docs to carry over the YAML changes into the guide?
The CI output is currently not publicly reachable. Sorry about that.

@alindeman
Copy link
Contributor Author

@fabxc Thanks for the review. I've adjusted the diff based on your feedback.

@mxinden
Copy link
Contributor

mxinden commented Jul 13, 2017

@alindeman @fabxc The CI failure is a false negative. Linting, unit and e2e tests succeeded. Sorry for the trouble.

@danp
Copy link

danp commented Jul 20, 2017

Heads up that kubernetes/kubernetes#48483 has been fixed by kubernetes/kubernetes#49079.

@brancz
Copy link
Contributor

brancz commented Jul 20, 2017

lgtm, thanks a lot @alindeman ! It's a good idea to separate out cAdvisor anyways.

@brancz
Copy link
Contributor

brancz commented Jul 20, 2017

@danp it seems like this is a solution that will continue working the same way as the separate path, but this is available now, so right now the better option.

@brancz brancz merged commit 08df0af into prometheus-operator:master Jul 20, 2017
@alindeman
Copy link
Contributor Author

lgtm, thanks a lot @alindeman ! It's a good idea to separate out cAdvisor anyways.

Perfect, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants