Giter Club home page Giter Club logo

docker-collectd-plugin's Introduction

docker-collectd-plugin

Build Status

A Docker plugin for collectd using docker-py and collectd's Python plugin.

This uses the new stats API (moby/moby#9984) introduced by Docker 1.5.

The following container stats are reported for each container:

  • Network bandwidth
  • Memory usage
  • CPU usage
  • Block IO

The name of the container is used for the plugin_instance dimension.

Install

  1. Checkout this repository somewhere on your system accessible by collectd; for example as /usr/share/collectd/docker-collectd-plugin.
  2. Install the Python requirements with pip install -r requirements.txt.
  3. Configure the plugin (see below).
  4. Restart collectd.

Configuration

Add the following to your collectd config:

TypesDB "/usr/share/collectd/docker-collectd-plugin/dockerplugin.db"
LoadPlugin python

<Plugin python>
  ModulePath "/usr/share/collectd/docker-collectd-plugin"
  Import "dockerplugin"

  <Module dockerplugin>
    BaseURL "unix://var/run/docker.sock"
    Timeout 3
  </Module>
</Plugin>

Warning : Adding a custom TypesDB can raise a collectd error displaying :

Unhandled python exception in read callback: TypeError: Dataset gauge not found

To fix this you will have to explicitly add the path to the default types.db file. For instance, on debian-jessie, this will look like :

TypesDB "/usr/share/collectd/docker-collectd-plugin/dockerplugin.db"
TypesDB "/usr/share/collectd/types.db"

Requirements

  • docker-py
  • python-dateutil
  • docker 1.5+

docker-collectd-plugin's People

Contributors

agadufrat avatar boris317 avatar bullno1 avatar fredericfran-gds avatar jjcorrea avatar lebauce avatar mpetazzoni avatar sbadia avatar theonlydoo avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.