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
Add Datadog helm repository:
helm repo add datadog https://helm.datadoghq.com helm repo update datadog
Create
datadog-values.yaml
. For full values check here.
Please refer to following the example ofdatadog-values.yaml
: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"
Optionally, create a dedicated namespace for the Datadog Agent. Further in this article, we consider the datadog namespace.
kubectl create namespace datadog
Install Datadog agent using Helm:
Verify installation and check the agent pod’s status
The successful output should resemble this:
Also, check the agent’s logs to confirm.
Install HiveMQ Platform
Optionally, create a dedicated namespace for the HiveMQ. Further in this article, we assume the
hivemq
namespace.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).
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 – https://docs.datadoghq.com/containers/kubernetes/integrations/?tab=annotations.
Should you want to add more metrics to available HiveMQ metrics, please refer to the following example:
Install the HiveMQ Platform using the following command:
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.
Create a HiveMQ dashboard in the Datadog UI
In the Datadog UI, click the “New Dashboard” link from the left navigation links tab