# UPS to monitor
MONITOR bessie@localhost 1 upsmon really_long_hard_to_guess_random_password  master

# this computer requires only 1 power supply
MINSUPPLIES 1

# notify about Replace Battery every 11 hours, so it walks around the clock
RBWARNTIME	39600

# notify about lost communications once an hour, not every few minutes
NOCOMMWARNTIME	3600

# what to do for low battery shutdown
# we're going with suspend-to-disk
# Due to early shutdown by upssched and upsevent, this will not come into
# play unless noearly has been triggered.
#SHUTDOWNCMD "/sbin/shutdown -h now 'Power failure and low battery - upsmon' "
SHUTDOWNCMD "/usr/sbin/s2disk"

# static message strings, with variable at end
NOTIFYMSG ONLINE	"UPS running on normal power: %s"
NOTIFYMSG ONBATT	"UPS running on battery power: %s"
NOTIFYMSG LOWBATT	"UPS battery low: %s"
NOTIFYMSG SHUTDOWN	"Shutting down system per UPS monitor"
NOTIFYMSG FSD		"Turning off UPS output power (force shutdown): %s"
NOTIFYMSG COMMOK	"UPS communications established: %s"
NOTIFYMSG COMMBAD	"UPS communications lost: %s"
NOTIFYMSG NOCOMM	"UPS communications trouble: %s"
NOTIFYMSG REPLBATT	"UPS battery trouble: %s"
NOTIFYMSG NOPARENT	"upsmon parent process died"

# command to exec for EXEC notify flag
NOTIFYCMD /sbin/upssched

# what to do for the various events
# no WALL for routine transitions to/from battery
# if the on-battery lasts we'll fire from a script timer
NOTIFYFLAG ONLINE	SYSLOG+EXEC
NOTIFYFLAG ONBATT	SYSLOG+EXEC
# no WALL for lowbatt since it keeps false-positive'ing on that
NOTIFYFLAG LOWBATT	SYSLOG+EXEC
# yell and scream about unusual events
NOTIFYFLAG COMMOK	SYSLOG+WALL+EXEC
NOTIFYFLAG COMMBAD	SYSLOG+WALL+EXEC
NOTIFYFLAG NOCOMM	SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT	SYSLOG+WALL+EXEC
# no EXEC for this since we don't do anything with it in the script
NOTIFYFLAG NOPARENT	SYSLOG+WALL
# no EXEC for shutdowns since we'll be killing things off anyway
NOTIFYFLAG SHUTDOWN	SYSLOG+WALL
NOTIFYFLAG FSD		SYSLOG+WALL

# EOF upsmon.conf
