Skip to main content
This guide shows how to enable and expose Cilium metrics so an external observability stack (Prometheus + Grafana) can collect and visualize them. Cilium can emit metrics for its datapath components, Hubble (flow telemetry), and the Cilium Operator — but these metrics are not enabled by default. Use Helm values to enable the relevant metric endpoints and ServiceMonitors so a Prometheus Operator can discover and scrape them.
A diagram of an observability setup where Prometheus scrapes metrics from Cilium running in a Kubernetes cluster (two nodes with pods) and Grafana queries Prometheus for visualization. A caption notes that Cilium, Hubble, and the Cilium Operator do not expose metrics by default.

Enable Cilium, Operator and Hubble metrics via Helm values

Below is a concise values file example for the Cilium Helm chart. Adjust the metric families in hubble.metrics.enabled to match the observability needs for your cluster and Cilium version.
# cilium-values.yaml
prometheus:
  enabled: true

operator:
  prometheus:
    enabled: true

hubble:
  # Ensure Hubble is enabled separately if you want flow telemetry
  enabled: true
  metrics:
    enabled:
      - "dns:query;ignoreAAAA"
      - drop
      - tcp
      - flow
      - icmp
      - http
    enableOpenMetrics: true

What these values do

Helm keyPurposeNotes
prometheus.enabled: trueEnables ServiceMonitor and related objects created by the Cilium chart so Prometheus Operator can discover Cilium components.Required when using Prometheus Operator / kube-prometheus-stack.
operator.prometheus.enabled: trueExposes Prometheus metrics for the Cilium Operator.Creates a Service and ServiceMonitor for the operator.
hubble.enabled: trueTurns on Hubble to collect flow telemetry.Only needed if you want flow-level visibility.
hubble.metrics.enabledList of Hubble metric families to export."dns:query;ignoreAAAA" is a single metric spec and must be quoted due to the colon/semicolon.
hubble.metrics.enableOpenMetrics: trueExport metrics using OpenMetrics format so Prometheus can scrape them.Needed for correct scraping and metric exposition.
Check the official Cilium/Hubble metrics documentation for the complete and up-to-date list of metric families and any changes to Helm values: https://docs.cilium.io/en/stable/observability/metrics/

Install or upgrade Cilium with the metrics values

Add the Cilium Helm repository, update it, and apply your values file to install or upgrade Cilium:
helm repo add cilium https://helm.cilium.io/
helm repo update

# Install or upgrade Cilium using the prepared values file
helm upgrade --install cilium cilium/cilium \
  --namespace kube-system \
  --create-namespace \
  -f cilium-values.yaml
Kubernetes rolling updates typically handle changes automatically. To ensure the new configuration is picked up immediately, restart the Cilium pods and the operator:
kubectl -n kube-system rollout restart daemonset cilium
kubectl -n kube-system rollout restart deployment cilium-operator

Verify Prometheus discovery and dashboards

Steps to validate metrics collection and visualization:
  • Deploy Prometheus and Grafana (for example, via the kube-prometheus-stack) or use an existing Prometheus instance that can discover ServiceMonitors.
  • If you use the Prometheus Operator / kube-prometheus-stack, the ServiceMonitors created by the Cilium chart will let Prometheus scrape Cilium, the operator, and Hubble.
  • In the Prometheus UI navigate to Status → Targets and look for cilium-*, cilium-operator, and hubble targets. Confirm they are UP and being scraped.
  • Import or create Grafana dashboards to visualize Cilium and Hubble metrics. There are community dashboards and templates for Cilium available that you can adapt.
Helpful troubleshooting checklist:
ProblemCheck
No cilium targets in PrometheusConfirm ServiceMonitor objects exist: kubectl -n kube-system get servicemonitors and that Prometheus Operator has appropriate RBAC and label selectors to pick them up.
Metrics appear but dashboards emptyVerify metric names in Prometheus (Status → Targets → Metrics) and adapt Grafana queries to the metric families you enabled.
Hubble metrics missingEnsure hubble.enabled: true and hubble.metrics.enableOpenMetrics: true are set, and that the Hubble service exists and is selectable by ServiceMonitor.
Additional hands-on monitoring resources:
Metric names and Helm values may change across Cilium releases. Always verify keys, supported metric families, and the values schema against the documentation for your specific Cilium version before applying changes in production.

Watch Video