Using Docker with Sensu

872 views Asked by At

i am a Novice in Docker and wanted to use Sensu for monitoring containers. I have set up a Sensu server and Sensu client ( where my Docker containers are running ) using the below material: Click [here] (http://devopscube.com/monitor-docker-containers-guide/)

I get the Sensu client information in Uchiwa Dashboard while running the below command:

docker run -d --name sensu-client --privileged                                \
-v $PWD/load-docker-metrics.sh:/etc/sensu/plugins/load-docker-metrics.sh  \
-v /var/run/docker.sock:/var/run/docker.sock                              \
usman/sensu-client SENSU_SERVER_IP RABIT_MQ_USER RABIT_MQ_PASSWORD CLIENT_NAME CLIENT_IP

However, when i try to fire a new container from the same host machine , i do not get the information of the client in Uchiwa Dashboard.

It would be great if anyone have used Sensu with Docker to monitor Docker containers can guide on the same.

Thanks for the time.

Please logs of the sensu-client 'Supervisord is running as root and it is searching ' 2017-01-09 04:11:47,210 CRIT Supervisor running as root (no user in config file) 2017-01-09 04:11:47,212 INFO supervisord started with pid 12 2017-01-09 04:11:48,214 INFO spawned: 'sensu-client' with pid 15 2017-01-09 04:11:49,524 INFO success: sensu-client entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2017-01-09 04:11:49,530 INFO exited: sensu-client (exit status 0; expected) [ec2-user@ip-172-31-0-89 sensu-client]$ sudo su [root@ip-172-31-0-89 sensu-client]# docker logs sensu-client /usr/lib/python2.6/site-packages/supervisor-3.1.3-py2.6.egg/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations ( including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. 'Supervisord is running as root and it is searching ' 2017-01-09 04:11:47,210 CRIT Supervisor running as root (no user in config file) 2017-01-09 04:11:47,212 INFO supervisord started with pid 12 2017-01-09 04:11:48,214 INFO spawned: 'sensu-client' with pid 15 2017-01-09 04:11:49,524 INFO success: sensu-client entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2017-01-09 04:11:49,530 INFO exited: sensu-client (exit status 0; expected)

0

There are 0 answers