Expose HiveMQ Prometheus metrics in DataDog using the HiveMQ operator

This artical explains how to expose HiveMQ Prometheus metrics in DataDog using the HiveMQ operator

 Pre-requisites

  1. Helm version v3+

  2. Running Kubernetes cluster version 1.18.0 or higher

  3. kubectl latest version

 Instructions

  1. Configure the DataDog agent using the Helm chart

    1. Add Datadog helm repository

      1. helm repo add datadog https://helm.datadoghq.com helm repo update
    2. Create datadog-values.yaml. For full values check here
      Please refer to following the example of datadog-values.yaml

      1. logLevel: DEBUG targetSystem: "linux" datadog: apiKey: <api key> #Logs configurations logs: enabled: true containerCollectAll: true containerCollectUsingFiles: true #Plesse configure this setting based on your region site: datadoghq.eu # datadog.kubelet.tlsVerify should be `false` on kind and minikube # to establish communication with the kubelet kubelet: tlsVerify: false clusterAgent: replicas: 2 createPodDisruptionBudget: true
    3. install Datadog agent using Helm

      1. helm install -f datadog-values.yaml <release name> datadog/datadog -n <namespace>
    4. Verify installation and check the agent pod’s status

      1. Also, check the agent’s log’s to confirm.

  2. Install HiveMQ using Operator

    1. The HiveMQ Kubernetes Operator provides seamless integration with the Prometheus Operator. Use the monitoring field to enable Prometheus and an associated Grafana dashboard. Metrics are exposed on port 9399.

    2. Configure hivemq-values.yaml based on your requirement and then add podAnnotations for Datadog to auto-discover HiveMQ metrics. Check here for more details and configurations.

      Please find below a minimalist config example of hivemq-values.yaml

    3. Install hivemq using the following command

    4. verify installation

    5. Login to your Datadog account and click “Metrics” =>” Explorer” from the left navigation links. You will be redirected to the “Graph your data” page. By default, you will see “system.cpu.user" metrics and their data.
      Type com_hivemq in the search box and you should be able to see the list of available hivemq metrics.

 Related articles