• EnglishEspañol日本語한국어Português
  • 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:

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.

Review the prerequisites

Configure the prometheus extension in your HiveMQ message platform.

Install the Opentelemetry collector

Download and install the Opentelemetry collector following Opentelemetry docs.

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:
otlphttp:
endpoint: https://otlp.nr-data.net
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: [otlphttp]

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

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.

Important

  • 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 © 2024 New Relic Inc.

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