~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to man/upsmon.conf.5

  • Committer: Chuck Short
  • Date: 2013-05-13 12:57:25 UTC
  • Revision ID: zulcss@ubuntu.com-20130513125725-llq8wsohyhq9idsy
* Merge from Debian.  Remaining changes:
  - debian/control:
    + remove Build-Depends on libpowerman0-dev
    + remove nut-powerman-pdu
  - debian/nut-powerman-pdu.{install,manpages}: dropped for now
  - debian/{nut-cgi,nut-server}.postinst: add nut to the dialout and nut
    groups unconditonally to handle the upgrade from hardy release.
  - debian/source_nut.py, debian/{nut,nut-server,nut-client}.install,
    debian/rules: Install apport hooks for all top-level nut packages.
  - debian/rules: Use udev version for Ubuntu
  - debian/series, debian/patches/backport-fix-lp753661.patch: re-enabled
* Non-maintainer upload with fixes for wheezy.
* debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done
  by postinst during upgrade from lenny to squeeze (Really closes: #677054)
  Thanks to Andreas Beckmann for the review.
* Merge from Debian.  Remaining changes:
  - debian/control:
    + remove Build-Depends on libpowerman0-dev
    + remove nut-powerman-pdu
  - debian/nut-powerman-pdu.{install,manpages}: dropped for now
  - debian/{nut-cgi,nut-server}.postinst: add nut to the dialout and nut
    groups unconditonally to handle the upgrade from hardy release.
  - debian/source_nut.py, debian/{nut,nut-server,nut-client}.install,
    debian/rules: Install apport hooks for all top-level nut packages.
  - debian/rules: Use udev version for Ubuntu
  - debian/series, debian/patches/backport-fix-lp753661.patch: re-enabled
* Dropped the following patches, no longer required:
  - debian/patches/CVE-2012-2944.patch (included upstream)
* Non-maintainer upload with fixes for wheezy.
* Only remove /etc/init.d/nut from previous versions of nut in nut-server
  postinst if there are no local changes.
* Also remove /etc/init.d/nut in nut-client postinst. Thanks to 
  Laurent Bigonville for the hint.
* Only fix permissions of configfiles on first install.
* debian/control: Fix typo in package description. Thanks to Julien Cristau
  for spotting this.
* Non-maintainer upload.
* debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older
  versions of the postinst (Closes: #677054)
* debian/rules: Stop the nut-client before nut-server on systems using
  static
  boot ordering (Closes: #679451)
* debian/nut-server.postinst: Remove /etc/init.d/nut on upgrade
  (Closes: #677822)
* Rename nut-server.lintian-overrides to nut-client.lintian-overrides and
  adjust overrides now that ups-monitor is shipped in nut-client package
  (Closes: #677947)
* Add debian/patches/0001-fix-upsmon-regression.patch: Fix upsmon/upssched
  regression (Taken from upstream) (Closes: #679513)
* Move nut metapackage to Section: metapackages
* Also create nut user when installing nut-client package and do not delete
  it on purge anymore (Closes: #682000)
* Drop /etc/default/nut → /etc/nut/nut.conf migration code, migration
  happends before squeeze release and this was against policy to have a
  maintainer script modifying a conffile in the first place (Closes: #684392)
* Add dependency against adduser and lsb-base on nut-client package
* Be sure that client is stopped before the server also when using
  dependencies based boot
* Fix package descriptions (Closes: #678068)
* Also install /bin/upssched-cmd in nut-client package as this script is
  referenced in default upssched.conf config file
* debian/watch: Update watch file
* Be sure that all maintainer scripts are returning 0 at their end
* New upstream release (Closes: #671444)
* acknowledges NMU (Closes: #613643)
* debian/nut-client.init: fix action "start" and use of log_*_*msg
  LSB log functions (Closes: #675619)
* debian/nut-server.preinst: remove obsolete file(s) left in
  /etc/udev/rules.d and related processing: udev files are now located
  in /lib/udev/rules, and there is no reason to modify the dedicated
  USB UPS rules (52-nut-usbups.rules) (Closes: #660072)
* debian/nut-server.init: rewrite to match upsd / drivers startup scope
* debian/nut-client.init: created to match upsmon startup scope
  (Closes: #634858)
* debian/nut.TODO.Debian, debian/Makefile.am: updated to reflect the above
* debian/rules: install nut-client.init, and update to reflect the above
* debian/control, debian/Makefile.am: updated to reflect the above
* debian/control:
  - add Breaks on nut-server (<< 2.6.3-1~)
  - bump Standards-Version to 3.9.3
* debian/nut-client.links: renamed from debian/nut-server.links, since
  ups-monitor is now provided by nut-client initscript
* debian/nut.README.Debian: renamed from nut-server.README.Debian,
  to provide it with both client and server packages
* debian/nut-server.install: add missing drivers (clone-outlet,
  liebert-esp2 and microdowell)
* debian/nut-server.manpages: add missing manual pages (apcsmart-old,
  ivtscd, liebert-esp2 and microdowell)
* SECURITY UPDATE: remote denial of service
 - debian/CVE-2012-2944.patch: limit the set of parsed characters to ' '
   through '~'
 - CVE-2012-2944
* Merge from Debian testing.  Remaining changes:
  - debian/control: Drop Build-Depends on libpowerman0-dev (currently in 
    universe)
  - debian/{nut-cgi,nut-server}.postinst: add nut to the dialout and nut 
    groups unconditonally to handle the upgrade from hardy release.
  - debian/nut-powerman-pdu.{install,manpages}: dropped for now.
  - debian/source_nut.py, debian/{nut,nut-server,nut-client}.install, 
    debian/rules: Install apport hooks for all top-level nut packages.
  - debian/rules: Use udev version for Ubuntu.
  - debian/series, debian/patches/backport-fix-lp753661.patch: re-enabled.
* New upstream release (Closes: #635186, #598741, #633756, #638221)
* debian/nut-server.{install,manpages}: add richcomm_usb
* debian/nut-server.install, debian/rules: install Avahi service file
* debian/rules, nut-client.install: install Augeas lenses
* debian/nut-server.README.Debian: clarify udev explanation (Closes: #529664)
* debian/patches/0001-fix_spelling_and_typo.patch,
  debian/patches/0003-libupsclient-version.patch: removed since these are now
  fixed upstream
* debian/patches/series: updated
* Merge from debian unstable.  Remaining changes:
  - debian/control: Drop Build-Depends on libpowerman0-dev (currently in 
    universe)
  - debian/{nut-cgi,nut-server}.postinst: add nut to the dialout and nut 
    groups unconditonally to handle the upgrade from hardy release.
  - debian/nut-powerman-pdu.{install,manpages}: dropped for now.
  - debian/source_nut.py, debian/{nut,nut-server,nut-client}.install, 
    debian/rules: Install apport hooks for all top-level nut packages.
  - debian/rules: Use udev version for Ubuntu.
  - debian/series, debian/patches/backport-fix-lp753661.patch: re-enabled.
* New upstream release (Closes: #594989)
* debian/control:
  - remove legacy Build-Depends for nut-hal-drivers on libdbus and libglib
  - Build-Depends-Indep on docbook-xsl for offline document
    generation (Closes: #635347)
* debian/nut-server.install: add apcsmart-old
* debian/nut-server.init:
  - add udev as Required-Start/Stop (Closes: #642412)
  - remove legacy support for /etc/default/nut (Closes: #638021)
* debian/patches/0003-libupsclient-version.patch: added to fix the missing
  libupsclient version info bump
* debian/libupsclient1-dev.links: update link name
* debian/libupsclient1.symbols: add with upscli_tryconnect
* debian/nut.TODO.Debian: update and complete the TODO list
* Fix FTBFS for Ubuntu (LP: #815760):
  - debian/control: Build-Depends-Indep on docbook-xsl for offline 
    document generation.
* Merge from Debian unstable (LP: #811976). Remaining changes:
  - debian/control: Drop Build-Depends on libpowerman0-dev (currently in 
    universe)
  - debian/{nut-cgi,nut-server}.postinst: add nut to the dialout and nut 
    groups unconditonally to handle the upgrade from hardy release.
  - debian/nut-powerman-pdu.{install,manpages}: dropped for now.
  - debian/source_nut.py, debian/{nut,nut-server,nut-client}.install, 
    debian/rules: Install apport hooks for all top-level nut packages.
  - debian/rules: Use udev version for Ubuntu.
  - debian/series, debian/patches/backport-fix-lp753661.patch: re-enabled.
* debian/nut.README.Debian: Adjust udev rules naming for permissions override
  (Closes: #529664)
* Re-add and refresh debian/patches/0001-fix_spelling_and_typo.patch:
  Some typos and spelling errors remain.
* Split nut package into nut-client and nut-server, keep nut package as
  metapackage
* Generate PDF and html doc and install it in nut-doc package
* debian/rules:
  - List non-installed files
  - Includes python-module.mk
  - Add flags to build documentation and install it
* debian/control:
  - Add python-nut package and add python build-dependency
  - Set nut-powerman-pdu priority to extras
  - Add nut-monitor package
  - Add nut-doc package and add required C/R/P
  - Add libups-nut-perl package
* debian/nut-server.prerm: Remove /var/run/nut during removal
* Merge from debian unstable.  Remaining changes:
  - debian/control:
    + Drop Build-Depends on libpowerman0-dev (currently in universe)
  - debian/{nut-cgi,nut}.postinst: add nut to the dialout and nut groups
    unconditonally to handle the upgrade from hardy release.
  - debian/nut-powerman-pdu.{install,manpages}: dropped for now.
  - debian/source_nut.py, debian/nut.install, debian/rules: Install apport hook.
  - debian/rules: Use udev version for Ubuntu.
* debian/patches/backport-fix-lp753661.patch: Refreshed.
* Drop changes due to .pc being not clean.
* New upstream release (Closes: #595953, #614842, #595773)
* debian/patches/*.patch: removed since these are now fixed upstream
* Drop HAL package and build-dependencies (Closes: #613197)
* debian/control:
  - Bump Standards-Version to 3.9.2 (no further changes)
  - Drop autotools build-dependencies (not needed anymore)
  - Drop non-existing build-dependencies
* debian/rules:
  - Correctly pass flags to configure
* Merge from debian unstable (LP: #789323).  Remaining changes:
  + debian/control:
    - Update maintainer as per spec.
    - Add Breaks on nut-hal-drivers to ensure we have correct udev version.
    - Drop libpowerman0-dev from the Build-Depends (currently in universe)
  + debian/{nut-cgi,nut}.postinst: add nut to the dialout and nut groups
    unconditonally to handle the upgrade from hardy release.
  + debian/nut-powerman-pdu.install, debian/nut-powerman-pdu.manpages: dropped for now.
  + debian/nul-hal-drivers.{docs,install,postinst,preinst}: Dropped since hal is in universe now
  + debian/nut.links: must create the init script link, used if the upse needs to be powered down
    (LP: #357583)
  + debian/source_nut.py, debian/nut.install, debian/rules: Install apport hook.
  + debian/patches/backport-fix-lp753661.patch
  + Dropped:
    - debian/patches/fix_pc_file.patch: replaced by debian's 0002-fix_libupsclient_pc.patch
* debian/patches/fix_pc_file.patch: add DEP3 patch header
* debian/patches/debian-changes-2.6.0-1: remove that accidental file
* debian/nut-snmp.docs: Distribute snmp.txt doc file (Closes: #548295)
* d/p/0001-fix_spelling_and_typo.patch: Update and refresh
* debian/nut.lintian-overrides: Fix typo
* debian/patch/0002-fix_libupsclient_pc.patch: Fix libupsclient.pc (Closes:
  #624255)
* debian/rules:
  - Switch to cdbs
  - Remove not existing configure options (Closes: #611813)
  - Drop Phony rules (Closes: #613699)
* debian/control:
  - Add cdbs build-dependency
* debian/patches/backport-fix-lp753661.patch: Backport fix 
  to trim extraneous end-of-line, in buggy HID string tables, 
  which results in upsc breaking the communication pipe.
  (LP: #753661)
* fix_pc_file.patch: fix .pc source files by using LIBSSL_LIBS instead of
  LIBSSL_LDFLAGS to avoid a FTBFS in packages that uses libupsclient.pc
  (LP: #743484)
* Merge from Debian unstable, remaining changes:
  + debian/control:
    - Update maintainer as per spec.
    - Add Breaks on nut-hal-drivers to ensure we have correct udev version.
    - Drop libpowerman0-dev from the Build-Depends (currently in universe)
  + debian/{nut-cgi,nut}.postinst: add nut to the dialout and nut groups
    unconditonally to hanle the upgrade from hardy release.
  + debian/nut-powerman-pdu.install, debian/nut-powerman-pdu.manpages: dropped for now.
  + debian/nul-hal-drivers.{docs,install,postinst,preinst}: Dropped since hal is in universe now
  + debian/nut.links: must create the init script link, used if the upse needs to be powered down
    (LP: #357583)
  + debian/source_nut.py, debian/nut.install, debian/rules: Install apport hook.
  + Dropped:
    - debian/patches/0002-fix_udev_action.patch: Accepted upstream.
    - debian/patches/0004-netvision-improvements-lp-600950: no longer needed.
    - debian/patches/0005-fix-nut-m4.patch: no longer needed.
    - debian/patches/9999-autoconf.patch: no longer needed.
* New upstream release (Closes: #575176, #588648, #609597, #687985)
* debian/patches/*.patch: removed since these are now fixed upstream
* debian/patches/0001-fix_spelling_and_typo.patch,
  debian/patches/series: reworked to match the new upstream release
* debian/nut.install, debian/nut.manpages: remove obsolete reference to
  megatec and megatec_usb, now respectively replaced by blazer_ser and
  blazer_usb
* debian/nut.docs: limit distributed documentation
* debian/control:
  - Wrap build-dependencies
  - Change nut-cgi Recommends to apache2 | httpd-cgi
* debian/nut.postinst: Only trigger USB subsystem, should Closes: #574769
* debian/patches/0002-fix_udev_action.patch: Use SUBSYSTEM instead of BUS
* debian/control, debian/rules, 
  debian/nut-hal-drivers.{docs,install,postinst,preinst}: Drop
  nut-hal-drivers since Nut doesnt go into universe.
* Split patches/debian-changes-2.4.3-2ubuntu1 into
  patches/0005-fix-nut-m4.patch and patches/9999-autoconf.patch
* Readd lost debian/patches0004-netvision-improvements-lp-600950.patch patch
  (LP: #707050)
* debian/patches/0002-fix_udev_action.patch:
  Change BUS to SUBSYSTEMS, since the former is deprecated. (LP: #692171)
* debian/nut.postinst: Uncomment missing call to adduser
* debian/control: Drop hal build dependency, we don't need the daemon to
  build the package. Add a hal dependency to nut-hal-drivers, which is the
  only thing that actually needs it.
* Merge from debian unstable.  Remaining changes:
  + debian/control:
    - Update maintainer as per spec.
    - Add Breaks on nut-hal-drivers to ensure we have correct udev version.
    - Drop libpowerman0-dev from the Build-Depends (currently in universe)
  + debian/{nut-cgi,nut}.postinst: add nut to the dialout and nut groups
    unconditonally to hanle the upgrade from hardy release.
  + debian/nut-powerman-pdu.install, debian/nut-powerman-pdu.manpages: dropped for now.
  + debian/nut.links: must create the init script link, used if the upse needs to be powered down
    (LP: #357583)
  + debian/nut.postinst: Update udevadm trigger.
    "libusb_get_report: error sending control message: 
     Operation not permitted" error on some UPS devices. (LP: #572262)
  + debian/source_nut.py, debian/nut.install, debian/rules: Install apport hook.
  + debian/patches/netvision-improvements-lp-600950.patch: Add improvements
    for netvision UPSes
  + Fix FTBFS with ld --as-needed.
  + Dropped:
    - debian/patches/03_udev_rules_change.dpatch: Use debian's instead.
    - debian/patches/04_nut_small-buffers.dpatch: Use debian's instead.
* debian/control:
  - Bump Standards-Version to 3.9.1
  - Update Vcs-* fields to new GIT repository
  - Add myself as Uploaders
* Switch to dpkg-source 3.0 (quilt) format (Closes: #573601)
* debian/patches/0001-low_speed_usb_ups.patch: Use patch system for changes
  that were applied directly in the source
* Add debian/gbp.conf file
* debian/watch: Bump version to 3
* Add debian/patches/0002-fix_udev_action.patch: Also set permission for
  "change" udev ACTION (Closes: #557178)
* debian/nut.postrm: Do not try to remove nut user is deluser is not
  installed anymore
* debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222)
* debian/copyright: Fix copyright-with-old-dh-make-debian-copyright
* Remove nut-snmp.lintian-overrides, not needed anymore
* debian/patches/0003-fix_spelling_and_typo.patch: Fix some spelling errors
* Add debian/libupsclient1.symbols file
* Add debian/nut.links: Re-add /etc/init.d/ups-monitor that was lost for
  some reasons (Closes: #592351)
* debian/nut.lintian-overrides: Add override for
  init.d-script-does-not-provide-itself /etc/init.d/ups-monitor
* Drop libupsclient1.post{inst,rm}: ldconfig call is added automatically by
  debhelper
* debian/libupsclient1-dev.install: Do not ship /lib/libupsclient.la anymore
* debian/rules: Remove dpatch logic as we are using package source version
  '3.0 (quilt)'
* debian/compat: Bump debhelper compatibility to 8
* Non-maintainer upload.
* drivers/libhid.c: Apply r2407 from upstream to fix bug with some
  low speed UPS devices. (Closes: #583371)
* Fix FTBFS with ld --as-needed.
* debian/patches/netvision-improvements-lp-600950.patch: Add improvements for netvision UPSes 
  (LP: #600950) 
* debian/source_nut.py, debian/nut.install, debian/rules: Install apport hook. 
* debian/patches/04_nut-small-buffers.dpatch: Fix "libusb_get_report: error sending control message: 
  Operation not permitted" error on some UPS devices. (LP: #572262)
* debian/nut.postinst: Revert dropping of --action=change. "add" events must
  not ever be triggered automatically.
* Add 03_udev_rules_change.dpatch: Run udev rules on change events, too.
* debian/control: grr...fix ftbfs. 
* Merge from debian testing.  Remaining changes (LP: #535152):
  + debian/control:
    - Update maintainer as per spec.
    - Add Breaks on nut-hal-drivers to ensure we have correct udev version.
    - Drop libpowerman0-dev from the Build-Depends (currently in universe)
  + debian/{nut-cgi,nut}.postinst: add nut to the dialout and nut groups
    unconditonally to hanle the upgrade from hardy release.
  + debian/nut-powerman-pdu.install, debian/nut-powerman-pdu.manpages: dropped for now.
  + debian/nut.links: must create the init script link, used if the upse needs to be powered down
    (LP: #357583)
  + debian/nut.postinst: Update udevadm trigger.
  + Dropped:
    - debian/patches/02-fix-trust-pw4130m.dpatch: No longer needed.
* New upstream release (Closes: #544390, #528222, #539747, #526811,
  #562064)
* debian/nut.install, debian/nut.manpages:
  - remove cyberpower driver and manpage
  - add bestfortress, clone and ivtscd drivers and manpages
* debian/rules:
  - change udev dir to /lib/udev (Closes: #522327)
  - replace deprecated calls to 'dh_clean -k' by dh_prep (Closes: #536599)
* debian/rules, debian/nut.install, debian/nut.install,
  debian/nut.README.Debian: install configuration files, without the
  sample suffix (Closes: #528641)
* debian/nut.links: restored (Closes: #522506)
* debian/nut.init:
  - source nut.conf instead of default/nut for POWEROFF_WAIT(Closes:
    #538173)
  - fix status checking (Closes: #538785)
  - improve detection of non configured system and beautify related
    output (Closes: #563112)
  - use 'invoke-rc.d' instead of calling the reboot script directly
  - add $remote_fs to Required-Start and Required-Stop
* debian/nut.postrm: remove udev files and simplify cleanup (Closes:
  #541629)
* debian/control:
  - remove Luca Filipozzi from the Uploaders list (Closes: #568987)
  - update Standards-Version to 3.8.4
  - remove the debconf dependency
  - bump debhelper version to (>= 7) in Build-Depends, for dh_prep
  - add Breaks on nut-hal-drivers to ensure we have correct udev version
* Remove debconf support since it was related to really old nut
  version (Closes: #518056):
  - remove nut-cgi.config, nut.config, nut-cgi.templates, nut.templates,
    and po/ directory
  - update nut-cgi.postinst
* debian/nut.dirs: remove /var/run/nut to conform to Debian Policy
* debian/nut.postint:
  - create /var/run/nut if needed
  - improve security checks
* debian/nut.README.Debian: add a security note for ups.conf
* debian/watch: URL update
* debian/patches/02-fix-trust-pw4130m.dpatch: Fix issues with Trust
  PW-4130M UPS. (LP: #447586) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH UPSMON.CONF 5 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)"
2
 
.SH NAME
3
 
upsmon.conf \- Configuration for Network UPS Tools upsmon
4
 
 
5
 
.SH DESCRIPTION
6
 
 
7
 
This file's primary job is to define the systems that \fBupsmon\fR(8)
8
 
will monitor and to tell it how to shut down the system when necessary.
9
 
It will contain passwords, so keep it secure.  Ideally,only the upsmon
10
 
process should be able to read it.
11
 
 
12
 
Additionally, other optional configuration values can be set in this
13
 
file.
14
 
 
15
 
.SH CONFIGURATION DIRECTIVES
16
 
 
17
 
.IP "DEADTIME \fIseconds\fR"
18
 
 
19
 
upsmon allows a UPS to go missing for this many seconds before declaring
20
 
it "dead".  The default is 15 seconds.
21
 
 
22
 
upsmon requires a UPS to provide status information every few seconds 
23
 
(see POLLFREQ and POLLFREQALERT) to keep things updated.  If the status
24
 
fetch fails, the UPS is marked stale.  If it stays stale for more than 
25
 
DEADTIME seconds, the UPS is marked dead.
26
 
 
27
 
A dead UPS that was last known to be on battery is assumed to have
28
 
changed to a low battery condition.  This may force a shutdown if it is 
29
 
providing a critical amount of power to your system.  This seems
30
 
disruptive, but the alternative is barreling ahead into oblivion and
31
 
crashing when you run out of power.
32
 
 
33
 
Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT. 
34
 
Otherwise,  you'll have "dead" UPSes simply because upsmon isn't polling
35
 
them quickly enough.  Rule of thumb: take the larger of the two POLLFREQ
36
 
values, and multiply by 3.
37
 
 
38
 
.IP "FINALDELAY \fIseconds\fR"
39
 
 
40
 
When running in master mode, upsmon waits this long after sending the
41
 
NOTIFY_SHUTDOWN to warn the users.  After the timer elapses, it then
42
 
runs your SHUTDOWNCMD.  By default this is set to 5 seconds.
43
 
 
44
 
If you need to let your users do something in between those events,
45
 
increase this number.  Remember, at this point your UPS battery is
46
 
almost depleted, so don't make this too big.
47
 
 
48
 
Alternatively, you can set this very low so you don't wait around when 
49
 
it's time to shut down.  Some UPSes don't give much warning for low 
50
 
battery and will require a value of 0 here for a safe shutdown.
51
 
 
52
 
Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master,
53
 
the master will give up waiting for the slave to disconnect.
54
 
 
55
 
.IP "HOSTSYNC \fIseconds\fR"
56
 
 
57
 
upsmon will wait up to this many seconds in master mode for the slaves
58
 
to disconnect during a shutdown situation.  By default, this is 15
59
 
seconds.
60
 
 
61
 
When a UPS goes critical (on battery + low battery, or "FSD" \(hy forced
62
 
shutdown), the slaves are supposed to disconnect and shut down right
63
 
away.  The HOSTSYNC timer keeps the master upsmon from sitting there
64
 
forever if one of the slaves gets stuck.
65
 
 
66
 
This value is also used to keep slave systems from getting stuck if
67
 
the master fails to respond in time.  After a UPS becomes critical,
68
 
the slave will wait up to HOSTSYNC seconds for the master to set the
69
 
FSD flag.  If that timer expires, the slave will assume that the master
70
 
is broken and will shut down anyway.
71
 
 
72
 
This keeps the slaves from shutting down during a short\(hylived status
73
 
change to "OB LB" that the slaves see but the master misses.
74
 
 
75
 
.IP "MINSUPPLIES \fInum\fR"
76
 
 
77
 
Set the number of power supplies that must be receiving power to keep
78
 
this system running.  Normal computers have just one power supply, so
79
 
the default value of 1 is acceptable.
80
 
 
81
 
Large/expensive server type systems usually have more, and can run
82
 
with a few missing.  The HP NetServer LH4 can run with 2 out of 4, for
83
 
example, so you'd set it to 2.  The idea is to keep the box running
84
 
as long as possible, right?
85
 
 
86
 
Obviously you have to put the redundant supplies on different UPS
87
 
circuits for this to make sense!  See big\(hyservers.txt in the docs
88
 
subdirectory for more information and ideas on how to use this
89
 
feature.
90
 
 
91
 
Also see the section on "power values" in \fBupsmon\fR(8).
92
 
 
93
 
.IP "MONITOR \fIsystem\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR"
94
 
 
95
 
Each UPS that you need to be monitor should have a MONITOR line.  Not
96
 
all of these need supply power to the system that is running upsmon.
97
 
You may monitor other systems if you want to be able to send
98
 
notifications about status changes on them.
99
 
 
100
 
You must have at least one MONITOR directive in this file.
101
 
 
102
 
\fIsystem\fR is a UPS identifier.  It is in this form:
103
 
 
104
 
        <upsname>[@<hostname>[:<port>]]
105
 
 
106
 
The default hostname is "localhost".  Some examples:
107
 
 
108
 
 \(hy "su700@mybox" means a UPS called "su700" on a system called "mybox".
109
 
This is the normal form.
110
 
 
111
 
 \(hy "fenton@bigbox:5678" is a UPS called "fenton" on a system called
112
 
"bigbox" which runs \fBupsd\fR(8) on port "5678".
113
 
 
114
 
\fIpowervalue\fR is an integer representing the number of power supplies
115
 
that the UPS feeds on this system.  Most normal computers have one power
116
 
supply, and the UPS feeds it, so this value will be 1.  You need a very
117
 
large or special system to have anything higher here.
118
 
 
119
 
You can set the \fIpowervalue\fR to 0 if you want to monitor a UPS that
120
 
doesn't actually supply power to this system.  This is useful when you
121
 
want to have upsmon do notifications about status changes on a UPS
122
 
without shutting down when it goes critical.
123
 
 
124
 
The \fIusername\fR and \fIpassword\fR on this line must match an entry 
125
 
in that system's \fBupsd.users\fR(5).  If your username is "monmaster"
126
 
and your password is "blah", the MONITOR line might look like this:
127
 
 
128
 
MONITOR myups@bigserver 1 monmaster blah master
129
 
 
130
 
Meanwhile, the upsd.users on 'bigserver' would look like this:
131
 
 
132
 
        [monmaster]
133
 
 
134
 
                password  = blah
135
 
 
136
 
                allowfrom = (ACLs from \fBupsd.conf\fR(5))
137
 
 
138
 
                upsmon master   (or slave)
139
 
 
140
 
The \fItype\fR refers to the relationship with \fBupsd\fR(8).  It can
141
 
be either "master" or "slave".  See \fBupsmon\fR(8) for more information
142
 
on the meaning of these modes.  The mode you pick here also goes in
143
 
the upsd.users file, as seen in the example above.
144
 
 
145
 
.IP "NOCOMMWARNTIME \fIseconds\fR"
146
 
 
147
 
upsmon will trigger a NOTIFY_NOCOMM after this many seconds if it can't
148
 
reach any of the UPS entries in this configuration file.  It keeps
149
 
warning you until the situation is fixed.  By default this is 300
150
 
seconds.
151
 
 
152
 
.IP "NOTIFYCMD \fIcommand\fR"
153
 
 
154
 
upsmon calls this to send messages when things happen.
155
 
 
156
 
This command is called with the full text of the message as one 
157
 
argument.  The environment string NOTIFYTYPE will contain the type
158
 
string of whatever caused this event to happen.
159
 
 
160
 
If you need to use \fBupssched\fR(8), then you must make it your
161
 
NOTIFYCMD by listing it here.
162
 
 
163
 
Note that this is only called for NOTIFY events that have EXEC set with
164
 
NOTIFYFLAG.  See NOTIFYFLAG below for more details.
165
 
 
166
 
Making this some sort of shell script might not be a bad idea.  For
167
 
more information and ideas, see pager.txt in the docs directory.
168
 
 
169
 
Remember, this also needs to be one element in the configuration file,
170
 
so if your command has spaces, then wrap it in quotes.
171
 
 
172
 
        NOTIFYCMD "/path/to/script \-\-foo \-\-bar"
173
 
 
174
 
This script is run in the background \(hy that is, upsmon forks before it
175
 
calls out to start it.  This means that your NOTIFYCMD may have multiple
176
 
instances running simultaneously if a lot of stuff happens all at once.
177
 
Keep this in mind when designing complicated notifiers.
178
 
 
179
 
.IP "NOTIFYMSG \fItype\fR \fImessage\fR\"
180
 
 
181
 
upsmon comes with a set of stock messages for various events.  You can
182
 
change them if you like.
183
 
 
184
 
        NOTIFYMSG ONLINE "UPS %s is getting line power"
185
 
 
186
 
        NOTIFYMSG ONBATT "Someone pulled the plug on %s"
187
 
 
188
 
Note that %s is replaced with the identifier of the UPS in question.
189
 
 
190
 
Possible values for \fItype\fR:
191
 
 
192
 
        ONLINE \(hy UPS is back online
193
 
 
194
 
        ONBATT \(hy UPS is on battery
195
 
 
196
 
        LOWBATT \(hy UPS is on battery and has a low battery (is critical)
197
 
 
198
 
        FSD \(hy UPS is being shutdown by the master (FSD = "Forced Shutdown")
199
 
 
200
 
        COMMOK \(hy Communications established with the UPS
201
 
 
202
 
        COMMBAD \(hy Communications lost to the UPS
203
 
 
204
 
        SHUTDOWN \(hy The system is being shutdown
205
 
 
206
 
        REPLBATT \(hy The UPS battery is bad and needs to be replaced
207
 
 
208
 
        NOCOMM \(hy A UPS is unavailable (can't be contacted for monitoring) 
209
 
 
210
 
The message must be one element in the configuration file, so if it
211
 
contains spaces, you must wrap it in quotes.
212
 
 
213
 
        NOTIFYMSG NOCOMM "Someone stole UPS %s"
214
 
 
215
 
.IP "NOTIFYFLAG \fItype\fR \fIflag\fR[+\fIflag\fR][+\fIflag\fR]..."
216
 
 
217
 
By default, upsmon sends walls global messages to all logged in users)
218
 
via /bin/wall and writes to the syslog when things happen.  You can
219
 
change this. 
220
 
 
221
 
Examples:
222
 
 
223
 
        NOTIFYFLAG ONLINE SYSLOG
224
 
 
225
 
        NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
226
 
 
227
 
Possible values for the flags:
228
 
 
229
 
        SYSLOG \(hy Write the message to the syslog
230
 
 
231
 
        WALL \(hy Write the message to all users with /bin/wall
232
 
 
233
 
        EXEC \(hy Execute NOTIFYCMD (see above) with the message
234
 
 
235
 
        IGNORE \(hy Don't do anything
236
 
 
237
 
If you use IGNORE, don't use any other flags on the same line.
238
 
 
239
 
.IP "POLLFREQ \fIseconds\fR"
240
 
 
241
 
Normally upsmon polls the \fBupsd\fR(8) server every 5 seconds.  If this
242
 
is flooding your network with activity, you can make it higher.  You can
243
 
also make it lower to get faster updates in some cases.
244
 
 
245
 
There are some catches.  First, if you set the POLLFREQ too high, you
246
 
may miss short\(hylived power events entirely.  You also risk triggering
247
 
the DEADTIME (see above) if you use a very large number.
248
 
 
249
 
Second, there is a point of diminishing returns if you set it too low.
250
 
While upsd normally has all of the data available to it instantly, most
251
 
drivers only refresh the UPS status once every 2 seconds.  Polling any
252
 
more than that usually doesn't get you the information any faster.
253
 
 
254
 
.IP "POLLFREQALERT \fIseconds\fR"
255
 
 
256
 
This is the interval that upsmon waits between polls if any of its UPSes
257
 
are on battery.  You can use this along with POLLFREQ above to slow down
258
 
polls during normal behavior, but get quicker updates when something bad
259
 
happens.
260
 
 
261
 
This should always be equal to or lower than the POLLFREQ value.  By
262
 
default it is also set 5 seconds.
263
 
 
264
 
The warnings from the POLLFREQ entry about too\(hyhigh and too\(hylow values
265
 
also apply here.
266
 
 
267
 
.IP "POWERDOWNFLAG \fIfilename\fR"
268
 
 
269
 
upsmon creates this file when running in master mode when the UPS needs
270
 
to be powered off.  You should check for this file in your shutdown
271
 
scripts and call \fBupsdrvctl shutdown\fR if it exists.
272
 
 
273
 
This is done to forcibly reset the slaves, so they don't get stuck at
274
 
the "halted" stage even if the power returns during the shutdown
275
 
process.  This usually does not work well on contact\(hyclosure UPSes that
276
 
use the genericups driver.
277
 
 
278
 
See the shutdown.txt file in the docs subdirectory for more information.
279
 
 
280
 
.IP "RBWARNTIME \fIseconds\fR"
281
 
 
282
 
When a UPS says that it needs to have its battery replaced, upsmon will
283
 
generate a NOTIFY_REPLBATT event.  By default this happens every 43200
284
 
seconds \(hy 12 hours.
285
 
 
286
 
If you need another value, set it here.
287
 
 
288
 
.IP "RUN_AS_USER \fIusername\fR"
289
 
 
290
 
upsmon normally runs the bulk of the monitoring duties under another user
291
 
ID after dropping root privileges.  On most systems this means it runs
292
 
as "nobody", since that's the default from compile\(hytime.
293
 
 
294
 
The catch is that "nobody" can't read your upsmon.conf, since by default
295
 
it is installed so that only root can open it.  This means you won't be
296
 
able to reload the configuration file, since it will be unavailable.
297
 
 
298
 
The solution is to create a new user just for upsmon, then make it run
299
 
as that user.  I suggest "nutmon", but you can use anything that isn't
300
 
already taken on your system.  Just create a regular user with no special
301
 
privileges and an impossible password.
302
 
 
303
 
Then, tell upsmon to run as that user, and make upsmon.conf readable by it.
304
 
Your reloads will work, and your config file will stay secure.
305
 
 
306
 
This file should not be writable by the upsmon user, as it would be 
307
 
possible to exploit a hole, change the SHUTDOWNCMD to something
308
 
malicious, then wait for upsmon to be restarted.
309
 
 
310
 
.IP "SHUTDOWNCMD \fIcommand\fR"
311
 
 
312
 
upsmon runs this command when the system needs to be brought down.  If
313
 
it is a slave, it will do that immediately whenever the current overall
314
 
power value drops below the MINSUPPLIES value above.
315
 
 
316
 
When upsmon is a master, it will allow any slaves to log out before
317
 
starting the local shutdown procedure.
318
 
 
319
 
Note that the command needs to be one element in the config file.  If
320
 
your shutdown command includes spaces, then put it in quotes to keep it
321
 
together, i.e.:
322
 
 
323
 
        SHUTDOWNCMD "/sbin/shutdown \-h +0"
324
 
 
325
 
.SH SEE ALSO
326
 
\fBupsmon\fR(8), \fBupsd\fR(8), \fBnutupsdrv\fR(8).
327
 
 
328
 
.SS Internet resources:
329
 
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/