RabbitMQ Zabbix 监控

RabbitMQ Zabbix 监控

参考:
https://github.com/jasonmcintosh/rabbitmq-zabbix

  1. copy api.py list_rabbit_nodes.sh list_rabbit_queues.sh list_rabbit_shovels.sh rabbitmq-status.sh 共计5个脚本到 /usr/local/zabbix327/bin ,并对上述文件增加可执行权限.

  2. 配置 zabbix agent 配置文件:

    UserParameter=rabbitmq.discovery_queues,/usr/local/zabbix327/bin/list_rabbit_queues.sh
    UserParameter=rabbitmq.discovery_shovels,/usr/local/zabbix327/bin/list_rabbit_shovels.sh
    UserParameter=rabbitmq.discovery_nodes,/usr/local/zabbix327/bin/list_rabbit_nodes.sh
    UserParameter=rabbitmq[*],/usr/local/zabbix327/bin/rabbitmq-status.sh $1 $2 $3

  3. /usr/local/zabbix327/bin/ 新增文件 .rab.auth 内容如下:

    USERNAME=newadmin

    PASSWORD=s0m3p4ssw0rd

    CONF=/usr/local/zabbix327/etc/zabbix_agentd.conf

    LOGLEVEL=INFO

    LOGFILE=/tmp/zabbix_rabbitmq_zabbix.log

    PORT=15672

  4. 测试:
    # /usr/local/zabbix327/bin/list_rabbit_queues.sh

  5. 重启zabbix agentd

  6. 导入模板:rabbitmq.template.xml

对原模板进行了部分修改可以下载:RabbitTemplate

posted on 2019-03-29 15:49  非法操作  阅读(590)  评论(0编辑  收藏  举报

导航