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.netlink", package.seeall)
6 function rrdargs( graph, plugin, plugin_instance )
12 title = "%H: Netlink - Transfer on %pi",
15 -- diagram data description
17 -- defined sources for data types, if omitted assume a single DS named "value" (optional)
19 if_octets = { "tx", "rx" }
22 -- special options for single data lines
26 total = true, -- report total amount of bytes
27 color = "00ff00" -- tx is green
32 flip = true, -- flip rx line
33 total = true, -- report total amount of bytes
34 color = "0000ff" -- rx is blue
44 title = "%H: Netlink - Packets on %pi",
45 vlabel = "Packets/s", detail = true,
47 -- diagram data description
50 types = { "if_packets", "if_dropped", "if_errors" },
52 -- defined sources for data types
54 if_packets = { "tx", "rx" },
55 if_dropped = { "tx", "rx" },
56 if_errors = { "tx", "rx" }
59 -- special options for single data lines
61 -- processed packets (tx DS)
65 overlay = true, -- don't summarize
66 total = true, -- report total amount of bytes
67 color = "00ff00" -- processed tx is green
70 -- processed packets (rx DS)
74 overlay = true, -- don't summarize
75 flip = true, -- flip rx line
76 total = true, -- report total amount of bytes
77 color = "0000ff" -- processed rx is blue
80 -- dropped packets (tx DS)
83 title = "Dropped (TX)",
84 overlay = true, -- don't summarize
85 total = true, -- report total amount of bytes
86 color = "660055" -- dropped tx is ... dunno ;)
89 -- dropped packets (rx DS)
92 title = "Dropped (RX)",
93 overlay = true, -- don't summarize
94 flip = true, -- flip rx line
95 total = true, -- report total amount of bytes
96 color = "ff00ff" -- dropped rx is violett
99 -- packet errors (tx DS)
102 title = "Errors (TX)",
103 overlay = true, -- don't summarize
104 total = true, -- report total amount of packets
105 color = "ff5500" -- tx errors are orange
108 -- packet errors (rx DS)
111 title = "Errors (RX)",
112 overlay = true, -- don't summarize
113 flip = true, -- flip rx line
114 total = true, -- report total amount of packets
115 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
138 total = true, -- report total amount of packets
139 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 title = "Collisions",
162 total = true, -- report total amount of packets
163 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
189 if_tx_errors_aborted_value = { total = true, color = "ffff00", title = "Aborted (TX)" },
190 if_tx_errors_carrier_value = { total = true, color = "ffcc00", title = "Carrier (TX)" },
191 if_tx_errors_fifo_value = { total = true, color = "ff9900", title = "Fifo (TX)" },
192 if_tx_errors_heartbeat_value = { total = true, color = "ff6600", title = "Heartbeat (TX)" },
193 if_tx_errors_window_value = { total = true, color = "ff3300", title = "Window (TX)" },
195 if_rx_errors_length_value = { flip = true, total = true, color = "ff0000", title = "Length (RX)" },
196 if_rx_errors_missed_value = { flip = true, total = true, color = "ff0033", title = "Missed (RX)" },
197 if_rx_errors_over_value = { flip = true, total = true, color = "ff0066", title = "Over (RX)" },
198 if_rx_errors_crc_value = { flip = true, total = true, color = "ff0099", title = "CRC (RX)" },
199 if_rx_errors_fifo_value = { flip = true, total = true, color = "ff00cc", title = "Fifo (RX)" },
200 if_rx_errors_frame_value = { flip = true, total = true, color = "ff00ff", title = "Frame (RX)" }
205 return { traffic, packets, multicast, collisions, errors }