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

docker running but metrics-docker-container.rb says it's not #11

Open
soichih opened this issue Sep 14, 2015 · 4 comments
Open

docker running but metrics-docker-container.rb says it's not #11

soichih opened this issue Sep 14, 2015 · 4 comments

Comments

@soichih
Copy link

soichih commented Sep 14, 2015

I have a working docker engine on my machine, and I can do docker ps / info etc..

docker info
Containers: 10
Images: 202
Storage Driver: devicemapper
 Pool Name: docker-253:0-1382736-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs
 Data file:
 Metadata file:
 Data Space Used: 5.304 GB
 Data Space Total: 107.4 GB
 Data Space Available: 102.1 GB
 Metadata Space Used: 9.257 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.138 GB
 Udev Sync Supported: true
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Kernel Version: 3.10.0-229.7.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 2
Total Memory: 3.703 GiB
Name: core1.ppa.iu.edu
ID: KC6Z:U7IE:FCGQ:Y6ST:AL6K:VYNF:3NGC:ZA4H:LNWI:EI7K:EHPS:MPLE

But.. when I run metrics-docker-container.rb I get following error message.

# metrics-docker-container.rb
time="2015-09-14T17:07:54Z" level=fatal msg="Cannot connect to the Docker daemon. Is 'docker -d' running on this host?"

I tried "-H localhost" but that didn't fix it. What am I missing?

@jaarandaz
Copy link

Maybe sensu-client user cannot execute docker stats?
sudo -u sensu /usr/bin/docker ps

@eheydrick
Copy link
Contributor

Is this still any issue for you?

@eheydrick
Copy link
Contributor

By default this plugin connects to port 2376, the TLS port. If your docker daemon is listening on port 2375 you'll need to adjust your check i.e. metrics-docker-container.rb -H tcp://127.0.1.1:2375. You can also use the unix socket metrics-docker-container.rb -H unix:///var/run/docker.sock. We should probably change the default port to 2375 as that's what all the other plugins use.

@crispibits
Copy link

Just in case anyone else comes across this, adding sensu to the 'docker' group and using the unix socket works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants