rabbitmq_exporter 安装

  1. 下载二进制包
wget https://github.com/kbudde/rabbitmq_exporter/releases/download/v1.0.0-RC5/rabbitmq_exporter-1.0.0-RC5.linux-amd64.tar.gz
tar xf rabbitmq_exporter-1.0.0-RC5.linux-amd64.tar.gz
mv rabbitmq_exporter-1.0.0-RC5.linux-amd64/rabbitmq_exporter /usr/local/bin
  1. 创建用户
useradd -M -s /sbin/nologin prometheus
  1. 创建服务
cat <> /usr/lib/systemd/system/rabbitmq_exporter.service
[Unit]
Description=rabbitmq_exporter
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
User=prometheus
DefaultEnvironment='RABBIT_USER=guest RABBIT_PASSWORD=guest OUTPUT_FORMAT=JSON PUBLISH_PORT=9419 RABBIT_URL=http://localhost:15672'
ExecStart=/usr/local/bin/rabbitmq_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
  1. 启动服务
systemctl enable rabbitmq_exporter && systemctl start rabbitmq_exporter
  1. 配置prometheue.yml
...
  - job_name: 'rabbitmq'
    static_configs:
    - targets:
      - rabbitmq:9419
  1. 导入模版
https://gitee.com/llmgo/dashboards/raw/master/prometheus_rabbitmq.json

  • https://github.com/kbudde/rabbitmq_exporter
  • https://www.rabbitmq.com/prometheus.html

你可能感兴趣的:(rabbitmq_exporter 安装)