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

Add plugin for Docker #71

Closed
oli-g opened this issue Oct 4, 2016 · 10 comments
Closed

Add plugin for Docker #71

oli-g opened this issue Oct 4, 2016 · 10 comments
Assignees

Comments

@oli-g
Copy link
Contributor

oli-g commented Oct 4, 2016

Hi @anryko

I think that supporting the Docker Collectd plugin could be another nice addition to your dashboards. That plugin adoption is emerging within the Docker community (check this post as an example).

What do you think?

@anryko
Copy link
Owner

anryko commented Oct 4, 2016

Hi @oli-g

Great idea! I'll definitely dig in to it during the weekend.
Thanks!

@anryko anryko self-assigned this Oct 8, 2016
@anryko
Copy link
Owner

anryko commented Oct 8, 2016

Didn't succeed in setting up docker plugin to pass statistics to influxdb so far. Encountered reported issue: lebauce/docker-collectd-plugin#37. Will investigate more.

@oli-g does this collectd docker plugin work for you?

@oli-g
Copy link
Contributor Author

oli-g commented Oct 11, 2016

I'm going to try adding the plugin to my collectd Docker image, then I'll get back to you. Thanks for looking into this!

@oli-g
Copy link
Contributor Author

oli-g commented Oct 11, 2016

Here you can find a Collectd Docker image already including the Docker plugin: https://github.com/signalfx/docker-collectd.

They explained their process here: https://signalfx.com/blog/monitoring-docker-at-scale-with-signalfx/.

@oli-g
Copy link
Contributor Author

oli-g commented Oct 11, 2016

@anryko Hey, I would suggest you to run our collectd Docker image with docker-collectd-plugin preinstalled. Just run something like:

docker run \
    -d \
    --name collectd \
    --hostname foo \
    --privileged \
    --volume /proc:/mnt/proc:ro \
    --volume /etc/collectd:/etc/collectd \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    chimeradev/collectd:5.5.0-3

Make sure to add the following lines to your /etc/collectd/collectd.conf:

TypesDB     "/usr/share/collectd/types.db"
TypesDB     "/usr/share/collectd/docker-collectd-plugin/dockerplugin.db"
# ....
<LoadPlugin python>
  Globals true
</LoadPlugin>
# ....
<Plugin python>
   ModulePath "/usr/share/collectd/docker-collectd-plugin"
   LogTraces true
   Interactive false
   Import "dockerplugin"
   <Module dockerplugin>
       BaseURL "unix://var/run/docker.sock"
       Timeout 3
   </Module>
</Plugin>

Now run any other container on the same host: you should be able to see Docker metrics coming to your InfluxDB instance.

@anryko
Copy link
Owner

anryko commented Oct 15, 2016

@oli-g hey,thanks for detailed howto on your setup. It was very helpful. Please checkout initial implementation and let me know what you think.

I encountered the same issue as with processes extended metrics, when for the same metric in some graphs I want to see instances combined and in others separated. Last time I approached it by splitting metric in to two plugins. However, this time the same approach would look ugly. So I added possibility to setup 'multi': (true|fasle) per graph. Seems to work well for this case.

I'm going to rework processes plugin in the same manner. What do you think about that?

anryko added a commit that referenced this issue Oct 21, 2016
@anryko
Copy link
Owner

anryko commented Oct 21, 2016

Merged docker plugin.

@anryko anryko closed this as completed Oct 21, 2016
@oli-g
Copy link
Contributor Author

oli-g commented Oct 25, 2016

@anryko Hi! Sorry for not giving you that feedback. I already tested the new Docker plugin integration, and it looks good to me. Just one question: where should I set 'multi': (true|fasle)?

@anryko
Copy link
Owner

anryko commented Oct 25, 2016

@almereyda
Copy link

almereyda commented Jun 2, 2017

@oli-g I couldn't find the source files for chimeradev/collectd:5.5.0-3 anywhere on GitHub or the web. Would you mind sharing them for trustability?
Right now it feels wrong to run an unknown container with priviledged access to the docker host.
See https://github.com/ecobytes/collectd-influxdb-grafana-docker/commit/22b8cb634a309e4160c7ee3bd28c2f347e124cb5
Additionally I wonder what https://hub.docker.com/r/olinicola/grafana-collectd-dashboards/ intends to provide.

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

No branches or pull requests

3 participants