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/load on UPS \"%pi\"",
45 number_format = "%5.1lf%%",
48 percent = { "charge", "load" }
51 percent_charge = { color = "00ff00", title = "Charge level" },
52 percent_load = { color = "ff0000", title = "Load" }
57 -- Note: This is in ISO8859-1 for rrdtool. Welcome to the 20th century.
59 title = "%H: Battery temperature on UPS \"%pi\"",
61 number_format = "%5.1lf\176C",
64 temperature = "battery"
68 temperature_battery = { color = "ffb000", title = "Battery temperature" }
74 title = "%H: Time left on UPS \"%pi\"",
76 number_format = "%.1lfm",
79 timeleft = { "battery" }
82 timeleft_battery = { color = "0000ff", title = "Time left", transform_rpn = "60,/", noarea=true }
88 title = "%H: Power on UPS \"%pi\"",
90 number_format = "%5.1lf%%",
96 power_ups = { color = "00ff00", title = "Power level" }
101 local frequencies = {
102 title = "%H: Frequencies on UPS \"%pi\"",
104 number_format = "%5.1lfHz",
107 frequency = { "input", "output" }
111 frequency_output = { color = "00e000", title = "Output frequency", noarea=true, overlay=true },
112 frequency_input = { color = "ffb000", title = "Input frequency", noarea=true, overlay=true }
116 return { voltages, currents, percentage, temperature, timeleft, power, frequencies }