Provided by: nut-cgi_2.0.3-4build1_i386
upsstats.html - HTML template for Network UPS Tools upsstats
This file is used by upsstats.cgi(8) to generate status pages. Certain
commands are recognized, and will be replaced with various status
elements on the fly.
All commands must be alone on a line, and start and end with @. A line
that has any extra characters before or after the @ will be passed
Some commands begin blocks - sections of the template that will be
included, excluded, or repeated depending on certain parameters.
Starts a block that will be repeated for each MONITOR directive
in the hosts.conf(5). This is how you can generate pages that
monitor all of your systems simultaneously.
Ends a FOREACHUPS block.
Starts a block that will only be printed if the variable var is
supported by the current UPS. This is generally used to
suppress "not supported" messages by avoiding the label and
variable call entirely.
Ends an IFSUPP block.
IFSUPP blocks may be contained within a FOREACHUPS block. Nesting and
other combinations are not supported.
Insert the ambient temperature in the current temperature scale.
Insert the current date and time. The format string is passed
to strftime, so almost anything is possible. See strftime(3)
for possible values.
Insert the entity for degrees (°) and either C or F
depending on the current temperature scale.
@HOST@ Insert the designation of the host being monitored, like
Insert the host’s description from hosts.conf(5).
Insert a link to upsstats.cgi with the "host" variable set to
the current UPS. This is only useful within a FOREACHUPS block.
@IMG varname [extra]@
Insert an IMG SRC to upsimage.cgi(8) for one of these status
battery.charge - Battery charge - a percentage
battery.voltage - The charge on the battery in volts
ups.load - UPS load - percentage
input.voltage - Incoming utility voltage
output.voltage - Outgoing voltage (from the UPS)
input.frequency - Incoming utility frequency (Hz)
output.frequency - Outgoing utility frequency (Hz)
ups.temperature - UPS temperature
extra is where you can put additional definitions. Right now
the valid definitions are colors for various parts of the bars
drawn by upsimage.cgi. Possible color names are:
back_col - background color
scale_num_col - scale number color
summary_col - summary color (number at the bottom)
ok_zone_maj_col - major scale color for the normal
ok_zone_min_col - minor scale color for the normal
neutral_zone_maj_col - major scale color for the neutral
neutral_zone_min_col - minor scale color for the neutral
warn_zone_maj_col - major scale color for the warning zone
warn_zone_min_col - minor scale color for the warning zone
bar_col - the color of the bar in the middle
All colors are hex triplets - 0xff0000 is red, 0x00ff00 is
green, and 0x0000ff is blue.
@IMG battery.charge back_col=0xff00ff bar_col=0xaabbcc@
@IMG input.voltage ok_zone_maj_col=0x123456@
Insert the META header magic for refreshing the page if that
variable has been set by the browser. This needs to be in the
HEAD section of the page.
Expand the abbreviations in the ups.status variable - OL becomes
"On line", OB becomes "On battery", and so on.
Insert red, green, or yellow color triplets depending on the
severity of the current UPS status. Normal operations are
green, warnings like voltage trim/boost or "off" are yellow, and
other events like being on battery or having a low battery are
Insert the current value of the status variable varname on the
host being monitored, or "Not supported".
Use the Celsius scale for temperature data (default).
Use the Fahrenheit scale for temperature data.
Insert the UPS temperature in the current scale.
Insert either #FF0000 (red) or #00FF00 (green) depending on the
incoming utility voltage. By default this will return green,
unless the utility is outside the bounds defined by lowxfer and
highxfer. Those voltages are a function of your driver, and do
not exist on all of them.
Insert the version number of the software.
upsstats.cgi(8) will also open a file called upsstats-single.html if
you call it with "host=" set in the URL. That file uses the same rules
and techniques documented here.
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Tue Jul 29 2003 upsstats.html(5)