1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
4 module("luci.statistics.rrdtool.definitions.interface", package.seeall)
6 function rrdargs( graph, plugin, plugin_instance )
13 -- draw this diagram for each plugin instance
15 title = "%H: Transfer on %pi",
18 -- diagram data description
20 -- defined sources for data types, if ommitted assume a single DS named "value" (optional)
22 if_octets = { "tx", "rx" }
25 -- special options for single data lines
28 total = true, -- report total amount of bytes
29 color = "00ff00", -- tx is green
34 flip = true, -- flip rx line
35 total = true, -- report total amount of bytes
36 color = "0000ff", -- rx is blue
49 -- draw this diagram for each plugin instance
51 title = "%H: Packets on %pi",
54 -- diagram data description
57 types = { "if_packets", "if_errors" },
59 -- defined sources for data types
61 if_packets = { "tx", "rx" },
62 if_errors = { "tx", "rx" }
65 -- special options for single data lines
67 -- processed packets (tx DS)
70 overlay = true, -- don't summarize
71 total = true, -- report total amount of bytes
72 color = "00ff00", -- processed tx is green
73 title = "Processed (TX)"
76 -- processed packets (rx DS)
79 overlay = true, -- don't summarize
80 flip = true, -- flip rx line
81 total = true, -- report total amount of bytes
82 color = "0000ff", -- processed rx is blue
83 title = "Processed (RX)"
86 -- packet errors (tx DS)
89 overlay = true, -- don't summarize
90 total = true, -- report total amount of packets
91 color = "ff5500", -- tx errors are orange
95 -- packet errors (rx DS)
98 overlay = true, -- don't summarize
99 flip = true, -- flip rx line
100 total = true, -- report total amount of packets
101 color = "ff0000", -- rx errors are red
102 title = "Errors (RX)"
108 return { traffic, packets }