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 ommitted 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
45 title = "%H: Netlink - Packets on %pi",
46 vlabel = "Packets/s", detail = true,
48 -- diagram data description
51 types = { "if_packets", "if_dropped", "if_errors" },
53 -- defined sources for data types
55 if_packets = { "tx", "rx" },
56 if_dropped = { "tx", "rx" },
57 if_errors = { "tx", "rx" }
60 -- special options for single data lines
62 -- 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)
73 overlay = true, -- don't summarize
74 flip = true, -- flip rx line
75 total = true, -- report total amount of bytes
76 color = "0000ff" -- processed rx is blue
79 -- dropped packets (tx DS)
81 title = "Dropped (TX)",
82 overlay = true, -- don't summarize
83 total = true, -- report total amount of bytes
84 color = "660055" -- dropped tx is ... dunno ;)
87 -- dropped packets (rx DS)
89 title = "Dropped (RX)",
90 overlay = true, -- don't summarize
91 flip = true, -- flip rx line
92 total = true, -- report total amount of bytes
93 color = "ff00ff" -- dropped rx is violett
96 -- packet errors (tx DS)
98 title = "Errors (TX)",
99 overlay = true, -- don't summarize
100 total = true, -- report total amount of packets
101 color = "ff5500" -- tx errors are orange
104 -- packet errors (rx DS)
106 title = "Errors (RX)",
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
121 title = "%H: Netlink - Multicast on %pi",
122 vlabel = "Packets/s", detail = true,
124 -- diagram data description
127 types = { "if_multicast" },
129 -- special options for single data lines
134 total = true, -- report total amount of packets
135 color = "0000ff" -- multicast is blue
146 title = "%H: Netlink - Collisions on %pi",
147 vlabel = "Collisions/s", detail = true,
149 -- diagram data description
152 types = { "if_collisions" },
154 -- special options for single data lines
158 title = "Collisions",
159 total = true, -- report total amount of packets
160 color = "ff0000" -- collsions are red
171 title = "%H: Netlink - Errors on %pi",
172 vlabel = "Errors/s", detail = true,
174 -- diagram data description
177 types = { "if_tx_errors", "if_rx_errors" },
179 -- data type instances
181 if_tx_errors = { "aborted", "carrier", "fifo", "heartbeat", "window" },
182 if_rx_errors = { "length", "missed", "over", "crc", "fifo", "frame" }
185 -- special options for single data lines
187 if_tx_errors_aborted_value = { total = true, color = "ffff00", title = "Aborted (TX)" },
188 if_tx_errors_carrier_value = { total = true, color = "ffcc00", title = "Carrier (TX)" },
189 if_tx_errors_fifo_value = { total = true, color = "ff9900", title = "Fifo (TX)" },
190 if_tx_errors_heartbeat_value = { total = true, color = "ff6600", title = "Heartbeat (TX)" },
191 if_tx_errors_window_value = { total = true, color = "ff3300", title = "Window (TX)" },
193 if_rx_errors_length_value = { flip = true, total = true, color = "ff0000", title = "Length (RX)" },
194 if_rx_errors_missed_value = { flip = true, total = true, color = "ff0033", title = "Missed (RX)" },
195 if_rx_errors_over_value = { flip = true, total = true, color = "ff0066", title = "Over (RX)" },
196 if_rx_errors_crc_value = { flip = true, total = true, color = "ff0099", title = "CRC (RX)" },
197 if_rx_errors_fifo_value = { flip = true, total = true, color = "ff00cc", title = "Fifo (RX)" },
198 if_rx_errors_frame_value = { flip = true, total = true, color = "ff00ff", title = "Frame (RX)" }
204 return { traffic, packets, multicast, collisions, errors }