Tip |
---|
Fixed in the
|
\uD83E\uDD14 Problem
No data is displayed in the Grafana “HiveMQ Cluster” Dashboard, after installing the hivemq-operator with monitoring.dedicated=true
:
Code Block | ||
---|---|---|
| ||
helm upgrade ${hivemqRelease} --install 'hivemq/hivemq-operator' \
--namespace ${namespace} \
--set monitoring.enabled=true \
--set monitoring.dedicated=true \
--set kube-prometheus-stack.prometheusOperator.admissionWebhooks.patch.image.repository=k8s.gcr.io/ingress-nginx/kube-webhook-certgen \
--set kube-prometheus-stack.prometheusOperator.admissionWebhooks.patch.image.tag=v1.1.1
... |
where:
${hivemqRelease}
is your release name for the hivemq deployment;${namespace}
is the namespace you want to install the hivemq-operator.
...
Prepare a manifest definition for the Service Monitor,
monitorService.yaml
:Code Block apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: hivemq-cluster: ${hivemqRelease} release: ${hivemqRelease} name: hivemq spec: endpoints: - port: metrics jobLabel: hivemq selector: matchLabels: hivemq-cluster: ${hivemqRelease} app: hivemq
Do substitute
${hivemqRelease}
with the actual name you gave to the hivemq-operator deployment.labels
here do command the Prometheus to take the ServiceMonitor into account.selector
here specifies which pods to scrape the data from.port
here specifies the name of the port to which the metrics are exposed.Apply the manifest
Code Block kubectl apply -f monitorService.yaml --namespace ${namespace}
When all hivemq-pods are running and all their containers are ready, go to the Grafana and check if the data is updating in the “HiveMQ Cluster” dashboard.
...
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|