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 docker engine collector #356

Conversation

ChristianKniep
Copy link

Collector to fetch /metrics endpoint of experimental metrics-addr feature.

rootdir: ./src/github.com/ChristianKniep/tcollector, inifile:
plugins: cov-2.4.0
collected 4 items

collectors/test/test_docker_engine.py ....

---------- coverage: platform darwin, python 2.7.12-final-0 ----------
Name                            Stmts   Miss  Cover
---------------------------------------------------
collectors/0/docker_engine.py      68     18    74%

Example output:

$ python collectors/0/docker_engine.py
docker.engine_daemon_container_actions_seconds_bucket 1481211084 1.0 action=changes le=0.005
docker.engine_daemon_container_actions_seconds_bucket 1481211084 1.0 action=changes le=0.01
*snip*
docker.engine_daemon_engine_cpus_cpus 1481211084 2.0
docker.engine_daemon_engine_info 1481211084 1.0 architecture=x86_64 commit=88a45c4 graph_driver=aufs kernel=4.4.0-38-generic os=Ubuntu 16.04.1 LTS version=1.13.0-rc1
docker.engine_daemon_engine_memory_bytes 1481211084 4143755264.0
docker.engine_daemon_events_subscribers_total 1481211084 0.0
docker.engine_daemon_events_total 1481211084 8.0
docker.engine_daemon_health_checks_failed_total 1481211084 0.0
docker.engine_daemon_health_checks_total 1481211084 0.0
*snip*

ENABLED = docker_engine_conf.enabled()
METRICS_PATH = CONFIG['metrics_path']

if not ENABLED:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be in either inside DockerMetrics or inside main()?

@johann8384
Copy link
Member

Merged in #386

@johann8384 johann8384 closed this Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants