How to share UPS Data by other computers?

I have freePBX setup with a data cable to the an APC UPS. The link to the Freenas works perfectly. Now I would like to be able to allow the other rack servers to be able to know information about the UPS. The objective is to also allow them to safely power down (i.e. shutdown) in the event that juice imminently runs out.

Is there a way share this info with the other servers? The other servers are running FreeNAS and XenServer (XCP-ng flavor)

NUT allows to share the UPS status.

1 Like

If you decide to go this way, I’d recommend submitting a ticket when you’re done explaining how you did it and what it did for you. Making life better for other people is kind of how we roll here.

Does anyone know if FreePBX has a feature that allows its UPS software to run in “slave” mode? The reason is that FreePBX UPS software doesn’t have this (I think) but FreeNAS does. FreeNAS has NUT built-in. Thus, it would be far easier to implement on FreeNAS then activate FreeNAS as a slave.

Not until you’re done.

It’s an open-source system. Set it up and get it working, then let @lgaetz know what it took. You might get credit for adding a cool feature. They’ll probably want you to sign a code release agreement (they are a company after all), but if all you did was throw it on and make it happen, you should be oK to go.

@cynjut I supposed I won’t get much help in this tough crowd.

It’s not so much - none of us need that particular solution. The system comes with apcupsd and most of the people that are using a UPS to manage their phone server use that. Adding another feature is pretty simple - the only thing that would be the least bit challenging is getting Asterisk/FreePBX to shutdown clean before you run out of power.

It isn’t hard to do - I think I set up NUT on one of my servers (PIAF, IIRC) several years ago, and it was installing the software and setting up the config to execute “amport shutdown”. The instructions for that installation (if it’s even around) were about that hard. It’s CentOS under the hood, and this is really largely unrelated to the actual operation of FreePBX.

Try it - if you have problems, ask. We’re here to help you if you have specific questions.

I can help you with NUT configuration, but it will have to be done manually, it can’t be done with the GUI.

1 Like

contains a script (install-nut) that will install and configure NUT as a server or client.


Network UPS Tools (NUT) is a package for monitoring an Uninterruptible Power Supply (UPS)
and performing an orderly shutdown of one or more computers should the UPS battery
approach depletion during a power outage.

NUT can be installed as a Server or a Client.
A NUT Server is used on the computer to which the UPS is connected via USB.
A NUT Client is used on a computer connected to the same network as the NUT Server.

install-nut will install and configure NUT on either a Server or Client computer running Linux.
During installation, you must supply a Server password. For Client installations,
you must also provide the IP address of the NUT Server computer.
Two scripts will be created in /root: ups-info and ups-ctrl.

ups-info will display information about the UPS:

[email protected]:~# ./ups-info

UPS model number: CP1350PFCLCD

Input power source: AC Power Line

Estimated run time: 102 minutes

Battery charged to: 100 percent

ups-ctrl allows commands to be sent to the UPS:

[email protected]:~# ./ups-ctrl

a) Alarm Mute
b) Alarm Enable
c) Alarm Disable
d) Battery Test Start
e) Battery Test Stop
f) Battery Test Auto
UPS Command?

remove-nut will completely remove NUT and all of its configuration files.

Additional information can be found at:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.