lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.29k stars 1.45k forks source link

lens prometheus metrics cpu broken on aws eks #6065

Open matti opened 1 year ago

matti commented 1 year ago
image

cpu usage NaN, cores: 0 - but memory works

prometheus installed with helm chart values: https://github.com/matti/eksler/blob/9fbd98e79233912bd46489a6104ff869256f1558/helm/prometheus-1/values.yml

AWS EKS 1.22 ipv6 with eksctl

matti commented 1 year ago
image

pod cpu works

matti commented 1 year ago
image

After scale up all lights are on!

Kulagin-G commented 1 year ago

The same issue still persists in the latest Lens version - CPU usage is N/A in the Cluster view.

Screen Shot 2022-09-11 at 04 17 47

Lens build info:

Lens: 6.0.2-latest.20220908.1
Electron: 15.5.7
Chrome: 94.0.4606.81
Node: 16.5.0

Prometheus version - version=2.33.4 Metrics-server version - metrics-server-6.0.7 ESK version - 1.21

I'm not sure but looks like the problem is here in the prom query for calculating cpuUsage - https://github.com/lensapp/lens/blob/1a29759bff937dde69c1e6bdfa0231d1253ed379/src/main/prometheus/lens.ts#L37

kubernetes_node is the wrong label, should be a node.

kyleli666 commented 1 year ago

Same problem and this has been broken st least since Lens version 5. BTW, this https://github.com/lensapp/lens/blob/master/troubleshooting/custom-prometheus.md document seems not enough.

dcshiman commented 1 year ago

I have 2 clusters on EKS.

eks: v1.22 kube-prometheus-stack: v36.0.0 prometheus-adapter: v3.3.1 lens: 2022.10.111653-latest monitoring dashboard: ok

eks: v1.23 kube-prometheus-stack: v41.1.0 prometheus-adapter: v3.4.0 lens: 2022.10.111653-latest monitoring dashboard: Metrics are not available due to missing or invalid Prometheus configuration.

metric relabeling as https://github.com/lensapp/lens/blob/master/troubleshooting/custom-prometheus.md dsn't help. Not using auto detection, manually set to "Prometheus Operator" with Prometheus service address "monitoring/prometheus-operated:9090"

theblinkingusb commented 8 months ago

Also seeing this - memory/disk are working and no cpu

ShanPriyanM commented 6 days ago

Just wanted to know, whether this have been fixed? Still i am facing the issue

OpenLens:6.5.2 Extension API: 6.5.2