This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to shutdown UTM 9 when UPS power is low?

Hi folks,

just a few days ago I upgraded my ASG 8.3.07 for Sophos UTM 9.004-33. I'm using a "home license" on my own hardware with 5 NICs and all things are working fine so far and over years now [:)] Thank you, Astaro!

I'm running a few linux servers with debian squeeze. One of them is directly connected by USB to an APC BACK-UPS RS 1500. On all debian machines the APCUPSD is installed. On the machine directly connected to the UPS by USB in "Master" mode and on the other ones in "Slave" mode.The slaves are polling the master on port 3551/TCP every n seconds to keep informed about power failures and getting shutdown signals if required.

Now I'd like to keep my UTM 9 machine informed about current power status and get shut down signals on power failure also. Not just hard "switched off" like tracking the power plug when UPS is empty.

Well, actually I'm able to install the apcupsd in slave mode on my UTM 9 machine and let it poll the master. But, is this the right way? I.e. just installing my own software on a system running a firewall? I think that's no good idea ;-)

So my question is: Is there is any "build in" or "default" methode in UTM 9 to shut down the device over ethernet when power in UPS is running down?

Many thanks in advance and greetinx

Guido


This thread was automatically locked due to age.
  • Hi,
    Astaro has a UPS system, but it requires a USB connection to the UPS.

    If you can get NUT or apcupsd running on Astaro, please post a how-to.

    An alternative would be to have one of the other servers send a shutdown command to Astaro via SSH.

    Barry
  • Hi Barry,

    thanks a lot for your reply which leads me to the right way.

    I think  I'll turn the tables and make my UTM 9 the master using NUT. Because a NUT daemon seems to be built-in. Have a look here.

    Anyway, NUT seems to be derived or develop starting from the same code base and by the same authors of APC Smart-UPS protocol respectively apcupsd, see here.

    On the NUT docs page there can be found some interesting articles dealing with using NUT in a cluster and Monitoring UPS with NUT on debian.

    Based on these two articles I'll try to connect my APC UPS by USB to my UTM 9 running it as master and set up my debian machines running as slaves.

    Another way would be to keep my current debian UPS "master" machine but switching it's daemon from apcupsd to nutd and run my other debian maschines and the UTM 9 as NUT slaves.

    As you suggested by you, Barry,  I'll come back to this topic later when it's up and running and will post my experiences, i.e. a how-to.

    Anyway, a solution for this issue seems to be needed / wanted by several people. Have a look here.

    Greetinx 

    Guido
  • OK, Good.

    Don't forget you'll need to create packetfilter rules for the Firewall to be able to make NUT connections (inbound and outbound) FROM the LAN interfaces.

    Barry
  • This is for NUT running on UTM 9.
    I have tried adding the snmp-ups driver and have it query several APCs with "Network Management Card" and "Network Management Card 2" - It runs OK in the background, but no front end and no battery level is visible in UTM GUI. Though I am receiving INFO-051 Notifys from the UTM when stopping the driver saying: "UPS device disconnected -A UPS device was disconnected from the USB port." so I assume it is working. 

    For 9.103-5 which I assume is a SLES 11 SP3 or OpenSuse 10.2 you need to get the following modules (from the internet using wget on your UTM SSH)

    net-snmp54-5.4-10.1.i586.rpm 
    neon-0.28.4-3.1.i586.rpm 
    libneon27-0.28.4-3.1.i586.rpm 
    libopenssl0_9_8-0.9.8m-3.3.2.i586.rpm
    nut-drivers-net-2.6.2-31.1.i586.rpm 

    rpm -i these and edit /etc/ups/ups.conf

    comment out section [ups] and create a new entry like this one: 
    [ups] 
    driver = snmp-ups 
    port = 192.168.101.71 
    community = public 
    snmp_version = v1 
    mibs = apcc 
    pollfreq = 15 
    desc = "UPS"

    You can test the connection by invoking: 
    /usr/lib/ups/driver/snmp-ups -a ups 
    Make sure you make a Firewall Exception to allow outbound SNMP Traffic

    If it works invoke /usr/lib/ups/driver/upsdrvctl start 
    and run upsd and upsmon

    Next you can check your UPS via upsc ups@localhost 
    Also good to check you system log: tail -f /var/log/system.log

    Hopefully Sophos will implement this querying a remote UPS using nut-drivers-net in their "standard" and provide a configuration gui, and make battery levels visible in the frontend, and maybe customize the notify mails you get since it is not connected via USB.
  • Thanks!

    Please vote for the feature request for this too:
    Add UI support for NUT, so astaro can monitor a non attached UPS

    This is a duplicate of other feature requests which have more votes, but I cannot find them atm as searching for 'ups' brings up nothing for some reason.

    Barry
  • We've been asking for support for networked UPS signalling for over four years now, and I'm starting to despair that we'll ever see it come to fruition.

    I still can't believe that a product that can reasonably be expected to be installed in a server room requires its own dedicated USB-connected UPS.

    http://feature.astaro.com/forums/17359-utm-formerly-asg-feature-requests/suggestions/181268-management-enable-ups-sharing