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, host, plugin, plugin_instance )
25 -- draw this diagram for each data instance
28 -- diagram data description
30 -- defined sources for data types, if ommitted assume a single DS named "value" (optional)
32 if_octets = { "tx", "rx" }
35 -- special options for single data lines
38 total = true, -- report total amount of bytes
39 color = "00ff00" -- tx is green
43 flip = true, -- flip rx line
44 total = true, -- report total amount of bytes
45 color = "0000ff" -- rx is blue
57 -- draw this diagram for each data instance
60 -- diagram data description
63 types = { "if_packets", "if_errors" },
65 -- defined sources for data types
67 if_packets = { "tx", "rx" },
68 if_errors = { "tx", "rx" }
71 -- special options for single data lines
73 -- processed packets (tx DS)
75 overlay = true, -- don't summarize
76 total = true, -- report total amount of bytes
77 color = "00ff00" -- processed tx is green
80 -- processed packets (rx DS)
82 overlay = true, -- don't summarize
83 flip = true, -- flip rx line
84 total = true, -- report total amount of bytes
85 color = "0000ff" -- processed rx is blue
88 -- packet errors (tx DS)
90 overlay = true, -- don't summarize
91 total = true, -- report total amount of packets
92 color = "ff5500" -- tx errors are orange
95 -- packet errors (rx DS)
97 overlay = true, -- don't summarize
98 flip = true, -- flip rx line
99 total = true, -- report total amount of packets
100 color = "ff0000" -- rx errors are red
106 return { traffic, packets }