Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 2.03 KB

README.md

File metadata and controls

58 lines (39 loc) · 2.03 KB

Prometheus Grafana , Mosquitto Broker and Mosquitto Exporter

A monitoring solution for mosquitto-exporter with Prometheus, Grafana, Mosquitto Broker

Install

Clone this repository on your Docker host, cd into mosquitto-exporter-prom-grafana directory and run compose up:

git clone https://github.com/Alessandrovito/mosquitto-exporter-prom-grafana.git
cd mosquitto-exporter-prom-grafana

docker-compose up -d

or

MS_USER=mosquitto MS_PASSWORD=password docker-compose up -d

Containers:

  • Prometheus (metrics database) http://<host-ip>:9090
  • Grafana (visualize metrics) http://<host-ip>:3000
  • Mosquitto Broker
  • Mosquitto-exporter

Setup Mosquitto-exporter

You can change the credentials in the compose file or by supplying the MS_USER and MS_PASSWORD environment variables on compose up.

Meaning of variables:

  • MS_USER: Account username dedicated to Mosquitto Exporter user
  • MS_PASSWORD: Account password dedicated to Mosquitto Exporter user
  • MS_HOSTNAME: hostname to reach URL Mqtt Broker

Setup Grafana

Navigate to http://<host-ip>:3000 and login with user admin password admin. Grafana is preconfigured with dashboards Mosquitto Broker and Prometheus as the default data source:

Mosquitto Exporter

Host

The Mosquitto Broker Dashboard shows key metrics for monitoring the resource usage of your server:

  • The number of currently connected, disconnected clients
  • The moving average of the number of CONNECT packets received by the broker
  • The total number of messages of any type received,sent and dropped since the broker started.
  • The Rate of messages sent and received by Broker
  • Publish messages sent, received and dropped by Broker