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
Helm version v3+
Running Kubernetes cluster version 1.18.0 or higher
kubectl latest version
Instructions
Configure the DataDog agent using the Helm chart
Add Datadog helm repository
helm repo add datadog https://helm.datadoghq.com helm repo update
Create
datadog-values.yaml
. For full values check here
Please refer to following the example ofdatadog-values.yaml
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
install Datadog agent using Helm
helm install -f datadog-values.yaml <release name> datadog/datadog -n <namespace>
Verify installation and check the agent pod’s status
Also, check the agent’s log’s to confirm.
Install HiveMQ using Operator
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.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 ofhivemq-values.yaml
Install hivemq using the following command
verify installation
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.