Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
nut - where to configure shutdown sequence
« previous
next »
Print
Pages: [
1
]
Author
Topic: nut - where to configure shutdown sequence (Read 3879 times)
tessus
Jr. Member
Posts: 67
Karma: 2
nut - where to configure shutdown sequence
«
on:
November 14, 2021, 08:59:37 pm »
I've configured nut (via the plugin
Services -> Nut)
and the diagnostic panel shows all the UPS info. So far so good.
But how do I configure the OPNsense machine to shutdown after a certain amount of time? There are no config options in the plugin UI.
I don't have a problem doing this via an SSH session, but there's no info in the docs that one has to do that.
In a normal setup, I'd just change the
upsmon.conf
and start
upsmon
. But this is a hardened system and a few things work differently than on "regular" systems.
This is a plugin, so I don't know if asking a question on this forum is appropriate, in which case please direct me to the right place.
Logged
mimugmail
Hero Member
Posts: 6767
Karma: 494
Re: nut - where to configure shutdown sequence
«
Reply #1 on:
November 15, 2021, 09:47:05 am »
Currently not possible, it should shutdown when reaching 10% battery
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
tessus
Jr. Member
Posts: 67
Karma: 2
Re: nut - where to configure shutdown sequence
«
Reply #2 on:
November 15, 2021, 08:17:25 pm »
Thanks a lot for your reply.
Is there any chance you can add this info to the docs and even the plugin?
Code:
[Select]
The system will shutdown when 10% battery is reached.
Right now a person who uses the nut client knows nothing except that there's info from the UPS. But that alone is pretty much useless. The reason why one wants to connect to a UPS is that the machine is safely shutdown.
Logged
mimugmail
Hero Member
Posts: 6767
Karma: 494
Re: nut - where to configure shutdown sequence
«
Reply #3 on:
November 15, 2021, 08:19:58 pm »
Everyone is invited to contribute to this community
https://github.com/opnsense/docs
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
tessus
Jr. Member
Posts: 67
Karma: 2
Re: nut - where to configure shutdown sequence
«
Reply #4 on:
November 16, 2021, 12:11:26 am »
https://github.com/opnsense/docs/pull/362
https://github.com/opnsense/plugins/pull/2651
Logged
mimugmail
Hero Member
Posts: 6767
Karma: 494
Re: nut - where to configure shutdown sequence
«
Reply #5 on:
November 16, 2021, 06:34:34 am »
Thx, saw the PRs, is there a chance to verify this too? If I remember crlorrectly I read about the 10% in some other issue
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
tessus
Jr. Member
Posts: 67
Karma: 2
Re: nut - where to configure shutdown sequence
«
Reply #6 on:
November 16, 2021, 07:12:57 am »
Sorry, not on my end. I have production machines on my UPS and they will shutdown sooner than at 10% remaining battery level.
But I might change the wording, because the nut client will shutdown the machine when the UPS emits a low battery warning. This might be at 10% or not. I thought you have set the 10% threshold specifically but nothing in the nut config files confirms that.
Logged
gpb
Full Member
Posts: 234
Karma: 13
Re: nut - where to configure shutdown sequence
«
Reply #7 on:
November 16, 2021, 03:42:14 pm »
In a real world situation I witnessed and stood there helplessly watching at 3 AM hoping my gear would shutdown because I had no way to manually intervene. A low battery alert was sent to both OPNsense and one of my RPi hosts from the nut-server and the log shows it was received by each. You can see the RPi initiates a shutdown, but nothing for OPNsense. I don't see what I would have expected to see like a sigterm or any message, but the log just stops and then we can see the boot up sequence hours later. Yet on the nut-server there was ample time to initiate the shutdown...so the UPS didn't simply die. This was months ago and I can't remember exactly which log in opnsense has this info.
In the rpi-1 shutdown sequence, the time between low-battery alert and the message "Giving up on the master..." is defined by the parameter DEADTIME in UPSMON.conf...in my case I have it set to 15 seconds which you can verify in the log. That parameter is missing from the OPNsense config...I think it needs to be included as an option...does it even have a default value? Still, it's a mystery what OPNsense did because the repeating 30 second message from DHClient also stops before the ups is shutdown. Anyhow that's my personal experience. There was no data corruption so...yay.
Edit: Another important value in upsmon.conf is FINALDELAY (missing in the opnsense config). BTW, I should note I'm not an expert on this.
«
Last Edit: November 16, 2021, 04:56:51 pm by gpb
»
Logged
HP T730/AMD RX-427BB/8GB/500GB SSD
HP NC365T 4-PORT
gpb
Full Member
Posts: 234
Karma: 13
Re: nut - where to configure shutdown sequence
«
Reply #8 on:
November 16, 2021, 03:43:21 pm »
Here is the log from the other nut client referred above. Btw, I do remember reading that this can be simulated as a test without having a dead ups...I need to track that down when I get time.
«
Last Edit: November 16, 2021, 07:54:14 pm by gpb
»
Logged
HP T730/AMD RX-427BB/8GB/500GB SSD
HP NC365T 4-PORT
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
nut - where to configure shutdown sequence