Monitoring and Metrics Exporting using HiveMQ Operator
Prequisites:
Access to infrastructure with Kubectl. E.g.
Running HiveMQ Cluster https://hivemq.atlassian.net/wiki/spaces/KB/pages/2691039283
Values.yaml file https://hivemq.atlassian.net/wiki/spaces/KB/pages/2691039283/Install+HiveMQ+using+Kubernetes+Operator#Add-Helm-repository-and-download-values.yaml-file
Kubectl, Helm and MQTT CLI https://hivemq.atlassian.net/wiki/spaces/KB/pages/2700902571
Enabling the service
Update the following values in values.yaml file to true, this exposes Prometheus and Grafana services.
monitoring:
dedicated: true
enabled: true
Save the file and apply the changes
helm upgrade hivemq --install hivemq/hivemq-operator --values values.yaml
Now run the following command to check the restarted services, the Prometheus and Grafana services should be running as shown in the screenshot
kubernetes get services
Configure monitoring
To access the Grafana dashboard, forward the Grafana port to your local machine:
kubectl port-forward svc/hivemq-grafana 8081:80
To open your Grafana dashboard, go to http://localhost:8081
Log in with the default login credentials: username: admin, password: prom-operator.
Go to Dashboards>Browse and select the HiveMQ Cluster dashboard to view the most important HiveMQ metrics
Exporting the metrics to share with the support team using HiveMQ Exporter tool
Please use the following KB to export the relevant metrics with HiveMQ Support team for debugging issues.
KB article: https://hivemq.atlassian.net/wiki/spaces/KB/pages/2403205144
Next steps