Re:Volume Monitoring in Kubernetes with Prometheus
by lobster_johnson on Monday October 16, 2017 @10:28PM
(#15488199)
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.
[ Parent
| on HN ]
Re:Volume Monitoring in Kubernetes with Prometheus
by ibotty on Tuesday October 17, 2017 @01:37AM
(#15488897)
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.
Re:Volume Monitoring in Kubernetes with Prometheus
by lobster_johnson on Tuesday October 17, 2017 @11:48AM
(#15491927)
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".