NUT-UPS timed shutdown option

UPS-NUT rock-ons does not have fields the time in seconds until shutdown is initiated (shutdown time) and shutdown mode (ups goes on battary or ups reaches low battary). It is very important fields.

@g2_ufo Welcome to the Rockstor community by the way. Yes this would be a nice feature and funnily enough was the reason the NUT folks added their scheduler (which Rockstor uses). The NUT implementation you see in Rockstor is actually in it’s first release and we are relying on user feedback such as yours to guide what elements of NUT we cater for in the GUI, as there is a desire to keep things as accessible / simple as possible whilst also serving the greatest majority of users.

I agree that the option to shutdown regardless of battery state after a set period of time is an important feature / GUI config option and have created an issue “NUT timed shutdown option” under which progress on this feature might be catalogued. Currently we don’t expose this feature to the GUI but there is a pre-configured but remarked out entry to enable this.

For the time being to shutdown after a set number of seconds of the UPS being “On Battery” one can uncomment the following 2 lines beginning with “AT” in /opt/rockstor/conf/upssched.conf

# remark out these 2 lines to shutdown after # seconds on battery
#AT ONBATT * START-TIMER early-shutdown 120
#AT ONLINE * CANCEL-TIMER early-shutdown

For changes in this file to take effect one will need to re-submit your nut config via the GUI.
120 seconds may be rather short so you might want to change that to your preference.

Please also refer to the Wiki post explaining Rockstor’s NUT implimentation where the above procedure is also documented under the “Shutdown after a set period on battery” section and is listed under “Future enhancements”.

To avoid possible confusion the NUT-UPS system is part of the Rockstor “Services” system and is not part of the docker based “Rock-ons” system. Just in case this leads to confusion re how it was implemented. I hope that you don’t mind that I have edited your forum post title and section tag to reflect this. Please re-edit if you think I have edited in error. This way others interested in this feature can chip in or make further suggestions, and are hopefully more likely to find the post in the first place.

1 Like

And also It would be perfect if users can see UPS parameters (input voltage, output voltage and etc.) graphs on dashboard view too. And nut must sent a mail notification if UPS state has been changed (switch to battary or to the line).

@g2_ufo Yes a dashboard widget for UPS stats would be great and is also included in the Future enhancements section of the Rockstor’s NUT implimentation as well, thanks for up voting. This is a personal favourite enhancement of mine but I think there are more pressing Rockstor issues that have to be addressed first so it may take a while to get around to this. I at least am not yet aware of how to go about this but hopefully we can get this neat feature in at some point. I would like to see % load myself but not every UPS has this as an output so that’s another wrinkle. We could poll the UPS (via the NUT Python wrapper) for its available info and then present as config options in the dashboard widget what options we know how to pot.

As to your email notifications point I totally agree; and I am hoping you are in luck. If you got to System - Email alerts and configure according to the docs section Email Notifications then you should receive all known NUT status changes. That’s the hope anyway. :grinning:

If you could let the forum know how you get on with this then that would be great. Thanks.

@g2_ufo Quick notification that the feature issue referenced in this thread has now been resolved and is included as of Rockstor testing channel updates version 3.8.15-3