• English日本語한국어
  • Log inStart now

Collector for HiveMQ

You can collect metrics about your HiveMQ MQTT messaging platform with the OpenTelemetry Collector. The collector is a component of OpenTelemetry that collects, processes, and exports telemetry data to New Relic (or any observability backend).

Complete the steps below to collect metrics from HiveMQ:

Step 1 of 5

Sign up for New Relic!

If you haven't already done so, sign up for a free New Relic account and get the for the New Relic account to which you want to report data.

Step 2 of 5

Review the prerequisites

Configure the prometheus extension in your HiveMQ message platform.

Step 3 of 5

Install the Opentelemetry collector

Download and install the Opentelemetry collector following Opentelemetry docs.

Step 4 of 5

Configure the Opentelemetry collector

Create a new file called config.yaml from the example below.

Replace the following keys in the file with your own values:

  • HiveMQ Prometheus extension:
    • HIVEMQ_PROMETHEUS_HOSTNAME
    • HIVEMQ_PROMETHEUS_PORT
    • HIVEMQ_PROMETHEUS_METRICS_PATH
  • New Relic License key:
    • NEW_RELIC_LICENSE_KEY
receivers:
prometheus:
config:
scrape_configs:
- job_name: "hive-mq"
static_configs:
- targets: ["HIVEMQ_PROMETHEUS_HOSTNAME:HIVEMQ_PROMETHEUS_PORT"]
metrics_path: HIVEMQ_PROMETHEUS_METRICS_PATH
exporters:
otlp:
endpoint: https://otlp.nr-data.net:4317
headers:
api-key: NEW_RELIC_LICENSE_KEY
processors:
batch:
memory_limiter:
limit_mib: 400
spike_limit_mib: 100
check_interval: 5s
service:
telemetry:
logs:
pipelines:
metrics:
receivers: [prometheus]
processors: [batch, memory_limiter]
exporters: [otlp]

You may check Opentelemetry Collector docs and Prometheus configuration docs for additional configuration details.

Step 5 of 5

Run the OpenTelemetry Collector

Run the Opentelemetry collector (the way to run it may vary depending on the choosen installation method). Example:

/usr/bin/otelcol --config ./config.yaml

Explore your data

You may use the metrics explorer to check the metrics being ingested. All metrics reported by HiveMQ prometheus extension start with com_hivemq_ prefix.

Metric data details

The table below lists examples of the kinds of metrics we collect.

callout.note

  • Not all metrics may be available (and you may find additional metrics) depending on your HiveMQ setup, and not all metrics are available in the HiveMQ Community Edition.
  • API REST module only exposes metrics when enabled.
  • Certain HiveMQ extensions report specific metrics.
  • For a full list of HiveMQ metrics, see HiveMQ documentation on available metrics.

Check HiveMQ metrics documentation for additional information.

Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.