cilium-cli icon indicating copy to clipboard operation
cilium-cli copied to clipboard

Enable Prometheus metrics

Open malikkirchner opened this issue 3 years ago • 2 comments

The Cilium Helm Chart has support for Prometheus metrics. It would be great, if the cilium install command would have a flag, that enables Prometheus metrics.

malikkirchner avatar Jul 08 '21 11:07 malikkirchner

Is there any way to get the hubble metrics in prometheus without installing via helm?

jotak avatar Jun 08 '22 07:06 jotak

For the record I did the following to get metrics after installing with the CLI:

  • edit cilium daemonset to add prometheus scrape/port annotations and declare container ports
  • create cilium hubble metrics service like here: https://github.com/cilium/cilium/blob/9a7bd38c82c94a31b71fff7e0c1938634af8c3d4/install/kubernetes/cilium/templates/hubble/metrics-service.yaml
  • Then:
cilium config set prometheus-serve-addr ":9090"
cilium config set hubble-metrics-server ":9091"
cilium config set hubble-metrics "dns drop tcp flow port-distribution icmp http"

Then I could switch back following the doc, like configuring DNS/L7 metrics as explained here https://docs.cilium.io/en/stable/policy/visibility/#proxy-visibility

So, that is clearly hacky.

Maybe it could be clarified in documentation that the CLI doesn't support metrics configuration (yet), especially as the CLI seem more promoted in the quick-start guide ?

jotak avatar Jun 08 '22 09:06 jotak

Is this fixed by this PR? https://github.com/cilium/cilium-cli/pull/955 I'm not clear yet on how to use it via CLI if so.

Ewarren7 avatar Nov 10 '22 21:11 Ewarren7

Is this fixed by this PR? #955 I'm not clear yet on how to use it via CLI if so.

Looks like it is done like cilium install --kube-proxy-replacement strict --helm-set-string=k8sServiceHost=xxx.eks.amazonaws.com,k8sServicePort=443,hubble.metrics.enabled="{dns,drop,tcp,flow,icmp,http}"

edit: fixed quotes in command

Ewarren7 avatar Nov 11 '22 02:11 Ewarren7