nut - impossible to configure/customise

Started by zyghom, March 13, 2024, 06:23:57 AM

Previous topic - Next topic
hi,

I started using UPS and enabled the plugin on Opnsense
I am able to configure it to my needs (/usr/local/etc/nut/...) but the changes in any file don't survire neither reboot nor even disable/enable the Service

example is:
POWERDOWNFLAG /etc/killpower
- with this statement Opnsense sends signal to UPS to turn it off - that behaviour migth not be desired
the config files are taken from templates that are here:
/usr/local/opnsense/service/templates/OPNsense/Nut/
but modifying these files does not help as per description:
cat /usr/local/opnsense/service/templates/OPNsense/Nut/upsmon.conf
# Please don't modify this file as your changes might be overwritten with
# the next update.


is there any mean to change this behaviour?
as a workaround I added a script that runs on restart and it changes the conf file but that is dirty solution

thank you

Why don't you use the UI? Services > NUT

That's the point of plugins, you know  ;)
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

thank you Patrick
but the GUI for the pluging is very limitted with the configuration

What's missing? Maybe a pull-request can be created easily?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)


I agree, The nut GUI should look identical to TrueNAS Core GUI. Hence, I use the TrueNAS nut as oppose to OPNsense.

right, to go further I use even another machine where my UPS is connected to, that works as nut server
all other machines work as clients
but even client (each client) requires some customisation
and on TrueNAS the customisation option is a bit higher than on OPNsense
good example is: if one of the clients is a Proxmox machine, I will give this machine much more time to shutdown than the other machine that is pure firewall or so

Quote from: zyghom on April 09, 2024, 11:04:16 AM
hi Patrick,

I spent some time and described everything last month here:

https://github.com/opnsense/plugins/issues/3855

I agree with your conclusions.  I reluctantly reverted to pfSense when I failed to be able configure the shutdown of my two TrueNAS boxes.  You went much further than I in attempting to find a remedy.  I enjoyed and appreciated your report in the other thread.  I thought it was "just me" and one more aspect of what seems to me to be the relative "opacity" of OPNsense over pfSense.
2x TrueNAS 13.0-U6.1, X9SCM-F, Xeon E3-1230 v2, 32GB ECC RAM, 6x4TB WD Red/Red+ in RaidZ2, SAS9211-8i HBA, mix SSD/laptop-HDD boot drives, Solarflare SFN6122F 10G between boxes.

Protectli Vault FW4B pfSense box with CP1500 UPS supplying 2 servers, router and WAN gateway.

Ideas:

* Submit improvements to the code.
* Submit feature requests to the issue tracker.
* Use the NUT package without the GUI for full customization.


Cheers,
Franco

Quote from: franco on April 15, 2024, 12:54:14 PM
Ideas:

* Submit improvements to the code.
* Submit feature requests to the issue tracker.
* Use the NUT package without the GUI for full customization.


Cheers,
Franco

I went for point 3 only because I have no idea how to contribute to the code
I tried expressing myself in the point 2 but I am not sure I did it properly

Ok, you have to consider that everything eventually is suboptimal and a lot of people use the current state just fine nevertheless. So you need to account for taking those people on the journey which can only lead to structured feature requests (option 2) or a rewrite (option 4 I guess).

I don't see another option except these 4 for NUT on OPNsense.


Cheers,
Franco