1 -- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
4 module("luci.statistics.rrdtool.definitions.apcups",package.seeall)
6 function rrdargs( graph, plugin, plugin_instance, dtype )
9 title = "%H: Voltages on APC UPS - Battery",
12 number_format = "%5.1lfV",
15 voltage = { "battery" }
19 voltage = { title = "Battery voltage", noarea=true }
25 title = "%H: Voltages on APC UPS - AC",
28 number_format = "%5.1lfV",
31 voltage = { "input", "output" }
35 voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
36 voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
42 title = "%H: Load on APC UPS ",
46 number_format = "%5.1lf%%",
49 percent_load = { "value" }
55 percent_load = { color = "00ff00", title = "Load level" }
60 local charge_percent = {
61 title = "%H: Battery charge on APC UPS ",
65 number_format = "%5.1lf%%",
69 charge = { color = "00ff0b", title = "Charge level" }
75 title = "%H: Battery temperature on APC UPS ",
77 number_format = "%5.1lf\176C",
79 types = { "temperature" },
81 temperature = { color = "ffb000", title = "Battery temperature" } }
86 title = "%H: Time left on APC UPS ",
88 number_format = "%.1lfm",
91 timeleft = { "value" }
94 timeleft = { color = "0000ff", title = "Time left" }
100 title = "%H: Incoming line frequency on APC UPS ",
102 number_format = "%5.0lfhz",
105 frequency_input = { "value" }
108 frequency = "frequency"
111 frequency_frequency = { color = "000fff", title = "Line frequency" }
116 return { voltages, voltagesdc, percentload, charge_percent, temperature, timeleft, frequency }