installing ups monitor
Bo Berglund
bo.berglund at gmail.com
Tue Jan 12 00:01:51 UTC 2021
On Mon, 11 Jan 2021 15:47:52 +0100, Bo Berglund <bo.berglund at gmail.com> wrote:
>On Tue, 12 Jan 2021 00:23:17 +1100, Karl Auer <kauer at biplane.com.au> wrote:
>Concerning configuration I have found two how-tos that are informative:
>
>https://www.reddit.com/r/synology/comments/gtkjam/use_synology_nas_as_ups_server_to_safely_power/
>https://diktiosolutions.eu/en/synology/synology-ups-nut-en/
>
>Then after logging on with SSH to my NAS I could see what the default "user" for
>UPS is set to and use that in the Ubuntu config. Did not need to change much.
>
>Then I intended to check if the UPS connection on Ubuntu worked properly when my
>ISP suddenly dropped the fiber! Grrrr....
>
Back again after the ISP got his act together and my fiber connection is again
working.
What I ended up doing on my Ubuntu server is this:
- sudo apt install nut
- Edit configuration file /etc/nut/nut.conf
Set this item:
MODE=netclient
- Edit configuration file /etc/nut/upsmon.conf set this item only:
MONITOR ups at 192.168.119.138 1 monuser secret slave
Explanation:
- ups is the name given in the configuration file on the Synology NAS to
the UPS connected by the USB cable (it was the default)
- monuser secret is the way the connection user is defined in the same
config file on the Synology NAS (yes secret is the default pwd)
- slave defines the way the Ubuntu server connects to the server as
After this was all set and done I finally issued this command, which did not
result in any error message or such:
sudo service nut-client restart
I have checked that there is a copnnection working towards the NAS server:
$ upsc ups at 192.168.119.138
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: not set
battery.mfr.date: 2019/10/17
battery.runtime: 2302
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 13.6
battery.voltage.nominal: 12.0
device.mfr: APC
device.model: Back-UPS ES 700G
...
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 5
driver.parameter.port: auto
driver.version: DSM6-2-25364-191230
driver.version.data: APC HID 0.95
driver.version.internal: 0.38
input.sensitivity: medium
input.transfer.high: 266
input.transfer.low: 180
input.voltage: 234.0
input.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 871.O4 .I
ups.firmware.aux: O4
ups.load: 0
ups.mfr: APC
ups.mfr.date: 2019/10/17
ups.model: Back-UPS ES 700G
ups.productid: 0002
ups.serial: 5B1942T42157
ups.status: OL
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d
So the Synology server is running and the nut client on Ubuntu works for
communication with it.
What I do not know is if the nut-client service is also communicating properly
with the Synology server...
How can I check this?
I looked in the syslog file and found this line as the last from upsmon:
Jan 11 15:17:36 ubuntuserv upsmon[15686]: Communications with UPS
ups at 192.168.119.138 established
I thought that the client would poll data from the server and therefore there
would be repeated log entries but there seems to be just one successful.
There are other syslog entries before this which show error messages like this:
Jan 11 15:17:16 ubuntuserv upsmon[15686]: Poll UPS [ups at 192.168.119.138] failed
- Server disconnected
Jan 11 15:17:16 ubuntuserv upsmon[15686]: Communications with UPS
ups at 192.168.119.138 lost
Jan 11 15:17:21 ubuntuserv upsmon[15686]: UPS [ups at 192.168.119.138]: connect
failed: Connection failure: Connection refused
How can I be sure that the UPS monitoring service is now OK?
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list