...
Edit the values.yaml file of the HiveMQ operator and enable the deployment of the HiveMQ Prometheus Monitoring Extension along with the deployment of the HiveMQ operator.
When themonitoring.enabled
key in thevalues.yaml
then each HiveMQ pod will have the HiveMQ Monitoring Extension installed and enabled. The operator will also create ahivemq-...-metrics
service and expose its endpoint by default on port 9399. This makes HiveMQ broker metrics ready for scraping by the Prometheus application.Code Block language yaml monitoring: # Deploy ServiceMonitor for Prometheus Operator and enable Prometheus enabled: true # Deploy a dedicated instance of the prometheus operator, including grafana, as sub-chart dedicated: false
Install HiveMQ with the release name
"hivemq"
from the Helm charthivemq-operator
to the namespacehivemq
and use parameter values from the filevalues.yaml
Code Block language bash helm upgrade "hivemq" \ --install hivemq/hivemq-operator \ --namespace hivemq \ --values values.yaml
This should create, Make sure that alongside the HiveMQ cluster, a the Kubernetes Service
hivemq-metrics
was created:Code Block language bash kubectl get services | head -n 1 && kubectl get services--namespace 'hivemq' | grep 'metrics'
Code Block language text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE hivemq-hivemq-metrics ClusterIP 10.96.207.165 <none> 9399/TCP 2m31s
Install Prometheus on your own and configure it to scrape from the
hivemq:9399/metrics
.Install Grafana on your own and configure it to use the Prometheus Datasource and the HiveMQ Cluster Dashboard.
...