Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Monitoring HiveMQ broker is crucial in cluster environments.

This article explains how to install monitoring tools along with HiveMQ Operator.

\uD83D\uDCD8 Instructions

  1. 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 the monitoring.enabled key in the values.yaml then each HiveMQ pod will have the HiveMQ Monitoring Extension installed, and enabled. The operator with also create a hivemq-...-metrics service and expose its endpoint by default on port 9399. This makes HiveMQ broker metrics ready for scraping by the Prometheus application.

    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
  2. Edit the values.yaml of the HiveMQ operator and set the parameter monitoring.dedicated to true. This will make the HiveMQ Operator install Prometheus and Grafana applications along with the installation of the HiveMQ. This will also add a HiveMQ Cluster dashboard to Grafana.
    Both Prometheus and Grafana are installed from the kube-prometheus-stack Helm chart.

    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: true
  3. Install HiveMQ with the release name hivemq-mine from the Helm chart hivemq-operator to the namespace hivemq and use parameter values from the file values.yaml

    helm upgrade hivemq-mine \
      --install hivemq/hivemq-operator \
      --namespace hivemq \
      --values values.yaml

  4. Alternatively, specify the installation parameter values in the command line of the helm upgrade command

    helm upgrade hivemq-mine \
      --install hivemq/hivemq-operator \
      --namespace hivemq \
      --values values.yaml \
      --set monitoring.enabled=true \
      --set monitoring.dedicated=true 

If an error arises while using the parameter value monitoring.dedicated=true, note that both Prometheus and Grafana are installed from the kube-prometheus-stack Helm chart.

So, if there no error while installing HiveMQ Operator with monitoring.dedicated=false, but there is an error while installing HiveMQ Operator with monitoring.dedicated=true, this error originates from the kube-prometheus-stack Helm chart and not from the HiveMQ Operator Helm chart.
Such an error should be reported to the issues of the https://github.com/prometheus-community/helm-charts/issues rather than the HiveMQ Operator itself.

  • No labels