/
Forward HiveMQ JMX metrics to DataDog | HiveMQ Platform Operator (new)

Forward HiveMQ JMX metrics to DataDog | HiveMQ Platform Operator (new)

This article explains how to expose HiveMQ JMX metrics to DataDog using Kubernetes.

 Requirements

  • Running Kubernetes cluster version 1.23.x or higher

  • Helm version 3.10.x or higher

  • The Kubernetes command line tool kubectl

  • HiveMQ Professional or Enterprise Edition, versions 4.19 or higher

  • kubectl context set to the target Kubernetes cluster where HiveMQ is installed

 Instructions

Install and configure a DataDog agent

  1. Add Datadog helm repository:

    1. helm repo add datadog https://helm.datadoghq.com helm repo update datadog
  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: <DATADOG_API_KEY_FROM_THE_DATADOG_ACCOUNT> #Logs configurations logs: enabled: true containerCollectAll: true containerCollectUsingFiles: true # Please configure this setting based on your region site: datadoghq.eu tags: [] # datadog.kubelet.tlsVerify should be `false` on kind and minikube # to establish communication with the kubelet kubelet: tlsVerify: false #Following settings are required to collect the Kubernetes events with the Cluster Agent collectEvents: true clusterAgent: rbac: create: true # setting to read JMX metrics from HiveMQ agents: image: tagSuffix: "jmx"
  3. Optionally, create a dedicated namespace for the Datadog Agent. Further in this article, we consider the datadog namespace.

    kubectl create namespace datadog
  4. Install Datadog agent using Helm:

  5. Verify installation and check the agent pod’s status

    The successful output should resemble this:

  6. Also, check the agent’s logs to confirm.

Install HiveMQ Platform

  1. Optionally, create a dedicated namespace for the HiveMQ. Further in this article, we assume the hivemq namespace.

  2. Install the HiveMQ Platform Operator

    Once the pod for the hivemq-platform-operator “oper” is running and ready, proceed to install the HiveMQ Platform(s).

  3. For the Datadog Agent to auto-discover HiveMQ metrics and logs, update the hivemq-platform’s values.yaml and add the required annotation to HiveMQ pods:

    Reference: Datadog Integration Annotations method – Kubernetes and Integrations.

  4. Should you want to add more metrics to available HiveMQ metrics, please refer to the following example:

  5. Install the HiveMQ Platform using the following command:

  6. Log in to your Datadog account and click “Metrics” → ” Explorer” from the left navigation links tab. You will be redirected to the “Graph your data” page. By default, you will see the “system.cpu.user“ metric and its data.
    Start typing "hivemq" in the search box and you should be able to see the list of available HiveMQ metrics.

    image-20240805-145821.png

Create a HiveMQ dashboard in the Datadog UI

  1. In the Datadog UI, click the “New Dashboard” link from the left navigation links tab

    image-20240805-150008.png
  2. Enter the name and select the “New Screenboard” button.

     

  3. Click the “Gear” icon from the top right corner and click the “Import Dashboard JSON” link

  4. Import the attached HiveMQ dashboard JSON , and done:

  5. Check the HiveMQ dashboard to view HiveMQ Metrics.

  6. Uninstall DataDog and HiveMQ.

 

 

Related content

Expose HiveMQ JMX metrics for DataDog in Kubernetes
Expose HiveMQ JMX metrics for DataDog in Kubernetes
More like this
Expose HiveMQ Prometheus metrics in DataDog using the HiveMQ operator
Expose HiveMQ Prometheus metrics in DataDog using the HiveMQ operator
More like this
Monitoring and Metrics Exporting using HiveMQ Operator
Monitoring and Metrics Exporting using HiveMQ Operator
More like this
Monitoring HiveMQ Swarm Instances with HiveMQ Operator and Prometheus
Monitoring HiveMQ Swarm Instances with HiveMQ Operator and Prometheus
More like this