3 Luci statistics - ups plugin diagram definition
4 Copyright © 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5 Copyright © 2012 David Woodhouse <dwmw2@infradead.org>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
16 module("luci.statistics.rrdtool.definitions.nut",package.seeall)
18 function rrdargs( graph, plugin, plugin_instance, dtype )
21 title = "%H: Voltages on UPS \"%pi\"",
23 number_format = "%5.1lfV",
26 voltage = { "battery", "input", "output" }
30 voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
31 voltage_battery = { color = "0000ff", title = "Battery voltage", noarea=true, overlay=true },
32 voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
38 title = "%H: Current on UPS \"%pi\"",
40 number_format = "%5.3lfA",
43 current = { "battery", "output" }
47 current_output = { color = "00e000", title = "Output current", noarea=true, overlay=true },
48 current_battery = { color = "0000ff", title = "Battery current", noarea=true, overlay=true },
54 title = "%H: Battery charge on UPS \"%pi\"",
58 number_format = "%5.1lf%%",
61 percent = { "percent" }
67 percent_charge = { color = "00ff00", title = "Charge level" }
72 -- Note: This is in ISO8859-1 for rrdtool. Welcome to the 20th century.
74 title = "%H: Battery temperature on UPS \"%pi\"",
76 number_format = "%5.1lf\176C",
79 temperature = "battery"
83 temperature_battery = { color = "ffb000", title = "Battery temperature" }
89 title = "%H: Time left on UPS \"%pi\"",
91 number_format = "%.1lfm",
94 timeleft = { "timeleft" }
97 timeleft = { "battery" }
100 timeleft_battery = { color = "0000ff", title = "Time left", transform_rpn = "60,/" }
105 return { voltages, currents, percentage, temperature, timeleft }