Versions Compared

Key

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

Monitoring the HiveMQ broker is crucial in cluster environments.

...

  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 will 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.

    Code Block
    languageyaml
    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. 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

    Code Block
    languagebash
    helm upgrade "hivemq" \
      --install hivemq/hivemq-operator \
      --namespace hivemq \
      --values values.yaml
  3. This should create, alongside the HiveMQ cluster, a Kubernetes Service hivemq-metrics:

    Code Block
    languagebash
    kubectl get services | head -n 1 && kubectl get services | grep 'metrics'
    Code Block
    languagetext
    NAME                                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
    hivemq-hivemq-metrics             ClusterIP   10.96.207.165   <none>        9399/TCP   2m31s
  4. Install Prometheus on your own and configure it to scrape from the hivemq:9399/metrics.

  5. Install Grafana on your own and configure it to use the Prometheus datasource Datasource and the HiveMQ Cluster Dashboard.

...

  1. 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.

    Code Block
    languageyaml
    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
  2. 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

    Code Block
    languagebash
    helm upgrade "hivemq-mine" \                   
      --install hivemq/hivemq-operator \  
      --namespace hivemq \                
      --values values.yaml                
  3. Alternatively, specify you can override the installation parameter values directly in the command line of the helm upgrade command:

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

...

Filter by label (Content by label)
page
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957
showSpacefalse
sortmodified
showSpacetypefalsepage
reversetruetype
labelskb-how-to-article
cqllabel in ( "monitoring" , "grafana" , "prometheus" ) and type = "page" and space = "KB"labelskb-how-to-article