OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: aimdev on May 31, 2020, 08:09:35 am

Title: Nut, APC ups, another way
Post by: aimdev on May 31, 2020, 08:09:35 am
Never managed to get NUT working with my APC Backup UPS, so I did this

pkg install apcupsd

pkg install nano (easier to edit files)

edit /usr/local/etc/apcupsd/apcupsd.conf for your ups model

edit more /etc/rc.conf.d/apcupsd

apcupsd_enable="YES"

run apctest , select test alarm, listen for a beep.

service apcupsd start

service apcupsd status

Don't use an apcupsd from free bsd, it wont work, use the one from opnsense's repository.

Did the reboot test, still running, not sure if an update will remove any changes?

Title: Re: Nut, APC ups, another way
Post by: mimugmail on May 31, 2020, 02:59:32 pm
No, Update will not touch it
Title: Re: Nut, APC ups, another way
Post by: aimdev on May 31, 2020, 07:11:12 pm
Hi
Thanks for that.
Now here is a bit of a mystery.
I setup collectd to send apsupsd information to my influxdb and grafana reporting system.
I added the relevant lines to /usr/local/etc/collectd.conf and got data into the database, along with the plot.
I rebooted opnsense, and when I checked /usr/local/etc/collectd.conf, the entries had been removed, but the data is still being received by influx and plotting is working.
Where did my additions go?
Title: Re: Nut, APC ups, another way
Post by: mimugmail on May 31, 2020, 10:30:50 pm
Did you also installed collectd plugin?
Title: Re: Nut, APC ups, another way
Post by: aimdev on May 31, 2020, 10:57:52 pm
I only installed the collectd plugin. (ie I did not use pkg on the command line)
Title: Re: Nut, APC ups, another way
Post by: mimugmail on June 01, 2020, 06:56:59 am
If you install the plugin, it will install the package and the UI around. If you also "enable" the plugin, it will always overwrite your config. So, you can either deinstall the plugin (os-collectd) and keep only the package, or disable the plugin