On Fri, 7 Aug 2020, Todd Benivegna wrote:

APC Back-UPS NS 650M1 UPS ---USB---> Synology NAS (DS416 - Master?) ---Ethernet---> Netgear Managed Switch w/ uplink to router <---Ethernet--- Servers (Ubuntu 20.04 - Plex, Pulsar, Proton - All three set as slaves)

I'm guessing that the UPS supplies only the NAS, not the 3 Ubuntu machines. Do they have their own UPS's?

I have all three servers set as slaves, so is the Synology considered the master?  Or do I need to set one of the servers as the Master?  I've been under the impression that the Synology is the master, but have been unable to confirm this.

I've been looking at the Synology documentation and their NUT setup is not at all clear. Some of their site is nonsense. I gather from other sites that the NAS is indeed the master and that upsmon runs in the NAS. This makes sense if the UPS is for the NAS and nothing else. It also simplifies shutdown if NAS users mount NFS supplied directories in the NAS.

So what I have done so far is enable the "Network UPS Server" on the Synology, entered the three IPs of the servers in there, set it to shutdown when battery is low and enabled "Shutdown UPS when the system enters safe mode".  I then installed NUT on all three servers. In nut.conf I changed MODE to "MODE=netclient".  I then added my MONITOR line in upsmon.conf. on all three.  Looks something like this:  

MONITOR [email protected] 1 monuser secret slave

My SHUTDOWNCMD looks like this:
SHUTDOWNCMD "getUPSstatus [email protected] ; logger -t upsmon.conf \"UPS status is 
$UPSstatus\" ; /sbin/shutdown -h +0"  

From your previous reports it looks as if getUPSstatus does not work in a
SHUTDOWNCMD declaration since the shell variable it creates gets lost. It probably better to declare something like

 SHUTDOWNCMD "logger -t upsmon.conf \"UPS status [$( upsc [email protected] ups.status 
)]:$( upsc [email protected] )\" ; /sbin/shutdown -h +0"  

I think I've definitely made a mistake though, in that I have not set 
RUN_AS_USER in upsmon.conf

The default user is usually set when NUT is built for a specific Linux distribution. I don't know what user Ubuntu have chosen, but I will guess that they have followed Debian and use "nut". I suggest you do not change this.

and set up the appropriate permissions.

Again, I assume Ubuntu build NUT with the correct file permissions for their default user.

Roger
_______________________________________________
Nut-upsuser mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to