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)
66 overlay = true, -- don't summarize
67 total = true, -- report total amount of bytes
68 color = "00ff00" -- processed tx is green
71 -- processed packets (rx DS)
75 overlay = true, -- don't summarize
76 flip = true, -- flip rx line
77 total = true, -- report total amount of bytes
78 color = "0000ff" -- processed rx is blue
81 -- dropped packets (tx DS)
84 title = "Dropped (TX)",
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)
93 title = "Dropped (RX)",
94 overlay = true, -- don't summarize
95 flip = true, -- flip rx line
96 total = true, -- report total amount of bytes
97 color = "ff00ff" -- dropped rx is violett
100 -- packet errors (tx DS)
103 title = "Errors (TX)",
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)
112 title = "Errors (RX)",
113 overlay = true, -- don't summarize
114 flip = true, -- flip rx line
115 total = true, -- report total amount of packets
116 color = "ff0000" -- rx errors are red
127 title = "%H: Netlink - Multicast on %pi",
128 vlabel = "Packets/s", detail = true,
130 -- diagram data description
133 types = { "if_multicast" },
135 -- special options for single data lines
140 total = true, -- report total amount of packets
141 color = "0000ff" -- multicast is blue
152 title = "%H: Netlink - Collisions on %pi",
153 vlabel = "Collisions/s", detail = true,
155 -- diagram data description
158 types = { "if_collisions" },
160 -- special options for single data lines
164 title = "Collisions",
165 total = true, -- report total amount of packets
166 color = "ff0000" -- collsions are red
177 title = "%H: Netlink - Errors on %pi",
178 vlabel = "Errors/s", detail = true,
180 -- diagram data description
183 types = { "if_tx_errors", "if_rx_errors" },
185 -- data type instances
187 if_tx_errors = { "aborted", "carrier", "fifo", "heartbeat", "window" },
188 if_rx_errors = { "length", "missed", "over", "crc", "fifo", "frame" }
191 -- special options for single data lines
193 if_tx_errors_aborted_value = { total = true, color = "ffff00", title = "Aborted (TX)" },
194 if_tx_errors_carrier_value = { total = true, color = "ffcc00", title = "Carrier (TX)" },
195 if_tx_errors_fifo_value = { total = true, color = "ff9900", title = "Fifo (TX)" },
196 if_tx_errors_heartbeat_value = { total = true, color = "ff6600", title = "Heartbeat (TX)" },
197 if_tx_errors_window_value = { total = true, color = "ff3300", title = "Window (TX)" },
199 if_rx_errors_length_value = { flip = true, total = true, color = "ff0000", title = "Length (RX)" },
200 if_rx_errors_missed_value = { flip = true, total = true, color = "ff0033", title = "Missed (RX)" },
201 if_rx_errors_over_value = { flip = true, total = true, color = "ff0066", title = "Over (RX)" },
202 if_rx_errors_crc_value = { flip = true, total = true, color = "ff0099", title = "CRC (RX)" },
203 if_rx_errors_fifo_value = { flip = true, total = true, color = "ff00cc", title = "Fifo (RX)" },
204 if_rx_errors_frame_value = { flip = true, total = true, color = "ff00ff", title = "Frame (RX)" }
210 return { traffic, packets, multicast, collisions, errors }