Monitoring EMQX 5.0 with Prometheus and Grafana

When using EMQX, it is necessary for users, operators and developers to monitor and observe the running status and metrics of it in time to find problems and deal with them. In addition to using the built-in Dashboard, EMQX also provides APIs to integrate monitoring data into third-party monitoring platforms to monitor the running status of EMQX, including cluster node status, connections, subscriptions and topics, message throughput, and other related metrics.

In this article, we will introduce how to integrate the monitoring data of EMQX 5.0 into Prometheus, use Grafana to display the monitoring data of EMQX, and finally build a simple EMQX monitoring system.

Learn More →

1 Like

Great article. I used the pushgateway on the grafana/prometheus server (docker container) and I installed node-exporter on the EMQX system (it’s a LXC on Proxmox).

The node-exporter installation instructions are a bit unclear, if you want to set it up as a systemd service.

If anyone needs it, here are the steps I used to setup node-exporter as a service on debian/ubuntu:

wget -q -O node_exporter-1.5.0.linux-amd64.tar.gz ""
tar xvzf node_exporter-1.5.0.linux-amd64.tar.gz
cd node_exporter-1.5.0.linux-amd64
mv ./node_exporter /usr/sbin/node_exporter
adduser --system --no-create-home --group --disabled-login node_exporter
mkdir -p /var/lib/node_exporter/textfile_collector
mkdir -p /etc/sysconfig
wget -q -O /etc/sysconfig/node_exporter
wget -q -O /lib/systemd/system/node_exporter.socket
wget -q -O /lib/systemd/system/node_exporter.service
chown -R node_exporter:node_exporter /var/lib/node_exporter/textfile_collector
chown -R node_exporter:node_exporter /etc/sysconfig
systemctl enable node_exporter.socket
systemctl enable node_exporter.service
systemctl restart node_exporter.socket
systemctl restart node_exporter.service

1 Like

Hi! Thanks for your feedback! It’s because the installation command of Node-Exporter is not uniform, need to distinguish the version number, and only supports the *nix system. The official does not recommend the use of Docker installation.
So we only provide a link to the official documentation of the installation and let the user install their own. Although this makes this article a little cut and unclear, I think this is a good way for this optional module section. If you believe it can be improved, feel free to click the edit button in the article to enhance the quality of this article.