Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lebauce/docker-collectd-plugin
docker-collectd-plugin
https://github.com/lebauce/docker-collectd-plugin
Last synced: 1 day ago
JSON representation
docker-collectd-plugin
- Host: GitHub
- URL: https://github.com/lebauce/docker-collectd-plugin
- Owner: lebauce
- License: gpl-2.0
- Created: 2015-02-16T14:10:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-09-29T17:01:46.000Z (about 2 years ago)
- Last Synced: 2024-10-31T18:37:47.726Z (8 days ago)
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 106
- Watchers: 11
- Forks: 96
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - lebauce/docker-collectd-plugin - docker-collectd-plugin (others)
README
# docker-collectd-plugin
[![Build Status](https://travis-ci.org/lebauce/docker-collectd-plugin.svg?branch=master)](https://travis-ci.org/lebauce/docker-collectd-plugin)
A [Docker](http://docker.io) plugin for [collectd](http://collectd.org)
using [docker-py](https://github.com/docker/docker-py) and collectd's
[Python plugin](http://collectd.org/documentation/manpages/collectd-python.5.shtml).This uses the new stats API (https://github.com/docker/docker/pull/9984)
introduced by Docker 1.5.The following container stats are reported for each container:
* Network bandwidth
* Memory usage
* CPU usage
* Block IOThe 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`.
1. Install the Python requirements with `pip install -r
requirements.txt`.
1. Configure the plugin (see below).
1. Restart collectd.## Configuration
Add the following to your collectd config:
```
TypesDB "/usr/share/collectd/docker-collectd-plugin/dockerplugin.db"
LoadPlugin pythonModulePath "/usr/share/collectd/docker-collectd-plugin"
Import "dockerplugin"
BaseURL "unix://var/run/docker.sock"
Timeout 3
```
*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+