prometheus + grafana部署RabbitMQ監控


prometheus + grafana部署RabbitMQ監控

1、grafana導入dashboards

https://grafana.com/dashboards/2121

 

 

2、export部署

下載:https://github.com/kbudde/rabbitmq_exporter/releases

tar -xvf rabbitmq_exporter-0.20.0.linux-amd64.tar.gz
cd rabbitmq_exporter-0.20.0.linux-amd64
RABBIT_USER=guest RABBIT_PASSWORD=guest OUTPUT_FORMAT=JSON PUBLISH_PORT=9099 RABBIT_URL=http://localhost:15672 nohup ./rabbitmq_exporter &

3、prometheus配置prometheus.yml 

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ['localhost:9090']

  - job_name: 'mysql'
    static_configs:
      - targets: ['10.10.83.162:9104']
        labels:
          instance: db-10.10.83.162

  - job_name: 'redis_exporter'
    static_configs:
      - targets: ['10.10.83.162:9121']
        labels:
          instance: redis-10.10.83.162

  - job_name: 'RabbitMQ'
    static_configs:
      - targets: ['10.10.83.162:9099']
        labels:
          instance: RabbitMQ-10.10.83.162

重啟服務nohup /opt/prometheus-1.6.2.linux-amd64/prometheus &

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM