google / cadvisor

Analyzes resource usage and performance characteristics of running containers.
Other
17.25k stars 2.33k forks source link

namespace level filter #3596

Open qmyaryar opened 2 months ago

qmyaryar commented 2 months ago

I've been working with cAdvisor within our Kubernetes setup to monitor metrics at a namespace-specific level. My objective is to isolate metrics exclusively generated by cAdvisor ONLY for a chosen namespace.

Despite setting up filters with the intention of narrowing down the metrics to my namespace of interest, I am faced with a challenge. The data returned have metrics from all namespaces, not just the one I'm focusing on.

this is the filter that I used:

relabel_configs:
  - action: keep
    source_labels: [__meta_kubernetes_namespace]
    regex: "i-only-want-this-namespace"

thanks.