Skip to content

Conversation

@RubenNL
Copy link
Contributor

@RubenNL RubenNL commented Jun 30, 2025

freelens doesn't calculate the pod cpu, memory and filesystem usage correctly. Here's an example of a single-container pod:

Before:
before-pod
before-container

After:

after-pod
after-container

I have this issue with those metrics:

container_cpu_usage_seconds_total
container_memory_working_set_bytes
container_fs_usage_bytes
container_fs_writes_bytes_total
container_fs_reads_bytes_total

Those are all metrics where the name starts with container_*, excluding container_network_* (Those never have a container attribute).

All other *-provider.injectable.ts have this same fix applied. I haven't been able to find why this one is different, so let's set them to the same queries.

Info about my cluster

I'm running k3s, with one master node and multiple "worker" nodes.
Prometheus is provided by the bitnami/kube-prometheus helm chart.

Tests

The tests have successfully ran on a testing PR on my own repo: RubenNL#1

@dex4er dex4er added the bug Something isn't working label Jul 6, 2025
@dex4er dex4er added this to the v1.5.0 milestone Jul 6, 2025
@dex4er dex4er changed the title prometheus operator: Ignore metrics with empty container field Prometheus graphs ignores metrics with empty container label Jul 6, 2025
@dex4er dex4er merged commit 98b4e91 into freelensapp:main Jul 6, 2025
9 checks passed
@dex4er
Copy link
Collaborator

dex4er commented Jul 6, 2025

@RubenNL thanks a lot!

@RubenNL RubenNL deleted the prom-operator-ignore-empty-container branch July 6, 2025 10:00
@robertobandini
Copy link
Member

Thanks @RubenNL!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants