hubblo-org / scaphandre

⚡ Energy consumption metrology agent. Let "scaph" dive and bring back the metrics that will help you make your systems and applications more sustainable !
Apache License 2.0
1.64k stars 109 forks source link

Scaphandre does not see other namespaces, only the one its deployed in #392

Open smaitra53 opened 1 month ago

smaitra53 commented 1 month ago

Bug description

Deployed on rke cluster, the scaphandre pod is deployed using helm as described and the prometheus and grafana pods are deployed using kube-prometheus-stack. All three are deployed in monitoring namespace. When I go to grafana dashboard, I can only see monitoring namespace. Other namespaces are missing.

To Reproduce

  1. Install prometheus and grafana on the cluster: helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack --namespace monitoring

  2. In order for scaphandre to "see" the prometheus, add release: kube-prometheus-stack in helm/scaphandre/templates/servicemonitor.yaml

otherwise, scaph metrics are not visible on grafana

  1. deploy scaphandre helm install scaphandre helm/scaphandre --set serviceMonitor.enabled=true --set serviceMonitor.namespace=xyz --set serviceMonitor.interval=30s --namespace monitoring

  2. go to grafana, select scaph_process_power_consumption_microwatts{namespace="xyz"}

  3. No data

Expected behavior

expected scaph process metrics for pods/containers in the "xyz" namespace

Environment

Linux 5.15.0-119-generic #129~20.04.1-Ubuntu SMP Wed Aug 7 13:07:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

bpetit commented 2 weeks ago

Hi @smaitra53

So do you suggest release: kube-prometheus-stack to the service monitor ?

@rossf7 @mmadoo and other k8s advanced users, do you have any suggestion regarding this ? :)