Sensu Client Docker container Metrics

Hello,

Does anybody uses the memory, cpu , network plugins to gather metrics from sensu? It was my understanding that inside a container we cannot have does kind of metrics because they are low level information shared from the linux host. Does anybody knows of a way to gather metrics from inside a docker container with a sensu client and sensu checks system?

Hey Carlos,

The real question is, are those metrics even useful? Maybe, but imo not very likely. If you really want to run things inside a container, you can essentially shell out to docker exec from sensu or parse something like:

sudo docker stats --no-stream (I’m guessing this is even available via the API somewhere)

OR checkout https://github.com/sensu-plugins/sensu-plugins-docker, which includes a few metric scripts.

Thanks,

Josh

···

On Mon, Jun 20, 2016 at 5:04 AM, carlos.carvalho@nbrsolutions.pt wrote:

Hello,

Does anybody uses the memory, cpu , network plugins to gather metrics from sensu? It was my understanding that inside a container we cannot have does kind of metrics because they are low level information shared from the linux host. Does anybody knows of a way to gather metrics from inside a docker container with a sensu client and sensu checks system?

Hello Josh,

If I understood you correctly, you are saying that I need to install a sensu client on the docker host so that docker plugins scripts can run, I’m right? But I kind dislike this option as I’m adding another dependency on the docker host…

What I was trying to accomplish was avoiding the creation of another sensu client on the docker host. My infrastructure already has many containers running as clients and was hoping that on docker sensu could work with the creation of proper containers for each role( clients + sensu server + uchiwa dashboard ) .

It’s a pity :frowning:

···

On Monday, June 20, 2016 at 5:58:34 PM UTC+1, Joshua Pasqualetto wrote:

Hey Carlos,

The real question is, are those metrics even useful? Maybe, but imo not very likely. If you really want to run things inside a container, you can essentially shell out to docker exec from sensu or parse something like:

sudo docker stats --no-stream (I’m guessing this is even available via the API somewhere)

OR checkout https://github.com/sensu-plugins/sensu-plugins-docker, which includes a few metric scripts.

Thanks,

Josh

On Mon, Jun 20, 2016 at 5:04 AM, carlos....@nbrsolutions.pt wrote:

Hello,

Does anybody uses the memory, cpu , network plugins to gather metrics from sensu? It was my understanding that inside a container we cannot have does kind of metrics because they are low level information shared from the linux host. Does anybody knows of a way to gather metrics from inside a docker container with a sensu client and sensu checks system?