Prometheus Monitoring Plugin

Version: 1.0.0
License: Apache v2

The Prometheus Monitoring plugin allows HiveMQ to expose metrics to a Prometheus application.

Installation Prometheus Monitoring Plugin

  1. Copy the jar file hivemq-prometheus-monitoring-plugin-.jar to your [HIVEMQ_HOME]/plugins folder
  2. Copy the sample-configuration/prometheusConfiguration.properties file to your [HIVEMQ_HOME]/conf folder
  3. Modify the prometheusConfiguration.properties file for your needs
  4. Done

Usage

The Prometheus Monitoring plugin uses its own configuration file prometheusConfiguration.properties which must be placed in HiveMQ’s config folder.
The plugin will expose the HiveMQ metrics on Servlet in order to provide a scrape target for a Prometheus application, that will pull the metrics from it.

  1. Start HiveMQ
  2. Start Prometheus

Configuration of the Prometheus Plugin

Config name Required Description Default

port

no

The port which the servlet will listen to.

9399

host

no

The bind-address which the servlet will listen to.

0.0.0.0

metric_path

no

The path for the servlet which gets called by Prometheus. It must start with a slash. (IMPORTANT: /servlet will be inserted between : and . For example 127.0.0.1:9399/servlet/metrics)

/metrics

Configuration of Prometheus

For detailed information please visit: https://prometheus.io/docs/operating/configuration/

A short sample for the configuration file of your prometheus application: