User Tools

Site Tools


technical:24.04_ups_setup_with_nut

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
technical:24.04_ups_setup_with_nut [2026/01/05 23:49] – [Using NUT for UPS] mark_scottworld.nettechnical:24.04_ups_setup_with_nut [2026/01/14 17:27] (current) mark_scottworld.net
Line 38: Line 38:
 Add the following at the bottom of the file. Add the following at the bottom of the file.
  
-  [apc] + [apc] 
-  driver = usbhid-ups + driver = usbhid-ups 
-  port = auto + port = auto 
-  desc = "Back-UPS BX750MI" + #cable = 940-0095B 
-  override.battery.charge.low = 50+ desc = "Back-UPS BX750MI" 
 + #override.battery.charge.low = 50 
 + #onlinedischarge_calibration = set 
 + pollonly 
 + lbrb_log_delay_sec = 3 
 + lbrb_log_delay_without_calibrating
  
 Edit /etc/nut/upsd.conf Edit /etc/nut/upsd.conf
Line 71: Line 76:
  
  
-  MONITOR mge@localhost 1 upsuser <secret> master+  MONITOR apc@localhost 1 upsuser <secret> master
   NOTIFYCMD /etc/nut/notify-email   NOTIFYCMD /etc/nut/notify-email
   SHUTDOWNCMD "/sbin/shutdown -P +0"   SHUTDOWNCMD "/sbin/shutdown -P +0"
Line 90: Line 95:
   nano /etc/nut/notify-email   nano /etc/nut/notify-email
      
-Add this to the script.+In /etc/nut/notify-email add:  (you will need to prefix the file with a bash shell)
  
 +<code>
 +#!/bin/s<remove>h characters (this line is messed due to wiki not allowing them)
 +SUBJECT="`hostname`: Power Event"
 +FROM_ADDR="root@<host>.net"
 +FROM_NAME="UPS"
 +TO="<recepient>"
 +echo "Subject: $SUBJECT\n\n$*" | sendmail -f "$FROM_ADDR" -F "$FROM_NAME" "$TO"
 +</code>
  
-Set the permissions of the following files.+Set the necessary permissions:
  
-  cd /etc/nut +<code> 
-   +chown root:nut ups.conf upsd.conf upsd.users upsmon.conf notify-email 
-  chown root:nut ups.conf upsd.conf upsd.users upsmon.conf notify-email +chmod 0640 ups.conf upsd.conf upsd.users upsmon.conf 
-  chmod 0640 ups.conf upsd.conf upsd.users upsmon.conf +chmod 0750 notify-email 
-  chmod 0750 notify-email +</code>
-   +
-Now edit /etc/nut/nut.conf+
  
-  nano /etc/nut/nut.conf +Change the following in /etc/nut/nut.conf:
-   +
-Change the mode line+
  
   MODE=standalone   MODE=standalone
-   
-Now restart the UPS monitoring services. 
  
-  systemctl restart nut-server.service +Restart the UPS monitoring service: 
-  systemctl restart nut-monitor.service + 
-  +<code> 
 +systemctl restart nut-server.service 
 +systemctl restart nut-monitor.service 
 +</code> 
 Check /var/log/syslog for errors and check communication with: Check /var/log/syslog for errors and check communication with:
  
technical/24.04_ups_setup_with_nut.1767653384.txt.gz · Last modified: by mark_scottworld.net

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki