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 ",
11 number_format = "%5.1lfV",
14 voltage = { "battery", "input", "output" }
18 voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
19 voltage_battery = { color = "0000ff", title = "Battery voltage", noarea=true, overlay=true },
20 voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
26 title = "%H: Load on APC UPS ",
30 number_format = "%5.1lf%%",
33 percent_load = { "value" }
39 percent_load = { color = "00ff00", title = "Load level" }
44 local charge_percent = {
45 title = "%H: Battery charge on APC UPS ",
49 number_format = "%5.1lf%%",
53 charge = { color = "00ff0b", title = "Charge level" }
59 title = "%H: Battery temperature on APC UPS ",
61 number_format = "%5.1lf\176C",
63 types = { "temperature" },
65 temperature = { color = "ffb000", title = "Battery temperature" } }
70 title = "%H: Time left on APC UPS ",
72 number_format = "%.1lfm",
75 timeleft = { "value" }
78 timeleft = { color = "0000ff", title = "Time left" }
84 title = "%H: Incoming line frequency on APC UPS ",
86 number_format = "%5.0lfhz",
89 frequency_input = { "value" }
92 frequency = "frequency"
95 frequency_frequency = { color = "000fff", title = "Line frequency" }
100 return { voltages, percentload, charge_percent, temperature, timeleft, frequency }