configs/raspberry/metrics.md
raspberry/metrics.mdRaw
1# prometheus + graphana to monitor node
2*(src: https://theawesomegarage.com/blog/monitor-your-raspberry-pi-with-prometheus-and-grafana)*
3
4```
5sudo apt install prometheus
6
7sudo apt-get install prometheus-node-exporter
8```
9
10now visiting http://localhost:9100/metrics should return metrics
11
12start the prometheus-node-exporter:
13```
14sudo systemctl enable prometheus-node-exporter
15sudo systemctl start prometheus-node-exporter
16```
17
18for monitoring too the mounted devices (ie. usb):
19edit `/etc/default/prometheus-node-exporter`:
20```
21ARGS="--collector.filesystem.mount-points-exclude="^/(dev|proc|run|sys|mnt|var/lib/docker/.+)($|/)""
22```
23
24restart the service:
25`sudo systemctl restart prometheus-node-exporter`
26
27
28Install Graphana: https://grafana.com/docs/grafana/latest/setup-grafana/installation/