InfluxDB Extension
Monitoring Extension

Version: 4.0.0   |    License Apache v2   |    Sourcecode    

Purpose

The InfluxDB Monitoring extension allows HiveMQ to connect to an instance of InfluxDB for time series monitoring.

Installation

Installing the extension for HiveMQ is very easy:

  1. Unzip the downloaded zip file
  2. In the folder hivemq-influxdb-extension, modify the influxdb.properties file to fit your needs. Check that the mandatory properties (host, port) are set
  3. Copy the folder hivemq-influxdb-extension to your [HIVEMQ_HOME]/extensions folder
  4. Done

Configuration

The InfluxDB Monitoring extension uses its own configuration file influxdb.properties. The extension won’t start if this file is missing or the required properties are not set.

General Configuration

Config name Required Environment Variable Description Default
mode no HIVEMQ_INFLUX_DB_PLUGIN_MODE The mode configured for the InfluxDB sender. Possibilities are: http, tcp, udp http
host no HIVEMQ_INFLUX_DB_PLUGIN_HOST The host name of the InfluxDB instance. localhost
port no HIVEMQ_INFLUX_DB_PLUGIN_PORT The port number the InfluxDB instance is listening. 8086
protocol no HIVEMQ_INFLUX_DB_PLUGIN_PROTOCOL The protocol the InfluxDB sender uses in http mode. http
auth no HIVEMQ_INFLUX_DB_PLUGIN_AUTH The authorization string to be used to connect to InfluxDB, of format username:password. no default
prefix no HIVEMQ_INFLUX_DB_PLUGIN_PREFIX The measurement prefix. no default
database no HIVEMQ_INFLUX_DB_PLUGIN_DATABASE The database name. hivemq
reportingInterval no HIVEMQ_INFLUX_DB_PLUGIN_REPORTING_INTERVAL The reporting interval in seconds. 1
connectTimeout no HIVEMQ_INFLUX_DB_PLUGIN_CONNECTION_TIMEOUT The connect and read timeout in seconds. 5000
tags no HIVEMQ_INFLUX_DB_PLUGIN_TAGS The tags for each metric. Listed as a semicolon ( ; ) separated list. no default

Example Configuration

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
mode:http
host:localhost
port:8086
protocol:http
auth:

prefix:
database:hivemq

reportingInterval:1
connectTimeout:5000

tags:host=hivemq1

First Steps

Quick Start InfluxDB

If you don’t already have an InfluxDB instance set up, here is a instruction how to start a not configured InfluxDB instance with Docker.

  1. Download and install Docker for your platform

  2. Start an InfluxDB docker container with the command docker run -p 8086:8086 -v $PWD:/var/lib/influxdb influxdb. For more information about using InfluxDB with Docker visit the official Docker repository for InfluxDB.

  3. A local instance of InfluxDB should be running with the port for the database set to 8086.

  4. Create a database that matches the name set in the property database in influxdb.properties. For the default database value use the command curl -G http://localhost:8086/query –data-urlencode “q=CREATE DATABASE hivemq”.

  5. Done

Usage

After the extension is installed and an InfluxDB instance exists.

  1. Start HiveMQ

  2. Extension successfully started if configuration file exists and contains required properties

Need help?

If you encounter any problems, we are happy to help. The best place to get in contact is our support.



Back to marketplace