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.
Parents
  • 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.
Reply
  • 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.
Children
No Data