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 )
24 title = "%H: Netlink - Transfer on %pi",
27 -- diagram data description
29 -- defined sources for data types, if ommitted assume a single DS named "value" (optional)
31 if_octets = { "tx", "rx" }
34 -- special options for single data lines
37 total = true, -- report total amount of bytes
38 color = "00ff00" -- tx is green
42 flip = true, -- flip rx line
43 total = true, -- report total amount of bytes
44 color = "0000ff" -- rx is blue
55 title = "%H: Netlink - Packets on %pi",
56 vlabel = "Packets/s", detail = true,
58 -- diagram data description
61 types = { "if_packets", "if_dropped", "if_errors" },
63 -- defined sources for data types
65 if_packets = { "tx", "rx" },
66 if_dropped = { "tx", "rx" },
67 if_errors = { "tx", "rx" }
70 -- special options for single data lines
72 -- processed packets (tx DS)
74 overlay = true, -- don't summarize
75 total = true, -- report total amount of bytes
76 color = "00ff00" -- processed tx is green
79 -- processed packets (rx DS)
81 overlay = true, -- don't summarize
82 flip = true, -- flip rx line
83 total = true, -- report total amount of bytes
84 color = "0000ff" -- processed rx is blue
87 -- dropped packets (tx DS)
89 overlay = true, -- don't summarize
90 total = true, -- report total amount of bytes
91 color = "660055" -- dropped tx is ... dunno ;)
94 -- dropped packets (rx DS)
96 overlay = true, -- don't summarize
97 flip = true, -- flip rx line
98 total = true, -- report total amount of bytes
99 color = "440066" -- dropped rx is violett
102 -- packet errors (tx DS)
104 overlay = true, -- don't summarize
105 total = true, -- report total amount of packets
106 color = "ff5500" -- tx errors are orange
109 -- packet errors (rx DS)
111 overlay = true, -- don't summarize
112 flip = true, -- flip rx line
113 total = true, -- report total amount of packets
114 color = "ff0000" -- rx errors are red
125 title = "%H: Netlink - Multicast on %pi",
126 vlabel = "Packets/s", detail = true,
128 -- diagram data description
131 types = { "if_multicast" },
133 -- special options for single data lines
137 total = true, -- report total amount of packets
138 color = "0000ff" -- multicast is blue
149 title = "%H: Netlink - Collisions on %pi",
150 vlabel = "Collisions/s", detail = true,
152 -- diagram data description
155 types = { "if_collisions" },
157 -- special options for single data lines
161 total = true, -- report total amount of packets
162 color = "ff0000" -- collsions are red
173 title = "%H: Netlink - Errors on %pi",
174 vlabel = "Errors/s", detail = true,
176 -- diagram data description
179 types = { "if_tx_errors", "if_rx_errors" },
181 -- data type instances
183 if_tx_errors = { "aborted", "carrier", "fifo", "heartbeat", "window" },
184 if_rx_errors = { "length", "missed", "over", "crc", "fifo", "frame" }
187 -- special options for single data lines
188 options = { -- XXX: fixme (define colors...)
202 return { traffic, packets, multicast, collisions, errors }