Configure UPS APC

Hi i attach this ups: APC Back-UPS Model NO: BX950MI

I install UPS Package on Nethserver and Settings as in screeshoot:

But i receive an error and i put the command in the terminal this is the output:
https://termbin.com/bmrx

/var/log/messages

I think the driver should be usbhid-ups, see also Network UPS Tools - Hardware compatibility list

2 Likes

Hi @mrmarkuz
yes you are correct


Now how can i settings the ups to send shutdown signal to nethserver if the ups run in backup mode ?

It should be preconfigured.

The default configuration provides a controlled shutdown in the event of the absence of power.

From UPS — NethServer 7 Final

1 Like

Where i can see this configuration?
But is possible to schedule the shutdown after 10 minute after absence of power.

It’s configured in /etc/ups/upsmon.conf by following lines:

SHUTDOWNCMD "/sbin/shutdown -h +0"

FINALDELAY 5

It shuts down after 5 seconds by default. To change it you need a custom template.

See also 6. Configuration notes and UPSMON.CONF(5)

2 Likes

Hi i don’t understand how to create custom template for example.
the file is on /etc/ups/upsmomn.conf ok.

But the template is on /etc/e-smith/templates/etc/ups/upsmon.conf but under this folder there is two files:
10 base 20access this two file merge together make up the original configuration file under /etc/ups/upsmonn.conf, correct?

Ok if i need to change the FINALDELAY parameter i need to create a custom template under:
/etc/e-smith/templates-custom/etc/ups/upsmon.conf/ but here i don’t understand what i need to do, i mean i need to create another file like 30delay whit this content FINALDELAY 10, or i need to copy the file 10 base from /etc/e-smith/templates/etc/ups/upsmon.conf and edit the line FINALDEALY?

I hope you understand what i mean, thanks.

Yes, correct.

I don’t know and unfortunately I can’t test it now.
It depends on how nut parses it’s config files.
The better solution would be a 30delay file because system updates of 10base or 20access will work.
If it’s not working you need to copy the 10base file and remove the 30delay file.
After creating the custom template, you need to execute signal-event nethserver-nut-update to write the config files and restart the services.

FINALDELAY wants seconds so in your case you’d need FINALDELAY 600 to have a wait time of 10 minutes.

1 Like

Ok i try later thx

Hi @mrmarkuz


i unplug the power cable on eaton ups but i wait around 5 minutes but the nethserver not shutdown

Did you already try both methods?

Did you restart the service?

I don’t make any change i leave the default configuration for see it work or not, but i wait around 5 minutes and nethserver doesn’t shutdown

It should shut down automatically 5 seconds after being on LOW battery, not after being ON battery (like after unplugging the power cable).

1 Like

Ah ok, it’s possible to shutdown when ups run on battery mode after 5 minutes?

I don’t know if that’s really a good idea because a 5 minute power outage will shutdown your server even if there’s enough battery left.
I wasn’t able to manage it yet but it seems you need a shutdown script:

https://networkupstools.org/docs/user-manual.chunked/ar01s07.html

1 Like