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

Docker RestartCount Stats #1647

Closed
rikatz opened this issue May 4, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@rikatz
Copy link
Contributor

commented May 4, 2017

Docker provides a RestartCount stats.

This stats is used to monitor how many times a container was restarted, and this count increase may represent some kind of problem (like an OOM kill).

It would be great if cAdvisor collects this metric also, so we can put this on Prometheus and alert on some unexpected problem.

Thanks!

@dashpole

This comment has been minimized.

Copy link
Collaborator

commented May 4, 2017

How does docker expose this value? We currently only monitor by using cgroups, so this may be a large change if we need to use docker's api.

@rikatz

This comment has been minimized.

Copy link
Contributor Author

commented May 4, 2017

Hi @dashpole.

Actually it exposes through API and not through cgroups. I was trying to search were in the code cAdvisor gets its data.

I don't think it's limited to cgroups, because of the 'Labels' and Image retrieval, but I couldn't figure out how to add also the restartCount metrics :)

Something probably specified here:

type ContainerInfo struct {

Thanks!

@rikatz

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2017

@dashpole FIY, made a PR here using DockerHandler and the API :)

Hope this is right!

Thanks!

@rikatz

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2017

This was closed in PR #1649

@rikatz rikatz closed this May 31, 2017

@sirlatrom

This comment has been minimized.

Copy link

commented Jun 28, 2017

Any chance of a follow-up where this would be a separate metric, instead of or in addition to being a metric label?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.