luci/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/snmp6.js
Nick Hainke c7756834b7 luci-app-statistics: add snmp6 collector
Add IPv6 statistics.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-01-09 18:53:01 +02:00

92 lines
1.5 KiB
JavaScript

/* Licensed to the public under the Apache License 2.0. */
'use strict';
'require baseclass';
return baseclass.extend({
title: _('SNMP6'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
var traffic = {
title: "%H: IPv6 on %pi",
vlabel: "Bytes/s",
data: {
sources: {
if_octets: [ "tx", "rx" ]
},
options: {
if_octets__tx: {
title: "Bytes (TX)",
total: true,
color: "00ff00"
},
if_octets__rx: {
title: "Bytes (RX)",
flip : true,
total: true,
color: "0000ff"
}
}
}
};
var mcast_traffic = {
title: "%H: IPv6 Multicast-Traffic on %pi",
vlabel: "Bytes/s",
data: {
sources: {
if_octets_mcast: [ "tx", "rx" ]
},
options: {
if_octets_mcast__tx: {
title: "Bytes (TX)",
total: true,
color: "00ff00"
},
if_octets_mcast__rx: {
title: "Bytes (RX)",
flip : true,
total: true,
color: "0000ff"
}
}
}
};
var bcast_traffic = {
title: "%H: IPv6 Broadcast-Traffic on %pi",
vlabel: "Bytes/s",
data: {
sources: {
if_octets_bcast: [ "tx", "rx" ]
},
options: {
if_octets_bcast__tx: {
title: "Bytes (TX)",
total: true,
color: "00ff00"
},
if_octets_bcast__rx: {
title: "Bytes (RX)",
flip : true,
total: true,
color: "0000ff"
}
}
}
};
return [ traffic, mcast_traffic, bcast_traffic ]
}
});