3 Luci statistics - interface plugin diagram definition
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
16 module("luci.statistics.rrdtool.definitions.interface", package.seeall)
18 function rrdargs( graph, plugin, plugin_instance )
25 -- draw this diagram for each plugin instance
27 title = "%H: Transfer on %pi",
30 -- diagram data description
32 -- defined sources for data types, if ommitted assume a single DS named "value" (optional)
34 if_octets = { "tx", "rx" }
37 -- special options for single data lines
40 total = true, -- report total amount of bytes
41 color = "00ff00", -- tx is green
46 flip = true, -- flip rx line
47 total = true, -- report total amount of bytes
48 color = "0000ff", -- rx is blue
61 -- draw this diagram for each plugin instance
63 title = "%H: Packets on %pi",
66 -- diagram data description
69 types = { "if_packets", "if_errors" },
71 -- defined sources for data types
73 if_packets = { "tx", "rx" },
74 if_errors = { "tx", "rx" }
77 -- special options for single data lines
79 -- processed packets (tx DS)
81 overlay = true, -- don't summarize
82 total = true, -- report total amount of bytes
83 color = "00ff00", -- processed tx is green
84 title = "Processed (tx)"
87 -- processed packets (rx DS)
89 overlay = true, -- don't summarize
90 flip = true, -- flip rx line
91 total = true, -- report total amount of bytes
92 color = "0000ff", -- processed rx is blue
93 title = "Processed (rx)"
96 -- packet errors (tx DS)
98 overlay = true, -- don't summarize
99 total = true, -- report total amount of packets
100 color = "ff5500", -- tx errors are orange
101 title = "Errors (tx)"
104 -- packet errors (rx DS)
106 overlay = true, -- don't summarize
107 flip = true, -- flip rx line
108 total = true, -- report total amount of packets
109 color = "ff0000", -- rx errors are red
110 title = "Errors (rx)"
116 return { traffic, packets }