I’m try to monitor it.
docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc
ls -la /var/run/docker/libcontainerd/docker-containerd.sock
srw-rw---- 1 root docker 0 Oct 17 11:48 /var/run/docker/libcontainerd/docker-containerd.sock
My telegraf is in the group docker
cat /etc/group |grep teleg
docker:x:168:telegraf
telegraf:x:8233:
Without SSL in inputs.docker I have this error
E! Error in plugin [inputs.docker]: Get http://%2Fvar%2Frun%2Fdocker%2Flibcontainerd%2Fdocker-containerd.sock/containers/json?limit=0: malformed HTTP response “\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\b\x00\x00\x00\x00\x00\x00\x0e\xff\xf1”.
Are you trying to connect to a TLS-enabled daemon without TLS?
And With TLS enable
2017-10-17T14:40:00Z E! Error in plugin [inputs.docker]: error during connect: Get https://%2Fvar%2Frun%2Fdocker%2Flibcontainerd%2Fdocker-containerd.sock/containers/json?limit=0: tls: first record does not look like a TLS handshake
I’ve never used docker-containerd directly, from what I can find its socket uses a different API from docker.sock which would mean it is incompatible with Telegraf. Why do you use docker-containerd.sock instead of docker.sock?
I think it won’t be possible to use the docker input plugin with the containerd socket and we would need a new plugin that supports the containerd GRPC API.
@gianarb you probably know more about this than I do, does this sound correct to you?
@jcmartins Have you tried the mesos input plugin, maybe it can be useful here? We could also open a new issue on the Telegraf issue tracker for containerd support.
I think there is a good chance the marathon plugin will slip to a later release too. I’m just grasping at straws here, but maybe it is possible to use the cgroups plugin?
I never worked with containerd 0.2.0 that much (0.2.0 is the version behind Docker right now).
I looked at the code and it exposes a grpc entry point called Events (containerd/server.go at v0.2.x · containerd/containerd · GitHub). It can be the good entry point to get some metrics out from containerd. But I am 100% sure that the approach of using docker input pointed to contained socket can’t work because the data are different.
If we are looking to support containerd 0.2.0 we should write a new plugin.
Just to let you know, at some point in the history, not too far from now, Docker will embed a totally new version of contained (1.0.0). It will expose a prometheus aware entry point that we will be able to use.
But with now we need a new plugin to monitor containerd properly.