powerapi-ng / hwpc-sensor

Hardware Performance Counters monitoring agent for containers.
BSD 3-Clause "New" or "Revised" License
14 stars 16 forks source link

FIX target for kubernetes #34

Open sirAnone opened 1 year ago

sirAnone commented 1 year ago

Hi, As i used powerapi inside a kubernetes cluster, i saw that the path for the pod and container's id do not match what is used by k8s. (which doesn't use dockershim anymore but containerd) Powerapi use path like perf_event/kubepods/ where it should be perf_event/kubepods.slice/. I did some changes to match this pattern. Furthermore, in order to visualize data with Prometheus and Grafana whithout making changes to the formula, I modified the target-real-name to be like " podID-containerID " which is arbitrary as i use it with PromQL to have a consumption by pod and containers.

Changes:

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud