3 Luci statistics - netlink 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.netlink", package.seeall)
18 function rrdargs( graph, plugin, plugin_instance )
25 -- diagram data description
27 -- defined sources for data types, if ommitted assume a single DS named "value" (optional)
29 if_octets = { "tx", "rx" }
32 -- special options for single data lines
35 total = true, -- report total amount of bytes
36 color = "00ff00" -- tx is green
40 flip = true, -- flip rx line
41 total = true, -- report total amount of bytes
42 color = "0000ff" -- rx is blue
54 -- diagram data description
57 types = { "if_packets", "if_dropped", "if_errors" },
59 -- defined sources for data types
61 if_packets = { "tx", "rx" },
62 if_dropped = { "tx", "rx" },
63 if_errors = { "tx", "rx" }
66 -- special options for single data lines
68 -- 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
75 -- processed packets (rx DS)
77 overlay = true, -- don't summarize
78 flip = true, -- flip rx line
79 total = true, -- report total amount of bytes
80 color = "0000ff" -- processed rx is blue
83 -- dropped packets (tx DS)
85 overlay = true, -- don't summarize
86 total = true, -- report total amount of bytes
87 color = "660055" -- dropped tx is ... dunno ;)
90 -- dropped packets (rx DS)
92 overlay = true, -- don't summarize
93 flip = true, -- flip rx line
94 total = true, -- report total amount of bytes
95 color = "440066" -- dropped rx is violett
98 -- packet errors (tx DS)
100 overlay = true, -- don't summarize
101 total = true, -- report total amount of packets
102 color = "ff5500" -- tx errors are orange
105 -- packet errors (rx DS)
107 overlay = true, -- don't summarize
108 flip = true, -- flip rx line
109 total = true, -- report total amount of packets
110 color = "ff0000" -- rx errors are red
122 -- diagram data description
125 types = { "if_multicast" },
127 -- special options for single data lines
131 total = true, -- report total amount of packets
132 color = "0000ff" -- multicast is blue
144 -- diagram data description
147 types = { "if_collisions" },
149 -- special options for single data lines
153 total = true, -- report total amount of packets
154 color = "ff0000" -- collsions are red
166 -- diagram data description
169 types = { "if_tx_errors", "if_rx_errors" },
171 -- data type instances
173 if_tx_errors = { "aborted", "carrier", "fifo", "heartbeat", "window" },
174 if_rx_errors = { "length", "missed", "over", "crc", "fifo", "frame" }
177 -- special options for single data lines
178 options = { -- XXX: fixme (define colors...)
192 return { traffic, packets, multicast, collisions, errors }