python-diamond / Diamond

Diamond is a python daemon that collects system metrics and publishes them to Graphite (and others). It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.
http://diamond.readthedocs.org/
MIT License
1.74k stars 600 forks source link

Docker-collector in version 4.0.809 crash with error #687

Closed MetikovVadim closed 6 years ago

MetikovVadim commented 6 years ago

Hello there!

There is no metrics from Diamond Docker collector. In the log i found only: [MainThread] Collector failed! Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/diamond/utils/scheduler.py", line 77, in collector_process collector._run() File "/usr/lib/python2.7/site-packages/diamond/collector.py", line 477, in _run self.collect() File "/usr/share/diamond/collectors/docker_collector/docker_collector.py", line 66, in collect client = docker.Client(version='auto') AttributeError: 'module' object has no attribute 'Client'

How to fix that?

MetikovVadim commented 6 years ago

Resolved by downgrade CentOS, install dockerpy and others.

gummeah commented 6 years ago

AFAIK the reason is conflict between docker and docker-py python modules. docker module is the new version of docker-py. New versions of docker-compose, for example, using docker. And Diamond is using docker-py.

gummeah commented 6 years ago

This should fix it.