...
Request from the HiveMQ Support team Team to provide you with the HiveMQ
grafana-metrics-exporter
tool. The tool is provided as a JAR file namedhivemq-metrics-exporter.jar
Run the exporter.
You can run the exporter with (Java 11+):
Code Block language bash java -jar hivemq-metrics-exporter.jar <options>
You can run a quick test if the parameters are correct by adding the
--test
param, then only the first metric is exported. Debug output can be enabled with-v
...
The result is a ZIP file that contains a JSON for each HiveMQ metric.
Exporting
...
from Prometheus
Sometimes, Prometheus is installed but Grafana is not.
To export directly from Prometheus use the option “--direct
“.
...
Name | Description | Required | Example |
---|---|---|---|
| Grafana URL (Without trailing slash) | x |
|
| Grafana Datasource ID | x |
|
| Start timestamp in ISO Format. If it ends with | x |
|
| End timestamp in ISO Format. If it ends with | x |
|
| Grafana Username |
| |
| Grafana Password. Can be passed as param directly |
| |
| Prometheus Filter to only pull HiveMQ metrics with specific tags. Example: If you would get the HiveMQ metrics with the query |
| |
| Step size, the distance between measured points, should be greater or equal to the prometheus Prometheus scrape interval. Default: |
| |
| Test Mode , stops after the first metric. Good for testing if the params are correct |
| |
| Enable verbose mode, good for debugging. Very verbose! |
|
...
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 nameDatasource Id by its Name
What are ‘tag1’ and ‘tag2’ arguments?
In Prometheus, labels are key-value pairs that are associated with metrics. When a Prometheus server scrapes a target, it collects metric data from the target and attaches labels to the collected data to provide additional information about the metric.
The labels displayed in the Prometheus UI's Targets page are the labels that have been attached to the metrics collected from the target. These labels can provide information about the source of the metric data, such as the host, application, or process that generated the metric. Labels can also be used to organize and filter metrics, allowing users to more easily query and analyze the data.
...
Same labels and values can be used as a ‘tag1’ and ‘tag2’ arguments of the metrics-exporter tool to refine the metrics you want to export from the metrics you do no want to export.
\uD83D\uDCCB Related articles
...
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|