1 /* Licensed to the public under the Apache License 2.0. */
5 return L.Class.extend({
8 rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
13 title: "%H: Netlink - Transfer on %pi",
16 /* diagram data description */
18 /* defined sources for data types, if omitted assume a single DS named "value" (optional) */
20 if_octets: [ "tx", "rx" ]
23 /* special options for single data lines */
27 total: true, /* report total amount of bytes */
28 color: "00ff00" /* tx is green */
33 flip : true, /* flip rx line */
34 total: true, /* report total amount of bytes */
35 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 */
126 title: "%H: Netlink - Multicast on %pi",
127 vlabel: "Packets/s", detail: true,
129 /* diagram data description */
131 /* data type order */
132 types: [ "if_multicast" ],
134 /* special options for single data lines */
136 /* multicast packets */
139 total: true, /* report total amount of packets */
140 color: "0000ff" /* multicast is blue */
150 title: "%H: Netlink - Collisions on %pi",
151 vlabel: "Collisions/s", detail: true,
153 /* diagram data description */
155 /* data type order */
156 types: [ "if_collisions" ],
158 /* special options for single data lines */
163 total: true, /* report total amount of packets */
164 color: "ff0000" /* collsions are red */
174 title: "%H: Netlink - Errors on %pi",
175 vlabel: "Errors/s", detail: true,
177 /* diagram data description */
179 /* data type order */
180 types: [ "if_tx_errors", "if_rx_errors" ],
182 /* data type instances */
184 if_tx_errors: [ "aborted", "carrier", "fifo", "heartbeat", "window" ],
185 if_rx_errors: [ "length", "missed", "over", "crc", "fifo", "frame" ]
188 /* special options for single data lines */
190 if_tx_errors_aborted_value : { total: true, color: "ffff00", title: "Aborted (TX)" },
191 if_tx_errors_carrier_value : { total: true, color: "ffcc00", title: "Carrier (TX)" },
192 if_tx_errors_fifo_value : { total: true, color: "ff9900", title: "Fifo (TX)" },
193 if_tx_errors_heartbeat_value: { total: true, color: "ff6600", title: "Heartbeat (TX)" },
194 if_tx_errors_window_value : { total: true, color: "ff3300", title: "Window (TX)" },
196 if_rx_errors_length_value : { flip: true, total: true, color: "ff0000", title: "Length (RX)" },
197 if_rx_errors_missed_value : { flip: true, total: true, color: "ff0033", title: "Missed (RX)" },
198 if_rx_errors_over_value : { flip: true, total: true, color: "ff0066", title: "Over (RX)" },
199 if_rx_errors_crc_value : { flip: true, total: true, color: "ff0099", title: "CRC (RX)" },
200 if_rx_errors_fifo_value : { flip: true, total: true, color: "ff00cc", title: "Fifo (RX)" },
201 if_rx_errors_frame_value : { flip: true, total: true, color: "ff00ff", title: "Frame (RX)" }
206 return [ traffic, packets, multicast, collisions, errors ];