Hacker News new | ask | show | jobs
by lobster_johnson 3170 days ago
Wouldn't it be better to run node_exporter (with only the fs metrics enabled) in a sidecar container in the pod that mounts the volume? That way, you can get the metrics scraped with the right pod labels. If you do it by node, you will only get the node name as a label.
1 comments

Yes. There is a disadvantage, that when your app already exposes metrics, you will have to tell prometheus' service discovery that you want to scrape two ports.
Well, you can easily set up Prometheus with a rule that automatically scrapes any discovered service (or pod) where the port name is =~ /^(exporter|.*-exporter)$/, for example. This allows you to name your port just "exporter", or you can have multiple ports named things like "volume-exporter".