Prometheus can't collect metrics from hubble-metrics
using cilium hubble enable
command
#1303
Labels
hubble-metrics
using cilium hubble enable
command
#1303
Hi, I caught an unexpected behavior during running
cilium hubble enable
to enable hubble and gather its metrics using Prometheus.Bug report
General Information
v0.12.11
and the master branchv1.25.4
v1.23.9
)How to reproduce the issue
cilium install
with the options:cilium install --helm-set prometheus.enabled=true --helm-set operator.prometheus.enabled=true
cilium enable hubble
with the options:cilium hubble enable --ui --helm-set hubble.metrics.enabled="{dns,drop,tcp,flow,icmp,http}"
Hubble resources are deployed, and
hubble-metrics
service is created.Expected behavior
Prometheus can access to
hubble-metrics
(by default, port 9965) and can gather metrics.Actual behavior
Prometheus didn't collect any metrics from the endpoint.
The cause of the problem
hubble-metrics
is the pod which hask8s-app=cilium
(actually, this iscilium
pods fromcilium
daemonset), and the target port is9965
by defaultThe
cilium enable hubble
command with--helm-set hubble.metrics.enabled={...}
updatescilium-config
configmap then restartcilium-xxx
pods, and creates bothhubble-peer
andhubble-metrics
service. However, it does not updatecilium
daemonset to add the port.We can see the behaviors around this part of the code: https://github.com/cilium/cilium-cli/blob/master/hubble/hubble.go#L627-L665
As a result, because
cilium
pods don't expose their9965
port, Prometheus can't collect metrics throughhubble-metrics
.Proposal
In order to enable Prometheus for hubble using not only helm but also using cilium-cli, we should update
cilium
daemonset adding the port forhubble-metrics
when we runcilium enable bubble --helm-set hubble.metrics.enabled={...}
.I assume that the adding code will be similar to updateConfigMap.
update: I found a similar issue: #412 .
The text was updated successfully, but these errors were encountered: