1# Network UPS Tools: example ups.conf
2#
3# --- SECURITY NOTE ---
4#
5# If you use snmp-ups and set a community string in here, you
6# will have to secure this file to keep other users from obtaining
7# that string.  It needs to be readable by upsdrvctl and any drivers,
8# and by upsd.
9#
10# ---
11#
12# This is where you configure all the UPSes that this system will be
13# monitoring directly.  These are usually attached to serial ports, but
14# USB devices and SNMP devices are also supported.
15#
16# This file is used by upsdrvctl to start and stop your driver(s), and
17# is also used by upsd to determine which drivers to monitor.  The
18# drivers themselves also read this file for configuration directives.
19#
20# The general form is:
21#
22# [upsname]
23#       driver = <drivername>
24#         port = <portname>
25#       < any other directives here >
26#
27# The section header ([upsname]) can be just about anything as long as
28# it is a single word inside brackets.  upsd uses this to uniquely
29# identify a UPS on this system.
30#
31# If you have a UPS called snoopy, your section header would be "[snoopy]".
32# On a system called "doghouse", the line in your upsmon.conf to monitor
33# and manage it would look something like this:
34#
35#   MONITOR snoopy@doghouse 1 upsmonuser mypassword primary
36#
37# It might look like this if monitoring in "secondary" mode (without any
38# ability to directly manage the UPS) from a different system:
39#
40#   MONITOR snoopy@doghouse 1 upsmonuser mypassword secondary
41#
42# Configuration directives
43# ------------------------
44#
45# These directives are used by upsdrvctl only and should be specified outside
46# of a driver definition:
47#
48#    maxretry: Optional.  Specify the number of attempts to start the driver(s),
49#              in case of failure, before giving up. A delay of 'retrydelay' is
50#              inserted between each attempt. Caution should be taken when using
51#              this option, since it can impact the time taken by your system to
52#              start.
53#
54#              The built-in default is 1 attempt.
55#
56#  retrydelay: Optional.  Specify the delay between each restart attempt of the
57#              driver(s), as specified by 'maxretry'. Caution should be taken
58#              when using this option, since it can impact the time taken by your
59#              system to start.
60#
61#              The default is 5 seconds.
62#
63
64# Set maxretry to 3 by default, this should mitigate race with slow devices:
65maxretry = 3
66
67# These directives are common to all drivers that support ups.conf:
68#
69#  driver: REQUIRED.  Specify the program to run to talk to this UPS.
70#          apcsmart, bestups, and sec are some examples.
71#
72#    port: REQUIRED.  The serial port where your UPS is connected.
73#          /dev/ttyS0 is usually the first port on Linux boxes, for example.
74#
75# sdorder: optional.  When you have multiple UPSes on your system, you
76#          usually need to turn them off in a certain order.  upsdrvctl
77#          shuts down all the 0s, then the 1s, 2s, and so on.  To exclude
78#          a UPS from the shutdown sequence, set this to -1.
79#
80#          The default value for this parameter is 0.
81#
82#  nolock: optional, and not recommended for use in this file.
83#
84#          If you put nolock in here, the driver will not lock the
85#          serial port every time it starts.  This may allow other
86#          processes to seize the port if you start more than one by
87#          mistake.
88#
89#          This is only intended to be used on systems where locking
90#          absolutely must be disabled for the software to work.
91#
92# maxstartdelay: optional.  This can be set as a global variable
93#                above your first UPS definition and it can also be
94#                set in a UPS section.  This value controls how long
95#                upsdrvctl will wait for the driver to finish starting.
96#                This keeps your system from getting stuck due to a
97#                broken driver or UPS.
98#
99#                The default is 45 seconds.
100#
101# synchronous: optional.  The driver work by default in asynchronous
102#              mode (i.e *synchronous=no*).  This means that all data
103#              are pushed by the driver on the communication socket to
104#              upsd (Unix socket on Unix, Named pipe on Windows) without
105#              waiting for these data to be actually consumed.  With
106#              some HW, such as ePDUs, that can produce a lot of data,
107#              asynchronous mode may cause some congestion, resulting in
108#              the socket to be full, and the driver to appear as not
109#              connected.  By enabling the 'synchronous' flag
110#              (value = 'yes'), the driver will wait for data to be
111#              consumed by upsd, prior to publishing more.  This can be
112#              enabled either globally or per driver.
113#
114#              The default is 'no' (i.e. asynchronous mode) for backward
115#              compatibility of the driver behavior.
116#
117# Anything else is passed through to the hardware-specific part of
118# the driver.
119#
120# Examples
121# --------
122#
123# A simple example for a UPS called "powerpal" that uses the blazer_ser
124# driver on /dev/ttyS0 is:
125#
126# [powerpal]
127#   driver = blazer_ser
128#   port = /dev/ttyS0
129#   desc = "Web server"
130#
131# If your UPS driver requires additional settings, you can specify them
132# here.  For example, if it supports a setting of "1234" for the
133# variable "cable", it would look like this:
134#
135# [myups]
136#   driver = mydriver
137#   port = /dev/ttyS1
138#   cable = 1234
139#   desc = "Something descriptive"
140#
141# To find out if your driver supports any extra settings, start it with
142# the -h option and/or read the driver's documentation.
143