NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
dbott67
Mar 03, 2008Guide
Using the ReadyNAS to create a Network UPS for PCs
The ReadyNAS can issue "UPS commands" to other devices, effectively allowing your UPS to be networked and shutdown client PCs. I've got my UPS connected to the NAS and setup using the procedure below.
Basically, you need to install WinNUT on your PC.
You also need to configure your ReadyNAS to communicate with the PC:
1. Connect the UPS to the NAS via USB.
2. Login to the web interface of your NAS.
3. Click SYSTEM --> POWER.
4. Scroll down to the UPS section.
5. Check the box that says "Enable network sharing of attached UPS"
6. Enter the IP address of the PC or the subnet (i.e. 192.168.1.0/24).

7. Edit the WinNUT configuration file (typically C:\Program Files\WinNUT\upsmon.conf). In my case, my ReadyNAS uses a static IP (192.168.1.2) and my computers use DHCP on the 192.168.1.0/24 subnet). I've edited out most author comments, just leaving the values I used:
Here's a couple of screenshots from my PC when the UPS gets disconnected:


Read this thread for more information/background on networking a UPS device:
viewtopic.php?t=16348
-Dave
Basically, you need to install WinNUT on your PC.
You also need to configure your ReadyNAS to communicate with the PC:
1. Connect the UPS to the NAS via USB.
2. Login to the web interface of your NAS.
3. Click SYSTEM --> POWER.
4. Scroll down to the UPS section.
5. Check the box that says "Enable network sharing of attached UPS"
6. Enter the IP address of the PC or the subnet (i.e. 192.168.1.0/24).

7. Edit the WinNUT configuration file (typically C:\Program Files\WinNUT\upsmon.conf). In my case, my ReadyNAS uses a static IP (192.168.1.2) and my computers use DHCP on the 192.168.1.0/24 subnet). I've edited out most author comments, just leaving the values I used:
# --------------------------------------------------------------------------
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
MONITOR UPS@192.168.1.2 1 monuser pass slave
# --------------------------------------------------------------------------
# MINSUPPLIES <num>
MINSUPPLIES 1
# --------------------------------------------------------------------------
# NOTIFYCMD <command>
NOTIFYCMD "c:\\Program Files\\WinNUT\\alertPopup.exe"
# --------------------------------------------------------------------------
# POLLFREQ <n>
POLLFREQ 5
# --------------------------------------------------------------------------
# POLLFREQALERT <n>
POLLFREQALERT 5
# --------------------------------------------------------------------------
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
HOSTSYNC 15
# --------------------------------------------------------------------------
# DEADTIME - Interval to wait before declaring a stale ups "dead"
DEADTIME 15
# --------------------------------------------------------------------------
# NOTIFYMSG - change messages sent by upsmon when certain events occur
NOTIFYMSG ONLINE "UPS %s is getting line power"
NOTIFYMSG ONBATT "Someone pulled the plug on %s"
NOTIFYMSG LOWBATT "UPS has a low battery"
NOTIFYMSG SHUTDOWN "The system is being shutdown"
# --------------------------------------------------------------------------
# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
NOTIFYFLAG ONLINE EXEC
NOTIFYFLAG ONBATT EXEC
NOTIFYFLAG LOWBATT EXEC
NOTIFYFLAG SHUTDOWN EXEC
# --------------------------------------------------------------------------
# RBWARNTIME - replace battery warning time in seconds
RBWARNTIME 43200
# --------------------------------------------------------------------------
# NOCOMMWARNTIME - no communications warning time in seconds
NOCOMMWARNTIME 300
# --------------------------------------------------------------------------
# FINALDELAY - last sleep interval before shutting down the system
FINALDELAY 5
Here's a couple of screenshots from my PC when the UPS gets disconnected:


Read this thread for more information/background on networking a UPS device:
viewtopic.php?t=16348
-Dave
30 Replies
Replies have been turned off for this discussion
- dbott67GuideMac Users:
Update: Nov. 15, 2009 - See Infinite's post here for OSX users: viewtopic.php?f=28&t=35314&p=196117#p195952
Update: June 15, 2009 - See Egg's post here for OSX users: viewtopic.php?f=28&t=29452&p=166024#p166024
It looks like there's an OSX port of NUT:
http://boxster.ghz.cc/projects/nut/wiki/NutOnMacOSX
I took a quick read of the HOWTO above. The HOWTO explains how to setup a MASTER on OSX (which is the device that the UPS is directly connected to), as well as CLIENT machines to monitor the UPS.
For OSX users, the NAS is the MASTER and you'll just need to configure NUT as a client that points to your NAS.
Then configure the conf file to suit your network.
Linux Users:
Most distros should have NUT available through the package management software repositories. The link below provides links to some related packages:
http://www.networkupstools.org/client-projects/
-Dave - jcollinsAspirantAs a side note, I think this is only useful if you have the PC on the same UPS as the ReadyNAS. Otherwise the PC (which draws more power) will die before the ReadyNAS UPS's does.
- danzenieAspirantHello,
I don't see the option to enable network sharing of attched UPS. I am usuing Version 4.01c1-p1. Is there a step that I'm missing? - super_poussinVirtuosoJust a little Information : it will not work with duo
- tvosAspirantHello Readynas Friends..:)
I tried the example above but using my own settings of course, but I received error message
Fata Error: insufficent power configured! edit your configuration and change the values.
Here is my setup that is connected to the UPS battery backup:
Readynas NV
APC UPS 550V/330W
Asus Pent IV 2.0ghz PC
Linksys VPN Wrv200 router
My nas is 10.190.39.100 and my subnet is: 255.255.254.0
UPS Name is: UPS 1
Do I need APC powerchute on the lan pc I want to shut down or will WINUT suffice?
Here is what I have created in the .cfg file:# --------------------------------------------------------------------------
Please advise
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
MONITOR UPS 1@10.190.39.100 1 (secret username) pass (secret password)
# --------------------------------------------------------------------------
# MINSUPPLIES <num>
MINSUPPLIES 1
# --------------------------------------------------------------------------
# NOTIFYCMD <command>
NOTIFYCMD "c:\\Program Files\\WinNUT\\alertPopup.exe"
# --------------------------------------------------------------------------
# POLLFREQ <n>
POLLFREQ 5
# --------------------------------------------------------------------------
# POLLFREQALERT <n>
POLLFREQALERT 5
# --------------------------------------------------------------------------
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
HOSTSYNC 15
# --------------------------------------------------------------------------
# DEADTIME - Interval to wait before declaring a stale ups "dead"
DEADTIME 15
# --------------------------------------------------------------------------
# NOTIFYMSG - change messages sent by upsmon when certain events occur
NOTIFYMSG ONLINE "UPS %s is getting line power"
NOTIFYMSG ONBATT "Someone pulled the plug on %s"
NOTIFYMSG LOWBATT "UPS has a low battery"
NOTIFYMSG SHUTDOWN "The system is being shutdown"
# --------------------------------------------------------------------------
# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
NOTIFYFLAG ONLINE EXEC
NOTIFYFLAG ONBATT EXEC
NOTIFYFLAG LOWBATT EXEC
NOTIFYFLAG SHUTDOWN EXEC
# --------------------------------------------------------------------------
# RBWARNTIME - replace battery warning time in seconds
RBWARNTIME 43200
# --------------------------------------------------------------------------
# NOCOMMWARNTIME - no communications warning time in seconds
NOCOMMWARNTIME 300
# --------------------------------------------------------------------------
# FINALDELAY - last sleep interval before shutting down the system
FINALDELAY 5 - tvosAspirantFriends,
I changed the vaule of UPS 1 to just UPS and it now works with no errors. I guess the only true way to test and see if it works is to pull the plug and see if NAS and the PC do indeed power down safely.
In the meantime, here is my log:
Level INFO 07/07/2008 00:10:55 Detected OS as Windows XP
Level NOTICE 07/07/2008 00:10:55 Network UPS Tools upsmon 2.0.0b
Level INFO 07/07/2008 00:10:55 UPS: UPS@10.190.39.100 (slave) (power value 1)
Level INFO 07/07/2008 00:10:55 Config Load: MINSUPPLIES set to 1
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYCMD set to c:\Program Files\WinNUT\alertPopup.exe
Level INFO 07/07/2008 00:10:55 Config Load: POLLFREQ set to 5
Level INFO 07/07/2008 00:10:55 Config Load: POLLFREQALERT set to 5
Level INFO 07/07/2008 00:10:55 Config Load: HOSTSYNC set to 15
Level INFO 07/07/2008 00:10:55 Config Load: DEADTIME set to 15
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYMSG set to ONLINE : UPS %s is getting line power
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYMSG set to ONBATT : Someone pulled the plug on %s
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYMSG set to LOWBATT : UPS has a low battery
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYMSG set to SHUTDOWN : The system is being shutdown
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYFLAG set to ONLINE : EXEC
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYFLAG set to ONBATT : EXEC
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYFLAG set to LOWBATT : EXEC
Level INFO 07/07/2008 00:10:55 Config Load: NOTIFYFLAG set to SHUTDOWN : EXEC
Level INFO 07/07/2008 00:10:55 Config Load: RBWARNTIME set to 43200
Level INFO 07/07/2008 00:10:55 Config Load: NOCOMMWARNTIME set to 300
Level INFO 07/07/2008 00:10:55 Config Load: FINALDELAY set to 5
Level ALERT 07/07/2008 00:10:55 WinNUTUpsMon Service is starting to monitor UPS
Any other sugguestions will be appreciative. Does this look right?
What is the best way to test besides waiting for power to go out..:)
Thank You,
Tvos - agspoonAspirant
super-poussin wrote: Just a little Information : it will not work with duo
While it is true that the Duo GUI does not have this feature, it is still possible achieve the same capability with a little more work. The work-around requires changing some configuration files for the Nut service on the Duo. To do this you will have to have installed the SSH root login add-on, and know your way around a Linux file system.
The Nut daemon and monitor configuration files are located in /etc/nut, and can be edited to enable remote monitoring by a WinNUT client (or others). Two files need to be modified (upsd.conf and upsd.users). All disclaimers apply regarding modifications to your box as root.
First copy the original files to a safe place (don't get confused with the other similarly named config files in that directory),
mynas:~# cd /etc/nut
mynas:/etc/nut# cp upsd.conf upsd.conf.original
mynas:/etc/nut# cp upsd.users upsd.users.original
Then modify upsd.conf to allow remote access to the UPS daemon. I added the two lines that contain reference to "mynet". Note, I opened it up to the entire 192.168.1.0/24 subnet. You could be more specific if you only want to allow a single PC to access it, and that PC has a static IP address (mine uses DHCP).
mynas:/etc/nut# cat upsd.conf
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
ACL mynet 192.168.1.0/24
ACCEPT monitor localhost
ACCEPT monitor mynet
REJECT all all
Now you have to create an authenticated user by modifying the upsd.users file to add an arbitrary user ("pcuser" in my case). The "allowfrom" directive has to match the ACL you created in upsd.conf above. Note the PC is a slave since it will take direction from the Duo that is actually connected to the UPS. Strictly speaking, you could re-use the "monuser" authentication, but I preferred to create one specifically for the PC.
mynas:/etc/nut# cat upsd.users
[monuser]
password = pass
allowfrom = localhost
upsmon master
[pcuser]
password = your_pass
allowfrom = mynet
upsmon slave
Then all you have to do is tell the upsd daemon to re-read it's configuration file (or reboot the Duo).
mynas:/etc/nut# upsd -c reload
At this point, your remote client (e.g. WinNUT) should be able to contact the Duo and read the status of the UPS. Note, you have to configure the PC client with the same user ("pcuser") and password ("your_pass") that you configured here. For the WinNUT client it would look like this (assuming your Duo is at 192.168.1.2),
MONITOR UPS@192.168.1.2 1 pcuser your_pass slave
I'm not sure why Netgear chose to leave this capability out of the Duo GUI (probably a marketing decision), but I can report that it works well for me after a little hacking.
Safe computing :)
Craig - snahlGuideHi 'dbott67'
thanks for your instructions.
Somehow I am not getting this quite right.
I installed WinNut and configured it pretty much according to your suggestion. Though some questions remained to me.
The file: upsmon.conf
- the parameters <username> <password> mean to enter the same credentials as used in FrontView, correct?
- The parameter <powervalue> corresponds to the IP-Address of the NAS, correct?
In the WinNut ConfigTool:
-The default port-number for the Upsd is 3493. Does that remain unchanged?
-Where is it set in Windows?
-Is that port open to Firewalls within the local Network? (normally yes).
-Presumably WinNut should certainly be installed as service, correct?
In Frontview:
- The field 'Hosts allowed access' contains a sinlge client or a network IP-address, correct?
- What means the '/24' in your example? (presumably some IP-address syntax in octets)
- Setting the low threshold for shutdown to say 20% would allow enough (power)-time to properly shutdown attached PCs. What is your experience. Or is it better to set those values in upsmon.conf?
General:
How can one verify that the UPS and the Clients are communicating appart from the network activity in the systems tray? My LogFile doesn't show anything and notifications set in the upsmon.conf are not visible to me.
Apparently the UPS becomes networked by means of WinNut, but where would I assign its IP-address?
I am bit puzzled on this.
I've got the following set up:
2 Ready-NAS, a X6 and a NV+ both on release 4.00c1-p2 with IP-adr: 192.168.1.41 and 42
3 Client PC's Windows XP sp3 (192.168.1.34 , 36 , 38)
1 UPS with 1 serial and 1 USB port. But only 1 of the 2 ports can be used. If the USB-port is activated once the serial port gets deactivated automatically (and remains deactivated).
How do I get this to work properly and how can I test it without pulling the plug (though I will do so later in order to adjust the timing paramters, but only after verifying proper functionality).
Also I did read the thread 16348 about obtaining 'information/background on networking a UPS device. Sorry to say, but that did not increase my understanding.
You seem to be the person to assist in getting this going properly.
Your feedback and advice is highly appreciated.
Thank you for your attention.
Hans. - dbott67GuideHi Hans,
I've tried to answer your questions as best I can. I've also taken the liberty of modifying my config file that you should be able to copy & paste into each client PC. The only assumption I've made is that the IP of the NV+ is 192.168.1.42. If it's different, you'll need to modify the IP address in the config file.snahl wrote: The file: upsmon.conf
- the parameters <username> <password> mean to enter the same credentials as used in FrontView, correct?
- The parameter <powervalue> corresponds to the IP-Address of the NAS, correct?
The username & password should be monuser & pass:MONITOR UPS@ip.address.of.nas 1 monuser pass slave
The powervalue is normally set to 1:# <powervalue> is an integer - the number of power supplies that this UPS
# feeds on this system. Most computers only have one power supply, so this
# is normally set to 1. You need a pretty big or special box to have any
# other value here.snahl wrote: In the WinNut ConfigTool:
-The default port-number for the Upsd is 3493. Does that remain unchanged?
-Where is it set in Windows?
-Is that port open to Firewalls within the local Network? (normally yes).
-Presumably WinNut should certainly be installed as service, correct?
Yes... just leave it at the default. Within the WinNUT program, there is an option to edit the configuration file (C:\Program Files\WinNUT\upsmon.conf). The file is well documented/commented by the programmers and provides information on how to change the port, if desired.snahl wrote: In Frontview:
- The field 'Hosts allowed access' contains a sinlge client or a network IP-address, correct?
- What means the '/24' in your example? (presumably some IP-address syntax in octets)
You can either enter a single IP address or the entire subnet. In my case, I wanted to allow any device on my network to access the UPS, so I specified the entire subnet (192.168.1.0/24).
Whenever you specify a network using the convention 192.168.1.0/24 it means that the first 24 bits of the address (aka the first 3 octets or 192.168.1) are the 'network' portion, and the last 8 bits (or last octet) is the host. This is typically referred to as CIDR (classless inter-domain routing). So, the using 192.168.1.0/24 basically means *any* valid IP address from 192.168.1.1 through 192.168.1.254.snahl wrote: Setting the low threshold for shutdown to say 20% would allow enough (power)-time to properly shutdown attached PCs. What is your experience. Or is it better to set those values in upsmon.conf?
Limited experience here. The values to shut down the PC would need to be set in C:\Program Files\WinNUT\upsmon.conf if you want it to shutdown at a specific percentage.snahl wrote: General:
How can one verify that the UPS and the Clients are communicating appart from the network activity in the systems tray? My LogFile doesn't show anything and notifications set in the upsmon.conf are not visible to me.
Apparently the UPS becomes networked by means of WinNut, but where would I assign its IP-address?
Well. if you follow my recommendations below, just unplugging the network cable on the NV+ should cause the X6 and each PC to start popping up messages.snahl wrote: I am bit puzzled on this.
I've got the following set up:
2 Ready-NAS, a X6 and a NV+ both on release 4.00c1-p2 with IP-adr: 192.168.1.41 and 42
3 Client PC's Windows XP sp3 (192.168.1.34 , 36 , 38)
1 UPS with 1 serial and 1 USB port. But only 1 of the 2 ports can be used. If the USB-port is activated once the serial port gets deactivated automatically (and remains deactivated).
How do I get this to work properly and how can I test it without pulling the plug (though I will do so later in order to adjust the timing paramters, but only after verifying proper functionality).
Also I did read the thread 16348 about obtaining 'information/background on networking a UPS device. Sorry to say, but that did not increase my understanding.
You seem to be the person to assist in getting this going properly.
Your feedback and advice is highly appreciated.
Thank you for your attention.
Hans.
My recommendations:
1. Plug the UPS into the NV+ via USB.
2. In Frontview on the NV+, go to SYSTEM > POWER and enable network sharing.
3. Enter the following in the "Hosts allowed access":192.168.1.0/24
4. On the X6, open Frontview and go to SYSTEM > POWER and in the Enable monitoring of UPS physically attached to a remote ReadyNAS enter the IP address of your NV+. You should get a message that says:Successfully connected to remote UPS
5. On each PC, copy the code below into the configuration file. I've modified my configuration file to reflect that the NAS is located at 192.168.1.42.# Network UPS Tools: example upsmon configuration
#
# This file contains passwords, so keep it secure.
############################################################################
# WinNUT Users
#===============
# I've tried to remove most of the configuration options that don't apply
# when running under windows. Other than those options, the file is the
# same as unix file. And if you have the extra options in this file, it
# shouldn't really cause any problems
#
#
# --------------------------------------------------------------------------
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
#
# List systems you want to monitor. Not all of these may supply power
# to the system running upsmon, but if you want to watch it, it has to
# be in this section.
#
# You must have at least one of these declared.
#
# <system> is a UPS identifier in the form <upsname>@<hostname>[:<port>]
# like localhost, su700@mybox, etc.
#
# Examples:
#
# - "su700@mybox" means a UPS called "su700" on a system called "mybox"
#
# - "fenton@bigbox:5678" is a UPS called "fenton" on a system called
# "bigbox" which runs upsd on port "5678".
#
# The UPS names like "su700" and "fenton" are set in your ups.conf
# in [brackets] which identify a section for a particular driver.
#
# If the ups.conf on host "doghouse" has a section called "snoopy", the
# identifier for it would be "snoopy@doghouse".
#
# <powervalue> is an integer - the number of power supplies that this UPS
# feeds on this system. Most computers only have one power supply, so this
# is normally set to 1. You need a pretty big or special box to have any
# other value here.
#
# You can also set this to 0 for a system that doesn't supply any power,
# but you still want to monitor. Use this when you want to hear about
# changes for a given UPS without shutting down when it goes critical,
# unless <powervalue> is 0.
#
# <username> and <password> must match an entry in that system's
# upsd.users. If your username is "monmaster" and your password is
# "blah", the upsd.users would look like this:
#
# [monmaster]
# password = blah
# allowfrom = (whatever applies to this host)
# upsmon master (or slave)
#
# "master" means this system will shutdown last, allowing the slaves
# time to shutdown first.
#
# "slave" means this system shuts down immediately when power goes critical.
# WinNUT users: WinNUT should always be a slave since we're not the machine
# talking directly to the ups
#
# Examples:
#
# MONITOR myups@bigserver 1 monmaster blah master
# MONITOR su700@server.example.com 1 upsmon secretpass slave
MONITOR UPS@192.168.1.42 1 monuser pass slave
# --------------------------------------------------------------------------
# MINSUPPLIES <num>
#
# Give the number of power supplies that must be receiving power to keep
# this system running. Most systems have one power supply, so you would
# put "1" in this field.
#
# Large/expensive server type systems usually have more, and can run with
# a few missing. The HP NetServer LH4 can run with 2 out of 4, for example,
# so you'd set that to 2. The idea is to keep the box running as long
# as possible, right?
#
# Obviously you have to put the redundant supplies on different UPS circuits
# for this to make sense! See big-servers.txt in the docs subdirectory
# for more information and ideas on how to use this feature.
MINSUPPLIES 1
# --------------------------------------------------------------------------
# NOTIFYCMD <command>
#
# upsmon calls this to send messages when things happen
#
# This command is called with the full text of the message as one argument.
# The environment string NOTIFYTYPE will contain the type string of
# whatever caused this event to happen.
#
# Note that this is only called for NOTIFY events that have EXEC set with
# NOTIFYFLAG. See NOTIFYFLAG below for more details.
#
# Making this some sort of shell script might not be a bad idea. For more
# information and ideas, see pager.txt in the docs directory.
#
# Example:
# NOTIFYCMD /usr/local/ups/bin/notifyme
# WinNUT users: use the alertPopup.exe found in WinNUT binary distribution
# IMPORTANT NOTE!!!! Backslashes are now escape characters, you must
# now use \\ in the path to get a backslash char.
# Windows Example:
NOTIFYCMD "c:\\Program Files\\WinNUT\\alertPopup.exe"
# --------------------------------------------------------------------------
# POLLFREQ <n>
#
# Polling frequency for normal activities, measured in seconds.
#
# Adjust this to keep upsmon from flooding your network, but don't make
# it too high or it may miss certain short-lived power events.
POLLFREQ 5
# --------------------------------------------------------------------------
# POLLFREQALERT <n>
#
# Polling frequency in seconds while UPS on battery.
#
# You can make this number lower than POLLFREQ, which will make updates
# faster when any UPS is running on battery. This is a good way to tune
# network load if you have a lot of these things running.
#
# The default is 5 seconds for both this and POLLFREQ.
POLLFREQALERT 5
# --------------------------------------------------------------------------
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
#
# The master upsmon process uses this number when waiting for slaves to
# disconnect once it has set the forced shutdown (FSD) flag. If they
# don't disconnect after this many seconds, it goes on without them.
#
# Similarly, upsmon slave processes wait up to this interval for the
# master upsmon to set FSD when a UPS they are monitoring goes critical -
# that is, on battery and low battery. If the master doesn't do its job,
# the slaves will shut down anyway to avoid damage to the file systems.
#
# This "wait for FSD" is done to avoid races where the status changes
# to critical and back between polls by the master.
HOSTSYNC 15
# --------------------------------------------------------------------------
# DEADTIME - Interval to wait before declaring a stale ups "dead"
#
# upsmon requires a UPS to provide status information every few seconds
# (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status
# fetch fails, the UPS is marked stale. If it stays stale for more than
# DEADTIME seconds, the UPS is marked dead.
#
# A dead UPS that was last known to be on battery is assumed to have gone
# to a low battery condition. This may force a shutdown if it is providing
# a critical amount of power to your system.
#
# Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT.
# Otherwise you'll have "dead" UPSes simply because upsmon isn't polling
# them quickly enough. Rule of thumb: take the larger of the two
# POLLFREQ values, and multiply by 3.
DEADTIME 15
# --------------------------------------------------------------------------
# NOTIFYMSG - change messages sent by upsmon when certain events occur
#
# You can change the stock messages to something else if you like.
#
# NOTIFYMSG <notify type> "message"
#
# NOTIFYMSG ONLINE "UPS %s is getting line power"
# NOTIFYMSG ONBATT "Someone pulled the plug on %s"
#
# Note that %s is replaced with the identifier of the UPS in question.
#
# Possible values for <notify type>:
#
# ONLINE : UPS is back online
# ONBATT : UPS is on battery
# LOWBATT : UPS has a low battery (if also on battery, it's "critical")
# FSD : UPS is being shutdown by the master (FSD = "Forced Shutdown")
# COMMOK : Communications established with the UPS
# COMMBAD : Communications lost to the UPS
# SHUTDOWN : The system is being shutdown
# REPLBATT : The UPS battery is bad and needs to be replaced
# NOCOMM : A UPS is unavailable (can't be contacted for monitoring)
NOTIFYMSG ONLINE "UPS %s is getting line power"
NOTIFYMSG ONBATT "Someone pulled the plug on %s"
NOTIFYMSG LOWBATT "UPS has a low battery"
NOTIFYMSG SHUTDOWN "The system is being shutdown"
# --------------------------------------------------------------------------
# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
#
# By default, upsmon sends walls (global messages to all logged in users)
# and writes to the syslog when things happen. You can change this.
#
# NOTIFYFLAG <notify type> <flag>[+<flag>][+<flag>] ...
#
# NOTIFYFLAG ONLINE SYSLOG
# NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
#
# Possible values for the flags:
#
# SYSLOG - Write the message in the syslog
# WALL - Write the message to all users on the system
# EXEC - Execute NOTIFYCMD (see above) with the message
# IGNORE - Don't do anything
#
# If you use IGNORE, don't use any other flags on the same line.
NOTIFYFLAG ONLINE EXEC
NOTIFYFLAG ONBATT EXEC
NOTIFYFLAG LOWBATT EXEC
NOTIFYFLAG SHUTDOWN EXEC
# --------------------------------------------------------------------------
# RBWARNTIME - replace battery warning time in seconds
#
# upsmon will normally warn you about a battery that needs to be replaced
# every 43200 seconds, which is 12 hours. It does this by triggering a
# NOTIFY_REPLBATT which is then handled by the usual notify structure
# you've defined above.
#
# If this number is not to your liking, override it here.
RBWARNTIME 43200
# --------------------------------------------------------------------------
# NOCOMMWARNTIME - no communications warning time in seconds
#
# upsmon will let you know through the usual notify system if it can't
# talk to any of the UPS entries that are defined in this file. It will
# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you
# change the interval with this directive.
NOCOMMWARNTIME 300
# --------------------------------------------------------------------------
# FINALDELAY - last sleep interval before shutting down the system
#
# On a master, upsmon will wait this long after sending the NOTIFY_SHUTDOWN
# before executing your SHUTDOWNCMD. If you need to do something in between
# those events, increase this number. Remember, at this point your UPS is
# almost depleted, so don't make this too high.
#
# Alternatively, you can set this very low so you don't wait around when
# it's time to shut down. Some UPSes don't give much warning for low
# battery and will require a value of 0 here for a safe shutdown.
#
# Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master,
# the master will give up waiting for the slave to disconnect.
#
### WinNUT users - this was previously the ALERTTIME variable
#
FINALDELAY 5
Hope this helps.
-Dave - tvosAspirantthanx dude... the nas has been on ups power using winnut for the last couple months successful! - works beautifully...
just need to know how and why i am getting duplicate backkup job logs.
tvos
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!