Giter VIP home page Giter VIP logo

nutandrpi's People

Contributors

dzomaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nutandrpi's Issues

Play date with Klipper

Good day! I have stumbled across this wonderful Git, have everything installed just so. However when trying to navigate through my browser, it's pulling up my Klipper interface rather than NUT. Please help! I'm very novice at this, I'm sure there is a work around but I should would appreciate some help. Thank you!

Apache2 not installing (fix)

Hello,
Thanks for creating this script. It saved me a ton of time setting up NUT server.

I did run into one issue where apache was not installed with the script, this was verified because the command a2enmod cgi was not found.

To fix, here is what I did:

upsd -c stop

sudo apt-get update
sudo apt-get install apache2

sudo ./nutinstall.sh

I hope this helps anyone who comes across it, or the fix can be added directly into the script.

Fix references to tripplite.com and [email protected] to call out something else

Currently, lines 12-14 of the script are echo statements that say:

echo "You should really read the associated article on Github or Tripplite.com to understand what you're getting into."
echo " "
echo " If you need a production-grade solution, I recommend contacting [email protected]"

The article related to this project is at: https://www.eaton.com/us/en-us/products/backup-power-ups-surge-it-power-distribution/backup-power-ups/raspberry-pi.html (not any tripplite.com domain) and "[email protected]" is not the correct address people interested in a production-grade solution should contact (feel free to just DM me for now if you are).

I need to figure out better text, which should be quick. This might be a good first issue for anyone looking to get involved while tackling something simple, so I'll slap that label on it for now.

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.

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

Adding multiple UPSs with the script

I just tried the script and it did add ONE of my 3 UPS units. I have 1x APC and 2x CyberPower 1500VA units that I want to get working with NUT. I have installed and ran NUT before but always had issues so I was hopeful that this would solve my issues but it only setup 1 on the CGI page but did see all 3 when running the script.

image

Open ports?

Hi im trying out this script after hearing about it from Techno Tim youtube channel.
After running the script everything seems to work fine, i can access the 3 webpages with information.

But when trying to connect with Windows NUT Client or when trying to add the server into Home-Assistant i dont seem to be able to connect.

All devices is on the same network, and if i run the windows tool "Advanced Port Scanner" it says only port 22 & 80 is open.

I installed the script on a Raspberry Pi 3b+ with a PoE hat, running Pi OS Lite (64-bit)

The UPS is an "APC Back-UPS 850 BE850G2-GR UPS" in my livingroom.

I have another "APC Back UPS Pro - BR900MI - UPS 900VA" in my serverrack that is connected to my Synology NAS (that have an internal NUT server) and this one is working in Home-Assistant, and i can see that the port 3493 is open on my NAs when i port scan.

Output from the pi:

sudo netstat -lptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      517/sshd: /usr/sbin
tcp        0      0 localhost:nut           0.0.0.0:*               LISTEN      6201/upsd
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      517/sshd: /usr/sbin
tcp6       0      0 localhost:nut           [::]:*                  LISTEN      6201/upsd
tcp6       0      0 [::]:http               [::]:*                  LISTEN      6229/apache2
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*                           604/dhcpcd
udp        0      0 0.0.0.0:56464           0.0.0.0:*                           332/avahi-daemon: r
udp        0      0 0.0.0.0:snmp            0.0.0.0:*                           9571/snmpd
udp        0      0 0.0.0.0:mdns            0.0.0.0:*                           332/avahi-daemon: r
udp6       0      0 [::]:50963              [::]:*                              332/avahi-daemon: r
udp6       0      0 [::]:mdns               [::]:*                              332/avahi-daemon: r

Script is failing to install "snmp-mibs-downloader" on debian 11.

Hi,

I was trying to install NUT using this amazing script. the only thing that seems to be failing is that apt can't find "snmp-mibs-downloader".

This is the error it spits out:
`Package snmp-mibs-downloader is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'snmp-mibs-downloader' has no installation candidate
cp: cannot stat '/etc/snmp/snmpd.conf': No such file or directory`

I do have to say I needed to reinstall due to me not having the right UPS plugged in. I'm using Linux Debian 11 on a Intel processor..

Uninstall

It would be nice to either document or automate the steps to revert / uninstall the actions taken by this script. I think docs in README.md would be a good start. Thank you for this!

Accessing UPS info page results in "Error: can't open template file (upsstats.html)"

Hi,

As I talked before in a earlier #8 issue
Here is what I could find.

Linux OS:
Debian 11

The issue:
While trying to access the UPS info page The user receives a Error: can't open template file (upsstats.html)

Possible causes:

  • Something is up with the permissions.
  • The file doesn't exist on the host.

What I could find is that the upsstats.html seems to be missing on the machine.
Trying to find the files with a upsstats in there name with: find / -name "upsstats.*" results in:
/usr/share/man/man8/upsstats.cgi.8.gz
/usr/share/man/man5/upsstats.html.5.gz
/usr/lib/cgi-bin/nut/upsstats.cgi

Solution!
here it is

Turns out two files were missing from NUT it self here is how to get the website working again:

1. On the host system go to the NUT directory with `cd /etc/nut`

2. Create a file called `nano upsstats.html` and paste the contents of [upsstats.html.sample](https://raw.githubusercontent.com/networkupstools/nut/master/conf/upsstats.html.sample) to the file.

3. Now do the same for `nano upsstats-single.html` with the contents of [upsstats-single.html.sample](https://raw.githubusercontent.com/networkupstools/nut/master/conf/upsstats-single.html.sample)

Now reload the page and it should be up and running.

If more information is needed feel free to ask.

Build from source/support 2.8.0

Right now, most repos are still serving NUT 2.7.4 instead of the latest version 2.8.0. Since the script uses apt, that means most users will get 2.7.4. Building from source or otherwise getting 2.8.0 would allow users to get the latest stable build of NUT instead of 2.7.4. At least one user has already asked:
#1

We could also make the script more portable (right now, it depends on apt which limits us to the Debain-y stuff that uses apt).

The 2.8.0 problem solves itself when/if the default repos start serving 2.8.0 (I expect that "soon", but not sure how long).

Add option to enable remote upsd connections

Some users want upsd to talk to other systems over a LAN (for examples, see Home Assistant and WinClient use cases on #4 and #1). This is relatively easy to do for IPv4 with a LISTEN directive in the upsd.conf file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.