[CentOS] using NUT on centos 5
Pat and Lori Boyer
pboyer at gmail.com
Fri Sep 17 10:01:47 EDT 2010
I have NUT configured on a few of my CentOS servers. I compiled and
installed from source (2.4.3), so all of my nut-related files sit under
/usr/local/ups. I am using a Liebert UPS. Here's how I have it working:
Connect a serial cable from your server to the UPS (if available; USB is an
option on some models, I think). The nut software can communicate with the
UPS via serial on a ttyS (mine is /dev/ttyS0). This server (directly
attached) must run upsd. Other servers that use the same UPS can communicate
with upsd running on the first server via upsmon. All servers must run
upsmon (this is what actually monitors the UPS).
Configure ups.conf with information about your UPS (mine is liebert). The
nut docs have a list of supported hardware and the drivers that you use for
them (I use the driver 'liebert'):
driver = liebert
port = /dev/ttyS0
At least one server attached to each UPS must run upsd. Here's my upsd.conf
(comments removed). Note that the second line uses the IP address of the LAN
interface on your server, so that other machines on the same subnet can
communicate with upsd:
LISTEN 127.0.0.1 3493
LISTEN 172.21.97.1 3493
You have to configure upsd.users to allow access to certain users (one for
each upsmon process that will communicate with upsd). This information will
be used to configure upsmon on the clients. For example, I have two servers
listed here: the local server (server1) and another server attached to the
same UPS (server2):
password = server1-ups-pass
password = server2-ups-pass
Configure upsmon.conf on each client. Based on the example above, here's the
upsmon.conf for server1:
MONITOR liebert at localhost 1 server1-ups server1-ups-pass master
... and the upsmon.conf for server2:
MONITOR liebert at server1 1 server2-ups server2-ups-pass master
Once you have ups.conf, upsd.conf, upsd.users, and upsmon.conf configured,
you can test you connections like the following:
[root at server1 ~]# /usr/local/ups/bin/upsc liebert at localhost
ups.status: OL LB
[root at server2 ~]# /usr/local/ups/bin/upsc liebert at server1
ups.status: OL LB
Don't forget to add the nut software to your startup scripts and appropriate
runlevels. Hope this helps.
On Tue, Sep 14, 2010 at 11:18 AM, fred smith
<fredex at fcshome.stoneham.ma.us>wrote:
> Trying to set up NUT on Centos 5 to monitor a CyberPower 1500AVR UPS.
> There seem to be many documents, all of which seem to be not fully
> with each other, and most of them aren't up to date.
> I'm guessing I should be using udev rather than hal, but I'm somewhat
> stumped on how to figure out what device it should be monitoring. there
> are a bunch of udev rules installed (in
> but it's not at all clear to me what, if anything, I'm supposed to do with
> them, or how I cause udev to see them there and do its thing.
> there's a document at
> but it doesn't show how to do it with a USB device, only serial.
> so I decided to move on and see if it could be made to work without
> that understanding, using whatever I could figure out using the INSTALL
> file that comes with NUT.
> And that isn't geting me anywhere, so far.
> If anyone out there has had success at setting up NUT on Centos 5 (or RHEL)
> and can offer any advice, I'd appreciate hearing from you.
> Thanks in advance!
> ---- Fred Smith -- fredex at fcshome.stoneham.ma.us-----------------------------
> "For him who is able to keep you from falling and to present you before
> glorious presence without fault and with great joy--
> to the only God our Savior be glory, majesty, power and authority,
> through Jesus Christ our Lord, before all ages, now and forevermore!
> ----------------------------- Jude 1:24,25 (niv)
> CentOS mailing list
> CentOS at centos.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentOS