Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

It is recommended to install and monitor HiveMQ broker with Prometheus and Grafana. Metrics collected in this fashion can be batch exported with the HiveMQ grafana-metrics-exporter tool.

Prerequisite

  • Java 11+ running on your machine

  • Download the Grafana Exporter tool

    View file
    namehivemq-metrics-exporter-2.0.zip

\uD83D\uDCD8 Instructions

...

  1. Find the Grafana Datasource Id.
    To export the metrics from a Grafana Datasource first find the Datasource Id. To find the ID for the desired Grafana Datasource, first, log in to Grafana and next go to Menu→Configuration→Data Sources* and click on the desired Datasource, then the ID is part of the URL

    Example URL: https://my.grafana-url.com:port/datasources/edit/1/.

    In the Example URL, the ID for the Datasource is 1.

    1. Note: If you cannot reach the Menu→Configuration→Data Sources, it indicates that you do not have necessary access rights to the Grafana. In this case, you need to contact the admin of Grafana and get the necessary access rights.

    2. In case the ID is alphanumeric(e.g. AB123BC), please find the numerical ID via Find Grafana Datasource Id by its Name

  2. Run the exporter. A full command should look like the following

    1. In case you are using localhost via port-forwarding

      1. please use --url "http://localhost:port" , where port is the target port of Grafana service

      2. username: admin, password: prom-operator

    2. Time is in UTC and ends with letter Z

...

In case the Datasource Id is unknown, but the name of the Datasource is known, follow the steps of the following article to find the Datasource id by the Datasource name:

Find Grafana Datasource Id by its Name

What are ‘tag1’ and ‘tag2’ arguments?

...