Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the docs on how to export the data to grafana. #10

Open
sebasdt opened this issue Feb 21, 2023 · 6 comments
Open

Update the docs on how to export the data to grafana. #10

sebasdt opened this issue Feb 21, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@sebasdt
Copy link

sebasdt commented Feb 21, 2023

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.

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

@dzomaya dzomaya added documentation Improvements or additions to documentation good first issue Good for newcomers labels Feb 21, 2023
@dzomaya
Copy link
Owner

dzomaya commented Feb 21, 2023

Nice! Thanks @sebasdt ! I appreciate all the feedback and contributions!

Added the Documentation and Good first issue tags to this one. I think it'll be a good add to the docs.

@sebasdt
Copy link
Author

sebasdt commented Mar 2, 2023

Hey,

How is your mission going for getting the data off from your old laptop?
I thought was a while and am curious if you already had the time.

Greetings,

Sebastiaan

@dzomaya
Copy link
Owner

dzomaya commented Mar 4, 2023

Hi,
Thanks for checking in!
I still need a power supply. I plan to grab one the week of the 22nd, then probably look at this over that weekend.

@dzomaya
Copy link
Owner

dzomaya commented Mar 26, 2023

@sebasdt
I'm a bit behind on this one, but did not forget.

@sebasdt
Copy link
Author

sebasdt commented Mar 31, 2023

Hey,
I would like to give a small update on how it's going in my lab.
The exporter has been running flawlessly for over a month without any issues, logging away like it's nothing.
Here below is my current dashboard for One UPS. I can share it, one note! Be aware it may not work for your setup.

image
Added some monitoring whenever the ups go down or something else weird happens I get notified via discord.

How is it going on your end?

@dzomaya
Copy link
Owner

dzomaya commented Apr 9, 2023

Nice, thanks! I'm still just a bottleneck here. Later this month or early May is probably when I'll have my next round of updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants