installing ups monitor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
29 messages Options
12
Bob
Reply | Threaded
Open this post in threaded view
|

installing ups monitor

Bob
All the talk about needing a ups device I decided to check if my desktop system
was using the apc ups I have.  The ups is working but there is no software to
shutdown the computer when the battery gets low.  It appears that somewhere
along the line the upsmon software got deleted.  So I installed the nut-client.

I am trying to set up the ups monitor.  It seems that the nut-client program
can not find the apc1250.  Is there a program to test the serial ports?  I do
not see anything about the serial ports in the settings.

--
Robert Blair


A government which robs Peter to pay Paul can always depend on the support of Paul.  -- George Bernard Shaw

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Karl Auer
On Thu, 2021-01-07 at 22:58 -0800, Bob wrote:
> So I installed the nut-client.

I had that working on my last laptop with an APC BR900I, but never
really needed it. It monitored a USB connection as I recall (though the
UPS may have shown up as a serial port I suppose).

> It seems that the nut-client program can not find the apc1250.  Is
> there a program to test the serial ports?

If you are actually using an actual serial port (9-pin or 25-pin D-
shell, RS-232), then your first step should be to check the BIOS and
make sure the port is enabled there. Use of serial ports in commodity
PCs rare these days and some modern BIOSes disable them by default.

You can also look to see if you have any devices like "/dev/ttyS0",
though they may be placeholders.

The only way to really test a serial port is to connect a serial device
to it and play with it in cutecom or minicom ("apt install minicom",
then "sudo minicom -o -w -D /dev/ttyS0" or whatever). If your serial
port is live and the other device is talking you should see something.
Read "man minicom" but the most important things you need are CtlA-Z
for help, CtlA-P to set comms parameters and CtlA-O to get out of Dodge
City :-)

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bo Berglund
In reply to this post by Bob
On Thu, 7 Jan 2021 22:58:33 -0800, "Bob" <[hidden email]> wrote:

>All the talk about needing a ups device I decided to check if my desktop system
>was using the apc ups I have.  The ups is working but there is no software to
>shutdown the computer when the battery gets low.  It appears that somewhere
>along the line the upsmon software got deleted.  So I installed the nut-client.
>
>I am trying to set up the ups monitor.  It seems that the nut-client program
>can not find the apc1250.  Is there a program to test the serial ports?  I do
>not see anything about the serial ports in the settings.
>

I got myself an APC ES 700 UPS after the hickup when we had the power outage
described in thread "Power outage now my server asks for fck, what to do?"

In the process of connecting up my stuff (fiber box, ASUS router, network
switches, NAS, Ubuntu server) I am pretty much done now.
I looked at the APC homepage but it redirects to "Schneider Electric" and sets
the page language to Swedish so English is not available. Furthermore it states
that the product is expired....

The download available for software only contains a Windows installer, nothing
for Linux... :(

Since people here have been talking about hooking up the Ubuntu server to the
UPS such that it will shut down sensibly when the battery power nears its end I
wonder how exactly this is done?

There are three RJ45 sockets on the side of the UPS and one is apparently really
a USB connection to be hooked up using a converter cable supplied with the UPS.
That cable has an RJ45 in one end (like a network cable) and a USB-A on the
other.
But how is it used on Ubuntu?

I have not seen any "upsmon" program on my Ubuntu 18.04 server in any case (if
that is the correct name)...

Or is it nut-client? Strange name in that case...


--
Bo Berglund
Developer in Sweden


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bo Berglund
On Sun, 10 Jan 2021 09:20:36 +0100, Bo Berglund <[hidden email]> wrote:

>But how is it used on Ubuntu?
>
>I have not seen any "upsmon" program on my Ubuntu 18.04 server in any case (if
>that is the correct name)...
>
>Or is it nut-client? Strange name in that case...

I found a page describing the installation of linux packages for ups:
https://networkupstools.org/docs/user-manual.chunked/ar01s05.html#Installing_packages

But when I did so I reached an error:

$ sudo apt install nut
....
The following NEW packages will be installed:
  libupsclient4 nut nut-client nut-server
....
Created symlink /etc/systemd/system/multi-user.target.wants/nut-monitor.service
? /lib/systemd/system/nut-monitor.service.
Job for nut-monitor.service failed because the service did not take the steps
required by its unit configuration.
See "systemctl status nut-monitor.service" and "journalctl -xe" for details.

invoke-rc.d: initscript nut-client, action "start" failed.  <== ERROR HERE!

? nut-monitor.service - Network UPS Tools - power device monitor and shutdown
controller
   Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor
preset: enabled)
   Active: failed (Result: protocol) since Sun 2021-01-10 09:31:07 CET; 9ms ago
  Process: 7659 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)

Jan 10 09:31:07 ubuntuserv systemd[1]: Starting Network UPS Tools - power device
monitor and shutdown controller...
Jan 10 09:31:07 ubuntuserv upsmon[7659]: upsmon disabled, please adjust the
configuration to your needs
Jan 10 09:31:07 ubuntuserv upsmon[7659]: Then set MODE to a suitable value in
/etc/nut/nut.conf to enable it
Jan 10 09:31:07 ubuntuserv systemd[1]: nut-monitor.service: Can't open PID file
/var/run/nut/upsmon.pid (yet?) after start: No such file or directory
Jan 10 09:31:07 ubuntuserv systemd[1]: nut-monitor.service: Failed with result
'protocol'.
Jan 10 09:31:07 ubuntuserv systemd[1]: Failed to start Network UPS Tools - power
device monitor and shutdown controller.
....
nut-driver.service is a disabled or a static unit, not starting it.
....

So I am asked to edit /etc/nut/nut.conf, but this only contains a single line:
MODE=none



--
Bo Berglund
Developer in Sweden


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Karl Auer
In reply to this post by Bo Berglund
On Sun, 2021-01-10 at 09:20 +0100, Bo Berglund wrote:
> I wonder how exactly this is done?

The startup failure is probably because the config is not yet correct.
Get the config correct and it will probably start.

I dug out my old laptop and grabbed the config files from it: all in
/etc/nut: nut.conf, upsmon.conf and upssched.conf.

nut.conf contains one line:

MODE=netclient

upsmon.conf has a few lines:

RUN_AS_USER nut
MONITOR ups@192.168.1.3:3493 1 monuser XXXXXXX slave
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

upssched.conf has only one:

CMDSCRIPT /bin/upssched-cmd

Read the man pages for the details of what those lines mean.

The above reminds me what I did and how I did it. Because I run a
Synology NAS, it is important me that it is shutdown in an orderly
fashion if the power fails. Synology NASes understand APC UPSes out of
the box, so I used it as a networked UPS monitor and told NUT to check
the NAS, rather than check the UPS directly. monuser and XXXXXXX are
the creds it uses to talk to the NAS via SNMP.

If the power failed, the UPS would tell the NAS; the NAS would tell
anyone who asked, which was what my laptop did via NUT.

So I'm not sure that my configuration is that useful to you. I've never
used NUT directly via USB, and I don't know if it's even possible, but
even a cursory search suggests that it does, albeit via a driver that
you may need to install.

That's about all I can offer. Hope someone else has it sorted and can
guide you!

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

David Fletcher-5
In reply to this post by Bo Berglund
On Sun, 2021-01-10 at 09:20 +0100, Bo Berglund wrote:

> The download available for software only contains a Windows
> installer, nothing
> for Linux... :(

I did say a couple of days ago,
sudo aptitude install apcupsd



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bo Berglund
In reply to this post by Karl Auer
On Sun, 10 Jan 2021 20:19:14 +1100, Karl Auer <[hidden email]> wrote:

>The above reminds me what I did and how I did it. Because I run a
>Synology NAS, it is important me that it is shutdown in an orderly
>fashion if the power fails. Synology NASes understand APC UPSes out of
>the box, so I used it as a networked UPS monitor and told NUT to check
>the NAS, rather than check the UPS directly. monuser and XXXXXXX are
>the creds it uses to talk to the NAS via SNMP.
>
>If the power failed, the UPS would tell the NAS; the NAS would tell
>anyone who asked, which was what my laptop did via NUT.
>
>So I'm not sure that my configuration is that useful to you.

Really interesting because I have a Synology NAS as one device on my network
too!

I will study how it will be done and see if I can get it going via the NAS.


--
Bo Berglund
Developer in Sweden


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Bob
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bob
In reply to this post by Bob
** Reply to message from "Bob" <[hidden email]> on Thu, 7 Jan
2021 22:58:33 -0800

> All the talk about needing a ups device I decided to check if my desktop system
> was using the apc ups I have.  The ups is working but there is no software to
> shutdown the computer when the battery gets low.  It appears that somewhere
> along the line the upsmon software got deleted.  So I installed the nut-client.
>
> I am trying to set up the ups monitor.  It seems that the nut-client program
> can not find the apc1250.  Is there a program to test the serial ports?  I do
> not see anything about the serial ports in the settings.

I have NUT running.  Now I need to do the final test, which is to remove power
to the UPS and see if it shuts down properly.

The documentation I have says to "chmod 0660 /dev/ttyUSB0", this appears to be
what the system sets as default.  Also to "chown root:nut /dev/ttyUSB0", the
system default is root:dialout.  This works but does not surive a boot so I
added nut to the dialout group.

--
Robert Blair


What this country needs are more unemployed politicians.  -- Edward Langley, Artist (1928-1995)

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

J. Paul Bissonnette-2
On Sun, 10 Jan 2021 14:09:36 -0800
Bob <[hidden email]> wrote:

> ** Reply to message from "Bob" <[hidden email]> on
> Thu, 7 Jan 2021 22:58:33 -0800
>
> > All the talk about needing a ups device I decided to check if my
> > desktop system was using the apc ups I have.  The ups is working
> > but there is no software to shutdown the computer when the battery
> > gets low.  It appears that somewhere along the line the upsmon
> > software got deleted.  So I installed the nut-client.
> >
> > I am trying to set up the ups monitor.  It seems that the
> > nut-client program can not find the apc1250.  Is there a program to
> > test the serial ports?  I do not see anything about the serial
> > ports in the settings.  
>
> I have NUT running.  Now I need to do the final test, which is to
> remove power to the UPS and see if it shuts down properly.
>
> The documentation I have says to "chmod 0660 /dev/ttyUSB0", this
> appears to be what the system sets as default.  Also to "chown
> root:nut /dev/ttyUSB0", the system default is root:dialout.  This
> works but does not surive a boot so I added nut to the dialout group.
>

search Synaptic Package manager for Name = APC. You will find
APC UPS Power Management (daemon)
APC UPS Power Management (web interface)
APC UPS Power Management (documentation/examples)

I have been using this for about 15 years, so far no disasters.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Karl Auer
In reply to this post by Bob
On Sun, 2021-01-10 at 14:09 -0800, Bob wrote:
> I have NUT running.  Now I need to do the final test, which is to
> remove power to the UPS and see if it shuts down properly.

Probably worth mentioning: If you are checking via the network rather
than via a direct connection to the UPS, then the network devices that
allow your desktop to talk to the NAS (and/or UPS) need to have
protected power also.

It sounds as if you have moved to a USB connection though.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Bob
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bob
** Reply to message from Karl Auer <[hidden email]> on Mon, 11 Jan 2021
10:15:11 +1100

> On Sun, 2021-01-10 at 14:09 -0800, Bob wrote:
> > I have NUT running.  Now I need to do the final test, which is to
> > remove power to the UPS and see if it shuts down properly.
>
> Probably worth mentioning: If you are checking via the network rather
> than via a direct connection to the UPS, then the network devices that
> allow your desktop to talk to the NAS (and/or UPS) need to have
> protected power also.
>
> It sounds as if you have moved to a USB connection though.

The connection is through a USB to serial adapter.

--
Robert Blair


The ultimate result of shielding men from the effects of folly is to fill the world with fools.  -- Herbert Spencer, English Philosopher (1820-1903)

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Karl Auer
On Sun, 2021-01-10 at 15:38 -0800, Bob wrote:
> The connection is through a USB to serial adapter.

In that case make sure all the devices on the path from your desktop to
your UPS (or NAS) are getting their power from the UPS. Router, switch,
modem, whatever. And if you are using names instead of IP addresses,
make sure the DNS will keep working too. If your desktop acquires its
IP address via DCP, make sure the DHCP server stays up.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Knute Johnson-3
In reply to this post by David Fletcher-5
Thanks for that, it works great on my RaspberryPi.

I thought I was going to have to write something.


On 1/10/21 4:05 AM, David Fletcher wrote:

> On Sun, 2021-01-10 at 09:20 +0100, Bo Berglund wrote:
>
>> The download available for software only contains a Windows
>> installer, nothing
>> for Linux... :(
>
> I did say a couple of days ago,
> sudo aptitude install apcupsd
>
>
>


--

Knute Johnson

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bo Berglund
In reply to this post by Bo Berglund
On Sun, 10 Jan 2021 12:24:00 +0100, Bo Berglund <[hidden email]> wrote:

>On Sun, 10 Jan 2021 20:19:14 +1100, Karl Auer <[hidden email]> wrote:
>
>>The above reminds me what I did and how I did it. Because I run a
>>Synology NAS, it is important me that it is shutdown in an orderly
>>fashion if the power fails. Synology NASes understand APC UPSes out of
>>the box, so I used it as a networked UPS monitor and told NUT to check
>>the NAS, rather than check the UPS directly. monuser and XXXXXXX are
>>the creds it uses to talk to the NAS via SNMP.
>>
>>If the power failed, the UPS would tell the NAS; the NAS would tell
>>anyone who asked, which was what my laptop did via NUT.
>>
>>So I'm not sure that my configuration is that useful to you.
>
>Really interesting because I have a Synology NAS as one device on my network
>too!
>
>I will study how it will be done and see if I can get it going via the NAS.
>

Karl,
thanks again for your suggestion to use the Synology NAS as the UPS monitor!

It turns out that once I hooked up the RJ45/USB cable that came with the APC
ES700 to the USB connector on my Synology Diskstation 212j NAS I was able to
enable UPS monitoring and also the network UPS server on Synology.
The service itself was present out of the box! :)

So now the Synology NAS is checking the UPS state and it will shut down when
"battery is low".

I also enabled the network UPS server and configured it with the IP address of
my Ubuntu 18 server, so I assume that now the "only" thing I need to do is
figuring out how the Ubuntu server can use the UPS service on my NAS...

I installed package nut yesterday using apt on my Ubuntu server.
It entered a non-working state.

So now I "just" have to edit some config files, right?



With regard to another post in this thread:
I have set up my UPS system such that all of these items (and a few more) are on
UPS power:
- Incoming fiber interface to the Internet
- Main ASUS RT-AC86U router
- My two Netgear network switches
- Synology NAS
- Ubuntu Server (the target of my concerns)
- IP phone interface box

This seems to cover "everything" in case of a power outage so that my internal
network will continue operating with internal and Internet connection (assuming
the fiber provider's system is still on power).


--
Bo Berglund
Developer in Sweden


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

ubuntu-users mailing list
In reply to this post by Bob



From: "Bo Berglund" <[hidden email]>
Date: Sunday, 10 January 2021 at 09:22:41
To: "[hidden email]" <[hidden email]>
Subject: Re: installing ups monitor

On Thu, 7 Jan 2021 22:58:33 -0800, "Bob" <[hidden email]> wrote:

>All the talk about needing a ups device I decided to check if my desktop system
>was using the apc ups I have.  The ups is working but there is no software to
>shutdown the computer when the battery gets low.  It appears that somewhere
>along the line the upsmon software got deleted.  So I installed the nut-client.


There are three RJ45 sockets on the side of the UPS and one is apparently really
a USB connection to be hooked up using a converter cable supplied with the UPS.
That cable has an RJ45 in one end (like a network cable) and a USB-A on the
other.
But how is it used on Ubuntu?

<snip>

You often see on UPS boxes old-fashioned RS232-serial interfaces.
Initially the bulky DB25, or DB9 connectors, but they often use RJ45 connectors, as seen with Cisco and SUN equipment.
Your cable is (probably) an usb/serial-converter, and is under linux seen as ttyUSB0.

But no guarantees, ymmv.

--
Bo Berglund
Developer in Sweden


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bo Berglund
On Mon, 11 Jan 2021 09:55:19 +0000, Hans via ubuntu-users
<[hidden email]> wrote:

>
>
>
>From: "Bo Berglund" <[hidden email]<mailto:[hidden email]>>
>Date: Sunday, 10 January 2021 at 09:22:41
>To: "[hidden email]" <[hidden email]<mailto:[hidden email]>>
>Subject: Re: installing ups monitor
>
>On Thu, 7 Jan 2021 22:58:33 -0800, "Bob" <[hidden email]> wrote:
>
>>All the talk about needing a ups device I decided to check if my desktop system
>>was using the apc ups I have.  The ups is working but there is no software to
>>shutdown the computer when the battery gets low.  It appears that somewhere
>>along the line the upsmon software got deleted.  So I installed the nut-client.
>
>
>There are three RJ45 sockets on the side of the UPS and one is apparently really
>a USB connection to be hooked up using a converter cable supplied with the UPS.
>That cable has an RJ45 in one end (like a network cable) and a USB-A on the
>other.
>But how is it used on Ubuntu?
>
><snip>
>
>You often see on UPS boxes old-fashioned RS232-serial interfaces.
>Initially the bulky DB25, or DB9 connectors, but they often use RJ45 connectors, as seen with Cisco and SUN equipment.
>Your cable is (probably) an usb/serial-converter, and is under linux seen as ttyUSB0.
>
>But no guarantees, ymmv.

No converter in this case (in the cable that is). The cable has an RJ45 in one
end and a simple very thin USB-A in the other. Only wires inbetween.
There is probably a USB interface built into the UPS and wired out to the
RJ45...

But that is not a big problem, since when I plugged it into my Synology DS212j
it immediately recognized that there is an UPS and I could enable it in the
Synology system control panel. Including an UPS server function.

Now I am just scanning through the info I have dug up about connecting an Ubuntu
box to a networked UPS server (like the Synology).
Seems like it is not so complicated but enough so that I need to write notes to
myself...


--
Bo Berglund
Developer in Sweden


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Karl Auer
In reply to this post by Bo Berglund
On Mon, 2021-01-11 at 10:16 +0100, Bo Berglund wrote:
> So now I "just" have to edit some config files, right?

I guess. The samples I sent should be some use, especially the
"MONITOR" line. You will have to set up a user on the NAS form the
monitoring to use.
>
>
> I have set up my UPS system such that all of these items (and a few
> more) are on UPS power:
> [...]
> This seems to cover "everything" in case of a power outage

Bear in mind that every device you have on the UPS lowers your run time
in case of an outage. Attaching things like printers is not a good idea
at all.

Divide your devices into those that must continue running in order for
an orderly shutdown to work, and those that are nice to have if an
outage occurs. If you put the the two groups on different UPS outlets,
possibly via switched powerboards, you can turn the "nice to haves" off
easily if you need the extra run time.

Remember also that (unless you've really gone all out) your UPS runs on
one (1) power outlet, with a given maximum amperage. Don't attach too
much stuff to your UPS because if you blow the fuse you will get an
outage on the wrong side of the UPS...

Finally, tell the NAS to tell the UPS to shut down once the NAS has
entered safe mode. Configure everything else to shut down earlier. If
it doesn't shut down the UPS, and you are not there to deal with it
manually, you will run the battery right down, which reduces its useful
life.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

David Fletcher-5
In reply to this post by Bo Berglund
On Mon, 2021-01-11 at 14:04 +0100, Bo Berglund wrote:
> There are three RJ45 sockets on the side of the UPS and one is
> > apparently really
> > a USB connection to be hooked up using a converter cable supplied
> > with the UPS.
> > That cable has an RJ45 in one end (like a network cable) and a USB-
> > A on the
> > other.
> > But how is it used on Ubuntu?

APC used to do that. The first UPS I bought which was a 1500VA beast
had one as did IIRC a similar 1000VA one I got via eBay for my son to
use. I've no idea why APC used to do this but the last one I bought had
a standard USB socket, type B I think. If anyone needs a type A -> RJ45
cable let me know, I believe I have a couple of them somewhere.

Off topic but in my very limited experience smaller units seem to have
better longevity than the 1000/1500VA ones. I also have a second hand
Back-UPS CS 350 obtained via eBay in September 2004 for £20 - bargain!
- solely for protecting my DECT base phone, digital answering machine
and Virgin cable modem. All are still working perfectly whilst two
answering machines previously failed, possibly due to line surges.
Meanwhile both of the higher power units have failed. One of them kept
tripping in for no good reason several times each hour, the other one,
something inside it went BANG one day which was a little disturbing but
my server survived and ran on just filtered mains for a couple of days
until I received the new unit.

Perhaps I should treat the CS-350 to a new battery. It continues to sit
in the darkness under my desk, gathering dust while continuing to do
its job.

BTW both of these UPS are connected to a Belkin Gold unit, mainly
because it has a coax cable/satellite TV surge protector which the UPS
units do not.

Dave


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bo Berglund
In reply to this post by Karl Auer
On Tue, 12 Jan 2021 00:23:17 +1100, Karl Auer <[hidden email]> wrote:

>The samples I sent should be some use, especially the
>"MONITOR" line. You will have to set up a user on the NAS form the
>monitoring to use.
>>
>>
>> I have set up my UPS system such that all of these items (and a few
>> more) are on UPS power:
>> [...]
>> This seems to cover "everything" in case of a power outage
>
>Bear in mind that every device you have on the UPS lowers your run time
>in case of an outage. Attaching things like printers is not a good idea
>at all.

I think that most of these items are needed for the distributed system to work:
- Router because otherwise the internal network will be unavailable
- Fiber box, without which there is no Internet
- Network switches for the same reason
- Synology NAS manages the UPS and has important file storage
- Ubuntu Server, the reason I started this in the first place

I have not hooked up printers or laptops (they have internal batteries after
all) etc. And I don't think the fiber interface box pulls that many watts of
power either. And my mission was to make sure I had Internet available also in a
power outage.

So I think it should be OK now.

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....

So now I have had to set my phone as a hotspot and connect my laptop to that
just in order to get onto the Internet and report the fiber outage to my
provider...


--
Bo Berglund
Developer in Sweden


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Bob
Reply | Threaded
Open this post in threaded view
|

Re: installing ups monitor

Bob
In reply to this post by Bo Berglund
** Reply to message from Bo Berglund <[hidden email]> on Mon, 11 Jan
2021 10:16:51 +0100

> On Sun, 10 Jan 2021 12:24:00 +0100, Bo Berglund <[hidden email]> wrote:
>
> >On Sun, 10 Jan 2021 20:19:14 +1100, Karl Auer <[hidden email]> wrote:
> >
> >>The above reminds me what I did and how I did it. Because I run a
> >>Synology NAS, it is important me that it is shutdown in an orderly
> >>fashion if the power fails. Synology NASes understand APC UPSes out of
> >>the box, so I used it as a networked UPS monitor and told NUT to check
> >>the NAS, rather than check the UPS directly. monuser and XXXXXXX are
> >>the creds it uses to talk to the NAS via SNMP.
> >>
> >>If the power failed, the UPS would tell the NAS; the NAS would tell
> >>anyone who asked, which was what my laptop did via NUT.
> >>
> >>So I'm not sure that my configuration is that useful to you.
> >
> >Really interesting because I have a Synology NAS as one device on my network
> >too!
> >
> >I will study how it will be done and see if I can get it going via the NAS.
> >
>
> Karl,
> thanks again for your suggestion to use the Synology NAS as the UPS monitor!
>
> It turns out that once I hooked up the RJ45/USB cable that came with the APC
> ES700 to the USB connector on my Synology Diskstation 212j NAS I was able to
> enable UPS monitoring and also the network UPS server on Synology.
> The service itself was present out of the box! :)
>
> So now the Synology NAS is checking the UPS state and it will shut down when
> "battery is low".
>
> I also enabled the network UPS server and configured it with the IP address of
> my Ubuntu 18 server, so I assume that now the "only" thing I need to do is
> figuring out how the Ubuntu server can use the UPS service on my NAS...
>
> I installed package nut yesterday using apt on my Ubuntu server.
> It entered a non-working state.
>
> So now I "just" have to edit some config files, right?

That is correct but I found that most how tos for NUT were lacking some of the
details.  I found the NUT manual at
https://networkupstools.org/docs/user-manual.chunked/index.html.  I found I
needed to go through the entire chapter 6 of that manual to get things set up
correctly.  The end of chapter 6 describes how to set up multiple UPS
configurations.


> With regard to another post in this thread:
> I have set up my UPS system such that all of these items (and a few more) are on
> UPS power:
> - Incoming fiber interface to the Internet
> - Main ASUS RT-AC86U router
> - My two Netgear network switches
> - Synology NAS
> - Ubuntu Server (the target of my concerns)
> - IP phone interface box
>
> This seems to cover "everything" in case of a power outage so that my internal
> network will continue operating with internal and Internet connection (assuming
> the fiber provider's system is still on power).

--
Robert Blair


Giving money and power to government is like giving whiskey and car keys to teenage boys.  -- P.J. O'Rourke, Civil Libertarian

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
12