Skip to main content

EMQX

Prerequisites

This integration requires:

  • A running Prometheus instance to collect and forward metrics
  • Access to your EMQX deployment's metrics endpoints

Overview

EMQX is a massively scalable and reliable open-source MQTT broker designed for connecting, moving, and processing real-time IoT data. This guide explains how to integrate EMQX with Oodle for comprehensive monitoring of your MQTT infrastructure.

Available Metrics

EMQX exposes comprehensive metrics that enable monitoring, management, and troubleshooting of your MQTT broker deployment. These metrics provide visibility into the system's operational status, helping operators detect and diagnose potential issues before they impact service availability.

For a complete list of available metrics, refer to the EMQX documentation.

Integration Setup

Configuring Prometheus to Scrape EMQX Metrics

EMQX exposes metrics that can be scraped with Prometheus. To monitor EMQX with Oodle, configure Prometheus to scrape metrics from EMQX endpoints and remote write to Oodle.

Add the following scrape configurations to your prometheus.yml file:

scrape_configs:
- job_name: 'emqx_stats'
metrics_path: /api/v5/prometheus/stats
scrape_interval: 10s
honor_labels: true
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- source_labels: [__meta_kubernetes_pod_container_name]
regex: .*emqx.*
action: keep

- job_name: 'emqx_auth'
metrics_path: /api/v5/prometheus/auth
scrape_interval: 10s
honor_labels: true
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- source_labels: [__meta_kubernetes_pod_container_name]
regex: .*emqx.*
action: keep

- job_name: 'emqx_data_integration'
metrics_path: /api/v5/prometheus/data_integration
scrape_interval: 10s
honor_labels: true
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- source_labels: [__meta_kubernetes_pod_container_name]
regex: .*emqx.*
action: keep

This configuration instructs Prometheus to scrape endpoints from pods with names matching the pattern .*emqx.*.

Start or restart Prometheus with this configuration.

Configuring Remote Write to Oodle

If you haven't configured remote write to Oodle yet, follow the instructions in the Prometheus Integration Guide.

Next Steps

After completing the integration, you can import the EMQX dashboard from Grafana's dashboard repository into Oodle. When importing, make sure to select "oodle" as the datasource.

You can also create custom dashboards to visualize EMQX metrics and set up alerts for proactive monitoring of your MQTT broker infrastructure.