通过rabbitmq的web监控mcollective的状态
1、开启插件
[root@linuxmaster modules]# rabbitmq-plugins enable rabbitmq_management #开启rabbitmq的web管理插件The following plugins have been enabled: mochiweb webmachine rabbitmq_web_dispatch rabbitmq_management_agent rabbitmq_managementPlugin configuration has changed. Restart RabbitMQ for changes to take effect.
2、重启rabbitmq-server服务
[root@linuxmaster modules]# /etc/init.d/rabbitmq-server restartRestarting rabbitmq-server: SUCCESSrabbitmq-server.
3、通过日志查看插件是否正常被加载
[root@puppetserver rabbitmq]# tailf /var/log/rabbitmq/rabbit\@puppetserver.log #可以从日志看到stomp插件加载成功=INFO REPORT==== 25-Nov-2013::15:49:54 ===Server startup complete; 7 plugins started. * amqp_client * mochiweb * rabbitmq_management * rabbitmq_management_agent * rabbitmq_stomp * rabbitmq_web_dispatch * webmachine
4、通过查看端口是否被监听
[root@linuxmaster modules]# netstat -nlp | grep beam tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 4691/beam tcp 0 0 0.0.0.0:55672 0.0.0.0:* LISTEN 4691/beam tcp 0 0 0.0.0.0:57372 0.0.0.0:* LISTEN 4691/beam tcp 0 0 :::61613 :::* LISTEN 4691/beam tcp 0 0 :::5672 :::* LISTEN 4691/beam
备注:55672为web管理端口
5、创建web管理用户
[root@linuxmaster1poc modules]# rabbitmqctl add_user web_admin 123.com #添加web监听账户Creating user "web_admin" ......done.
6、设置web管理用户的角色
[root@linuxmaster modules]# rabbitmqctl set_user_tags web_admin monitoring #设置用户角色Setting tags for user "web_admin" to [monitoring] ......done.
7、查看设置的用户是否正确
[root@puppetserver sbin]# rabbitmqctl list_users #查看监听用户Listing users ...mcollective []web_admin [monitoring]...done.
8、通过web进行查看
添加用户:
rabbitmqctl add_user admin 123456
rabbitmqctl set_user_tags admin administrator
如需更改密码:
rabbitmqctl change_password admin adminpass
编辑vi /etc/rabbitmq/rabbitmq.config (如果没有此文件创建既可)
[{rabbit, [{loopback_users, []}]}].
重启服务:
sudo service rabbitmq-server restart
在IE浏览器输入 进行访问