Systemctl restart systemctl restart you just need to convince apache that you really, really want to turn on CGI by uncommenting the following in /etc/nut/nf: # I_HAVE_SECURED_MY_CGI_DIRECTORY To activate the new configuration, you need to run: Add one line to the bottom of the file: MONITOR "Server UPS"Įnable CGI in apache and restart the web server: a2enmod cgi YAY! It works! Now, to install the web component, as promised! First, install the webserver and the NUT web stuff: apt install apache2 nut-cgiĮdit /etc/nut/nf to allow CGI scrips access to the monitor. Once the Raspberry comes back up, try to connect with UPSC and the name of your UPS: upsc SSL without certificate database That will ensure that all the config files got saved and the unit files are all enabled. Now, let’s restart these processes and see if we can connect. Edit /etc/nut/nut.conf and change the last line: MODE=netserver The Big Restart At the very bottom of the file, add: įinally, set the mode of how this whole thing will function. This same “user” is then added to /etc/nut/ers. (Mine are based on the hardcoded credentials that a Synology NAS uses.) “master” because the UPS is attached directly to this device through the USB cable. Username and password are at your discretion. The system is the name that we configured in the part of ups.conf. You can include it as a comment for future reference. Next, we need to set up nf Again, I’m just going to add what I need to the end of the file. I would say, try the auto settings–otherwise, you can look up your model here. The desc(ription) is also completely up to you. The name can be whatever suits your fancy. Hopefully, YOUR UPS is like mine and works well with the usbhid-ups driver. I like to add my stuff right at the bottom so I can find it quickly in the future. Nice to have real-world tools in the Raspberry repositories for easy installs! w00t! NUT Configurationįirst, let’s add the connection and the UPS to the config in /etc/nut/ups.conf. This is the Network UPS Tools package or “NUT” for short. Now install the monitoring software: apt-get update & apt-get install nut nut-client nut-server SMSC9512/9514 Fast Ethernet Adapterīus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. CP1500 AVR UPSīus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Check your connection with “lsusb”, literally “list USB devices”: $ lsusbīus 001 Device 004: ID 0764:0501 Cyber Power System, Inc. Plug a USB cable into the UPS and into the Raspberry. I changed the hostname to “ups” to identify my new server. Image an SD card and do the usual setup steps. I can use the little pushbutton on the front to poke through the status OR I can install NUT and monitor my UPS with a cool webpage and much better statistics! I’m going the webpage route! Setting up NUT on Raspberry I’d like to monitor the battery level and OUTAGES. I’ve got a couple of LINUX servers and a Synology NAS on my CyberPower 1350 UPS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |