NUTandRpi
NUTandRpi copied to clipboard
Update the docs on how to export the data to grafana.
Hi, good day!
In the last week, I was searching for a way to export NUT data from the host to the Grafana dashboard and I found a solution. The exporter uses Prometheus for data collection and docker. Also, it was easy to set up for me.
Yes, there are plenty of ways how to achieve the same goal, but this is the best way I could find. It might be useful to document it for now until a better solution is found. This is just to get people started.
Your setup may differ from what I got, this is how I did it. Like for me all docker containers are on the same host as the NUT-server.
Installation process: Here is the Prometheus nut exporter.
- https://hub.docker.com/r/hon95/prometheus-nut-exporter
- https://github.com/HON95/prometheus-nut-exporter
You will need docker compose and docker.
Install docker with this command: curl -sSL https://get.docker.com/ | CHANNEL=stable bash && systemctl enable --now docker
And for docker-compose you can follow this guide
Read the README and Grab the docker-compose file on the GitHub page. Follow the usual steps to create a stack, you may also use Portainer.
Now if you don't already have Prometheus and Grafana installed do it now.
The exporter exports the data to Prometheus so grab the Prometheus config on GitHub. Prometheus config provides the NUT-server and Prometheus-server ip, The exporter must have access to the nut server without any credentials. For me, it worked out of the box and started to collect data.
Log into Grafana and if you haven't already added the data source and then the dashboard. Here below is the dashboard I've used, make it to your liking: https://grafana.com/grafana/dashboards/15406-yet-another-prometheus-nut-exporter/
If you would like to add another graph but don't know the keyword look here
This is just a template you or someone else can expand on. Thank you for your time and awesome repo!
edit: It has been a while now and perfected my dashboard for my needs. here below is how its looks. https://imgur.com/a/BTbXn0V