Skip to content

Prometheus

Starting from EMQX v4.2.0, emqx_statsd has been renamed to emqx_prometheus, and the names and directories of related plugins have been changed.

EMQX Broker provides emqx_prometheus plug-in, which is used to output the monitoring data of the system to the third-party monitoring system.

Take Prometheus as an example:

emqx_prometheus supports pushing data to Pushgateway, which is then pulled by Promethues Server for storage.

Tip

emqx_prometheus does not support the pull operation of Prometheus.

Configuration

The emqx_prometheus plugin internally starts a timer to collect the monitoring data in EMQX Broker every interval.

For the specific fields and meanings of the monitoring data pushed by emqx_prometheus, see Metrics & Stats

The configuration file is located in etc/plugins/emqx_prometheus.conf, where:

ConfigurationTypeOptional valueDefault valueDescription
push.gateway.serverstring-http://127.0.0.1:9091Prometheus' PushGateway address
intervalinteger> 05000Push interval, unit: ms

Grafana Data template

The emqx_prometheus plugin provides Grafana ’s Dashboard template files. These templates contain the display of all EMQX Broker monitoring data. Users can directly import them into Grafana and select icons that display the monitoring status of EMQX Broker.

The template file is located:emqx_prometheus/grafana_template