参考:https://www.emqx.com/zh/blog/emqx-prometheus-grafana#%E5%90%AF%E5%8A%A8-emqx-statsd-%E6%8F%92%E4%BB%B6
https://www.emqx.io/docs/zh/v4.3/tutorial/prometheus.html#%E9%85%8D%E7%BD%AE

1.被监控端安装pushgateway

  1. docker run -d -p 9091:9091 prom/pushgateway
  2. cat /opt/tgzs/prometheus-2.25.2.linux-amd64/prometheus.yml
  3. - job_name: 'pushgateway'
  4. scrape_interval: 5s
  5. honor_labels: true
  6. static_configs:
  7. - targets: ['192.168.0.107:9091']

2.查看Prometheus Targets状态

image.png

3.emqx 启动emqx_statsd插件

image.png

4.Prometheus查看emqx监控项

image.pngimage.png

5.Grafana导入emqx dashboards

image.pngimage.png
EMQ_Dashboard.jsonEMQ.jsonErlangVM.json