1 -- Licensed to the public under the Apache License 2.0.
3 module("luci.statistics.rrdtool.definitions.nut",package.seeall)
5 function rrdargs( graph, plugin, plugin_instance, dtype )
8 title = "%H: Voltages on UPS \"%pi\"",
10 number_format = "%5.1lfV",
13 voltage = { "battery", "input", "output" }
17 voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
18 voltage_battery = { color = "0000ff", title = "Battery voltage", noarea=true, overlay=true },
19 voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
25 title = "%H: Current on UPS \"%pi\"",
27 number_format = "%5.3lfA",
30 current = { "battery", "output" }
34 current_output = { color = "00e000", title = "Output current", noarea=true, overlay=true },
35 current_battery = { color = "0000ff", title = "Battery current", noarea=true, overlay=true },
41 title = "%H: Battery charge on UPS \"%pi\"",
45 number_format = "%5.1lf%%",
48 percent = { "percent" }
54 percent_charge = { color = "00ff00", title = "Charge level" }
59 -- Note: This is in ISO8859-1 for rrdtool. Welcome to the 20th century.
61 title = "%H: Battery temperature on UPS \"%pi\"",
63 number_format = "%5.1lf\176C",
66 temperature = "battery"
70 temperature_battery = { color = "ffb000", title = "Battery temperature" }
76 title = "%H: Time left on UPS \"%pi\"",
78 number_format = "%.1lfm",
81 timeleft = { "timeleft" }
84 timeleft = { "battery" }
87 timeleft_battery = { color = "0000ff", title = "Time left", transform_rpn = "60,/" }
92 return { voltages, currents, percentage, temperature, timeleft }