Distributed Docker Stats
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Distributed Docker Stats

It's a tool that collects containers resource usage and put them into etcd, so it makes its distributed across docker hosts.


Using resource usage grabbed from docker API via docker-py python module. To speed things up collecting data is started concurrently via multiprocessing. Host and containers keys are set with etcd TTL.

Runtime configuration

Environment variables on container run:

  • DDS_ETCD_URL - full URL path to etcd
  • DDS_CONCURRENCY_LEVEL - how many processes running (default: 8)

Available metrics per container

  • nettx - network TX in bytes
  • netrx - network RX in bytes
  • cpuusage - CPU usage in percentage
  • memusage - memory usage in bytes
  • memusagepercent - memory usage in percentage


  • etcd only via http and without authentication
  • scalabilty issues
  • no I/O stats
  • no client available yet
  • not yet battle tested - rather concept now

Sample usage

  1. Clone github repo: $ git clone https://github.com/witalisoft/dds.git
  2. Build container image: $ sudo docker build -t dds:latest -f Dockerfile .
  3. Run container: $ sudo docker run -d -h setyourhostname -v /var/run/docker.sock:/var/run/docker.sock -e DDS_ETCD_URL="" dds:latest
  4. Application is available under: $ curl 2>/dev/null | python -m json.tool | less
                "createdIndex": 3436,
                "dir": true,
                "expiration": "2015-12-21T11:42:44.058363419Z",
                "key": "/setyourhostname",
                "modifiedIndex": 3436,
                "nodes": [
                        "createdIndex": 3438,
                        "dir": true,
                        "key": "/setyourhostname/cranky_goldstine",
                        "modifiedIndex": 3438,
                        "nodes": [
                                "createdIndex": 3520,
                                "key": "/setyourhostname/cranky_goldstine/memusagepercent",
                                "modifiedIndex": 3520,
                                "value": "0.0"