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

Revamp Docker check, more metrics, less bugs, support of CoreOS #1043

Merged
merged 3 commits into from
Jul 21, 2014

Conversation

LotharSee
Copy link
Contributor

Revamp the Docker check and its configuration.

First, it fixes:

But also:

  • Now we can add optional tags in the configuration
  • Clarify configuration example
  • Support CoreOS

It is also a bit more flexible (if we want to support a new cgroup hierarchy) with better logging/warning.

for metric in LXC_METRICS:
self._mountpoints[metric["cgroup"]] = self._find_cgroup(metric["cgroup"])
self._path_prefix = None
docker_root = init_config.get('docker_root', '/')
Copy link

Choose a reason for hiding this comment

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

Will the default behavior work with existing users that don't have this new parameter set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this parameter is useful when the Agent run inside a container. When we do that, we can mount some part of the host filesystem to a directory, which should be this docker_root. Then we use it as the root for our Docker daemon. By default, it is /, which means that we keep the normal behavior.

@remh
Copy link

remh commented Jul 18, 2014

Thanks it looks great!

What's the behavior on Docker 0.9 now ?

@LotharSee
Copy link
Contributor Author

The error got replaced by a more generic one:
"Cannot find Docker cgroup directory. Be sure your system is supported."

So that we will be able to detail it in our documentation.

@remh
Copy link

remh commented Jul 21, 2014

👍

remh pushed a commit that referenced this pull request Jul 21, 2014
Revamp Docker check, more metrics, less bugs, support of CoreOS
@remh remh merged commit e9cf6ce into master Jul 21, 2014
@andyshinn
Copy link

Very cool! Excited to try out the CoreOS support when 5.0 drops. Thank you!

@remh remh deleted the docker-revamp branch October 20, 2014 03:25
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.

3 participants