与Sensu一起使用Docker

我是Docker的新手,想用Sensu来监视容器。 我已经使用以下材料build立了一个Sensu服务器和Sensu客户端(我的Docker容器正在运行):点击[here]( http://devopscube.com/monitor-docker-containers-guide/ )

在运行以下命令时,我在Uchiwa Dashboard中获取了Sensu客户端信息:

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 

但是,当我尝试从同一个主机发射一个新的容器,我没有得到客户在Uchiwa仪表板的信息。

如果有人使用Sensu和Docker来监控Docker容器可以指导相同,那将是非常好的。

谢谢你的时间。

请记住sensu客户端的'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) '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)