3 ms·
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 th
by lobster_johnson 9y 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.
- ibotty 9y agoYes. 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.
- lobster_johnson 9y agoWell, 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".