prometheus + grafana部署RabbitMQ监控

时间:2022-07-27 15:12:25

prometheus + grafana部署RabbitMQ监控

1、grafana导入dashboards

https://grafana.com/dashboards/2121

prometheus + grafana部署RabbitMQ监控

prometheus + grafana部署RabbitMQ监控 prometheus + grafana部署RabbitMQ监控

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 &

prometheus + grafana部署RabbitMQ监控