2015-01-16 22:46:42 +00:00
|
|
|
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
|
2015-01-16 22:38:38 +00:00
|
|
|
-- Licensed to the public under the Apache License 2.0.
|
2008-06-03 23:15:16 +00:00
|
|
|
|
2008-05-28 19:37:20 +00:00
|
|
|
module("luci.statistics.rrdtool.definitions.interface", package.seeall)
|
|
|
|
|
2012-02-19 15:11:23 +00:00
|
|
|
function rrdargs( graph, plugin, plugin_instance )
|
2008-05-28 19:37:20 +00:00
|
|
|
|
|
|
|
--
|
|
|
|
-- traffic diagram
|
|
|
|
--
|
|
|
|
local traffic = {
|
|
|
|
|
collectd: Update luci-statistics / collectd to 5.4.1 - Luci
[PATCH 1/2] [packages] collectd: Update luci-statistics / collectd to 5.4.1 -
packages
[PATCH 2/2] [luci] collectd: Update luci-statistics / collectd to 5.4.1 - Luci
Collectd, the backbone of Luci statistics module, has been recently updated
already to 5.4.1, while Openwrt is still with 4.10.8.
5.0-5.4 branches have been released in 2011-2013 and the last Collectd
release in January 2014 only contained 5.4.1. 4.10.x is being "phased out"
and new commits have been made only rarely. No 4.10.x release for ages.
My ar71xx/wndr3700 build has been using 5.4.1 since March (and used 5.3.1
long before that).
I have compile-tested (with ar71xx) all collectd modules, and I have verified
the real-life functionality of the following plugins: Conntrack,
CPU/Processor, DNS, Interfaces, Memory, Ping, Processes, TCP Connections,
System Load, Uptime, Wireless.
The version bump requires changes both to "collectd" in the packages feed and
to "luci-statistics" in the luci feed, as some of the data items have changed
name or file structure.
I am including two separate patches: one for collectd in packages and one for
luci-statistics in Luci trunk.
Collectd:
Explanation of main changes in the patches for collectd in packages feed:
Patches to be removed:
- 120-fix_kernel_2.6.37.patch is unnecessary. The file to be patched has been
removed upstream.
- 130-timeleft-max.patch is included upstream. Patch removed.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=d5b09f2bb673ac9396da52b85bcbd16c98b3d633
Changed patches:
- 003-remove-werror.patch: Quilt choked on some -Werror related changes, so I
removed them.
- 900-add-iwinfo-plugin.patch: Changed to patch configure.ac instead of
configure.in
New patches:
- 140-fix-fqdnlookup.patch : FQDNLookup option has been turned on by default
since 5.1. If that option is enabled, it causes collectd to refuse to start
in a basic Openwrt box as typically a fully qualified domain name does not
exist for the router. (That error related can only be properly seen when
console is used to start collectd. Otherwise Luci statistics collectd simply
dies immediately after starting it.) That option should be false by default.
I included a new patch 140-fix-fqdnlookup.patch to turn the option off by
default.
http://git.verplant.org/?p=collectd.git;a=commit;h=e58f85bb68b4c45130bb6fdf40b51db95d2b71e5
- 150-fix-interface-af-link : a FreeBSD10-specific change broke build for me,
so I reverted the change.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=645dadb3fcc466e8880fda4eb23b21ad433631fc
- 905-disable-sigrok-glib: libsigrok checks for a glib-related macro that
breaks configure. Bypass the invalid macro. I have also added a disabling
option in Makefile.
Luci:
Data presentation in luci-statistics requires three changes in the Luci sources:
-conntrack result data has changed name from "entropy" to "value".
-ping result data has changed name from "ping" to "value".
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=77a6905147798210ec17173bd5e4410adcc3a112
-interface plugin has changed rrd data file structure so that the plugin
instances (=interfaces) have separate data files. Luci needs to draw the
graph for each plugin instance, not for each data instance.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=cc3640ba512862cd5745446f1f1a997dd4344454
My previous patches for upgrading to earlier 5.x series can be marked as
superseeded in Patchwork.
http://patchwork.openwrt.org/patch/2457/
http://patchwork.openwrt.org/patch/3300/
http://patchwork.openwrt.org/patch/4204/
http://patchwork.openwrt.org/patch/4205/
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2014-09-18 13:29:11 +00:00
|
|
|
-- draw this diagram for each plugin instance
|
2008-05-28 19:37:20 +00:00
|
|
|
per_instance = true,
|
collectd: Update luci-statistics / collectd to 5.4.1 - Luci
[PATCH 1/2] [packages] collectd: Update luci-statistics / collectd to 5.4.1 -
packages
[PATCH 2/2] [luci] collectd: Update luci-statistics / collectd to 5.4.1 - Luci
Collectd, the backbone of Luci statistics module, has been recently updated
already to 5.4.1, while Openwrt is still with 4.10.8.
5.0-5.4 branches have been released in 2011-2013 and the last Collectd
release in January 2014 only contained 5.4.1. 4.10.x is being "phased out"
and new commits have been made only rarely. No 4.10.x release for ages.
My ar71xx/wndr3700 build has been using 5.4.1 since March (and used 5.3.1
long before that).
I have compile-tested (with ar71xx) all collectd modules, and I have verified
the real-life functionality of the following plugins: Conntrack,
CPU/Processor, DNS, Interfaces, Memory, Ping, Processes, TCP Connections,
System Load, Uptime, Wireless.
The version bump requires changes both to "collectd" in the packages feed and
to "luci-statistics" in the luci feed, as some of the data items have changed
name or file structure.
I am including two separate patches: one for collectd in packages and one for
luci-statistics in Luci trunk.
Collectd:
Explanation of main changes in the patches for collectd in packages feed:
Patches to be removed:
- 120-fix_kernel_2.6.37.patch is unnecessary. The file to be patched has been
removed upstream.
- 130-timeleft-max.patch is included upstream. Patch removed.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=d5b09f2bb673ac9396da52b85bcbd16c98b3d633
Changed patches:
- 003-remove-werror.patch: Quilt choked on some -Werror related changes, so I
removed them.
- 900-add-iwinfo-plugin.patch: Changed to patch configure.ac instead of
configure.in
New patches:
- 140-fix-fqdnlookup.patch : FQDNLookup option has been turned on by default
since 5.1. If that option is enabled, it causes collectd to refuse to start
in a basic Openwrt box as typically a fully qualified domain name does not
exist for the router. (That error related can only be properly seen when
console is used to start collectd. Otherwise Luci statistics collectd simply
dies immediately after starting it.) That option should be false by default.
I included a new patch 140-fix-fqdnlookup.patch to turn the option off by
default.
http://git.verplant.org/?p=collectd.git;a=commit;h=e58f85bb68b4c45130bb6fdf40b51db95d2b71e5
- 150-fix-interface-af-link : a FreeBSD10-specific change broke build for me,
so I reverted the change.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=645dadb3fcc466e8880fda4eb23b21ad433631fc
- 905-disable-sigrok-glib: libsigrok checks for a glib-related macro that
breaks configure. Bypass the invalid macro. I have also added a disabling
option in Makefile.
Luci:
Data presentation in luci-statistics requires three changes in the Luci sources:
-conntrack result data has changed name from "entropy" to "value".
-ping result data has changed name from "ping" to "value".
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=77a6905147798210ec17173bd5e4410adcc3a112
-interface plugin has changed rrd data file structure so that the plugin
instances (=interfaces) have separate data files. Luci needs to draw the
graph for each plugin instance, not for each data instance.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=cc3640ba512862cd5745446f1f1a997dd4344454
My previous patches for upgrading to earlier 5.x series can be marked as
superseeded in Patchwork.
http://patchwork.openwrt.org/patch/2457/
http://patchwork.openwrt.org/patch/3300/
http://patchwork.openwrt.org/patch/4204/
http://patchwork.openwrt.org/patch/4205/
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2014-09-18 13:29:11 +00:00
|
|
|
title = "%H: Transfer on %pi",
|
2011-11-28 03:26:59 +00:00
|
|
|
vlabel = "Bytes/s",
|
2008-05-28 19:37:20 +00:00
|
|
|
|
|
|
|
-- diagram data description
|
|
|
|
data = {
|
2018-08-18 04:21:21 +00:00
|
|
|
-- defined sources for data types, if omitted assume a single DS named "value" (optional)
|
2008-05-28 19:37:20 +00:00
|
|
|
sources = {
|
|
|
|
if_octets = { "tx", "rx" }
|
|
|
|
},
|
|
|
|
|
|
|
|
-- special options for single data lines
|
|
|
|
options = {
|
|
|
|
if_octets__tx = {
|
|
|
|
total = true, -- report total amount of bytes
|
2011-11-28 03:26:59 +00:00
|
|
|
color = "00ff00", -- tx is green
|
|
|
|
title = "Bytes (TX)"
|
2008-05-28 19:37:20 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
if_octets__rx = {
|
|
|
|
flip = true, -- flip rx line
|
|
|
|
total = true, -- report total amount of bytes
|
2011-11-28 03:26:59 +00:00
|
|
|
color = "0000ff", -- rx is blue
|
|
|
|
title = "Bytes (RX)"
|
2008-05-28 19:37:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- packet diagram
|
|
|
|
--
|
|
|
|
local packets = {
|
|
|
|
|
collectd: Update luci-statistics / collectd to 5.4.1 - Luci
[PATCH 1/2] [packages] collectd: Update luci-statistics / collectd to 5.4.1 -
packages
[PATCH 2/2] [luci] collectd: Update luci-statistics / collectd to 5.4.1 - Luci
Collectd, the backbone of Luci statistics module, has been recently updated
already to 5.4.1, while Openwrt is still with 4.10.8.
5.0-5.4 branches have been released in 2011-2013 and the last Collectd
release in January 2014 only contained 5.4.1. 4.10.x is being "phased out"
and new commits have been made only rarely. No 4.10.x release for ages.
My ar71xx/wndr3700 build has been using 5.4.1 since March (and used 5.3.1
long before that).
I have compile-tested (with ar71xx) all collectd modules, and I have verified
the real-life functionality of the following plugins: Conntrack,
CPU/Processor, DNS, Interfaces, Memory, Ping, Processes, TCP Connections,
System Load, Uptime, Wireless.
The version bump requires changes both to "collectd" in the packages feed and
to "luci-statistics" in the luci feed, as some of the data items have changed
name or file structure.
I am including two separate patches: one for collectd in packages and one for
luci-statistics in Luci trunk.
Collectd:
Explanation of main changes in the patches for collectd in packages feed:
Patches to be removed:
- 120-fix_kernel_2.6.37.patch is unnecessary. The file to be patched has been
removed upstream.
- 130-timeleft-max.patch is included upstream. Patch removed.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=d5b09f2bb673ac9396da52b85bcbd16c98b3d633
Changed patches:
- 003-remove-werror.patch: Quilt choked on some -Werror related changes, so I
removed them.
- 900-add-iwinfo-plugin.patch: Changed to patch configure.ac instead of
configure.in
New patches:
- 140-fix-fqdnlookup.patch : FQDNLookup option has been turned on by default
since 5.1. If that option is enabled, it causes collectd to refuse to start
in a basic Openwrt box as typically a fully qualified domain name does not
exist for the router. (That error related can only be properly seen when
console is used to start collectd. Otherwise Luci statistics collectd simply
dies immediately after starting it.) That option should be false by default.
I included a new patch 140-fix-fqdnlookup.patch to turn the option off by
default.
http://git.verplant.org/?p=collectd.git;a=commit;h=e58f85bb68b4c45130bb6fdf40b51db95d2b71e5
- 150-fix-interface-af-link : a FreeBSD10-specific change broke build for me,
so I reverted the change.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=645dadb3fcc466e8880fda4eb23b21ad433631fc
- 905-disable-sigrok-glib: libsigrok checks for a glib-related macro that
breaks configure. Bypass the invalid macro. I have also added a disabling
option in Makefile.
Luci:
Data presentation in luci-statistics requires three changes in the Luci sources:
-conntrack result data has changed name from "entropy" to "value".
-ping result data has changed name from "ping" to "value".
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=77a6905147798210ec17173bd5e4410adcc3a112
-interface plugin has changed rrd data file structure so that the plugin
instances (=interfaces) have separate data files. Luci needs to draw the
graph for each plugin instance, not for each data instance.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=cc3640ba512862cd5745446f1f1a997dd4344454
My previous patches for upgrading to earlier 5.x series can be marked as
superseeded in Patchwork.
http://patchwork.openwrt.org/patch/2457/
http://patchwork.openwrt.org/patch/3300/
http://patchwork.openwrt.org/patch/4204/
http://patchwork.openwrt.org/patch/4205/
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2014-09-18 13:29:11 +00:00
|
|
|
-- draw this diagram for each plugin instance
|
2008-05-28 19:37:20 +00:00
|
|
|
per_instance = true,
|
collectd: Update luci-statistics / collectd to 5.4.1 - Luci
[PATCH 1/2] [packages] collectd: Update luci-statistics / collectd to 5.4.1 -
packages
[PATCH 2/2] [luci] collectd: Update luci-statistics / collectd to 5.4.1 - Luci
Collectd, the backbone of Luci statistics module, has been recently updated
already to 5.4.1, while Openwrt is still with 4.10.8.
5.0-5.4 branches have been released in 2011-2013 and the last Collectd
release in January 2014 only contained 5.4.1. 4.10.x is being "phased out"
and new commits have been made only rarely. No 4.10.x release for ages.
My ar71xx/wndr3700 build has been using 5.4.1 since March (and used 5.3.1
long before that).
I have compile-tested (with ar71xx) all collectd modules, and I have verified
the real-life functionality of the following plugins: Conntrack,
CPU/Processor, DNS, Interfaces, Memory, Ping, Processes, TCP Connections,
System Load, Uptime, Wireless.
The version bump requires changes both to "collectd" in the packages feed and
to "luci-statistics" in the luci feed, as some of the data items have changed
name or file structure.
I am including two separate patches: one for collectd in packages and one for
luci-statistics in Luci trunk.
Collectd:
Explanation of main changes in the patches for collectd in packages feed:
Patches to be removed:
- 120-fix_kernel_2.6.37.patch is unnecessary. The file to be patched has been
removed upstream.
- 130-timeleft-max.patch is included upstream. Patch removed.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=d5b09f2bb673ac9396da52b85bcbd16c98b3d633
Changed patches:
- 003-remove-werror.patch: Quilt choked on some -Werror related changes, so I
removed them.
- 900-add-iwinfo-plugin.patch: Changed to patch configure.ac instead of
configure.in
New patches:
- 140-fix-fqdnlookup.patch : FQDNLookup option has been turned on by default
since 5.1. If that option is enabled, it causes collectd to refuse to start
in a basic Openwrt box as typically a fully qualified domain name does not
exist for the router. (That error related can only be properly seen when
console is used to start collectd. Otherwise Luci statistics collectd simply
dies immediately after starting it.) That option should be false by default.
I included a new patch 140-fix-fqdnlookup.patch to turn the option off by
default.
http://git.verplant.org/?p=collectd.git;a=commit;h=e58f85bb68b4c45130bb6fdf40b51db95d2b71e5
- 150-fix-interface-af-link : a FreeBSD10-specific change broke build for me,
so I reverted the change.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=645dadb3fcc466e8880fda4eb23b21ad433631fc
- 905-disable-sigrok-glib: libsigrok checks for a glib-related macro that
breaks configure. Bypass the invalid macro. I have also added a disabling
option in Makefile.
Luci:
Data presentation in luci-statistics requires three changes in the Luci sources:
-conntrack result data has changed name from "entropy" to "value".
-ping result data has changed name from "ping" to "value".
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=77a6905147798210ec17173bd5e4410adcc3a112
-interface plugin has changed rrd data file structure so that the plugin
instances (=interfaces) have separate data files. Luci needs to draw the
graph for each plugin instance, not for each data instance.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=cc3640ba512862cd5745446f1f1a997dd4344454
My previous patches for upgrading to earlier 5.x series can be marked as
superseeded in Patchwork.
http://patchwork.openwrt.org/patch/2457/
http://patchwork.openwrt.org/patch/3300/
http://patchwork.openwrt.org/patch/4204/
http://patchwork.openwrt.org/patch/4205/
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2014-09-18 13:29:11 +00:00
|
|
|
title = "%H: Packets on %pi",
|
2011-11-28 03:26:59 +00:00
|
|
|
vlabel = "Packets/s",
|
2008-05-28 19:37:20 +00:00
|
|
|
|
|
|
|
-- diagram data description
|
|
|
|
data = {
|
|
|
|
-- data type order
|
|
|
|
types = { "if_packets", "if_errors" },
|
|
|
|
|
|
|
|
-- defined sources for data types
|
|
|
|
sources = {
|
|
|
|
if_packets = { "tx", "rx" },
|
|
|
|
if_errors = { "tx", "rx" }
|
|
|
|
},
|
|
|
|
|
|
|
|
-- special options for single data lines
|
|
|
|
options = {
|
|
|
|
-- processed packets (tx DS)
|
|
|
|
if_packets__tx = {
|
2015-10-05 17:11:51 +00:00
|
|
|
weight = 1,
|
2008-05-28 19:37:20 +00:00
|
|
|
overlay = true, -- don't summarize
|
|
|
|
total = true, -- report total amount of bytes
|
2011-11-28 03:26:59 +00:00
|
|
|
color = "00ff00", -- processed tx is green
|
2015-10-05 17:11:51 +00:00
|
|
|
title = "Processed (TX)"
|
2008-05-28 19:37:20 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
-- processed packets (rx DS)
|
|
|
|
if_packets__rx = {
|
2015-10-05 17:11:51 +00:00
|
|
|
weight = 2,
|
2008-05-28 19:37:20 +00:00
|
|
|
overlay = true, -- don't summarize
|
|
|
|
flip = true, -- flip rx line
|
|
|
|
total = true, -- report total amount of bytes
|
2011-11-28 03:26:59 +00:00
|
|
|
color = "0000ff", -- processed rx is blue
|
2015-10-05 17:11:51 +00:00
|
|
|
title = "Processed (RX)"
|
2008-05-28 19:37:20 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
-- packet errors (tx DS)
|
|
|
|
if_errors__tx = {
|
2015-10-05 17:11:51 +00:00
|
|
|
weight = 0,
|
2008-05-28 19:37:20 +00:00
|
|
|
overlay = true, -- don't summarize
|
|
|
|
total = true, -- report total amount of packets
|
2011-11-28 03:26:59 +00:00
|
|
|
color = "ff5500", -- tx errors are orange
|
2015-10-05 17:11:51 +00:00
|
|
|
title = "Errors (TX)"
|
2008-05-28 19:37:20 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
-- packet errors (rx DS)
|
|
|
|
if_errors__rx = {
|
2015-10-05 17:11:51 +00:00
|
|
|
weight = 3,
|
2008-05-28 19:37:20 +00:00
|
|
|
overlay = true, -- don't summarize
|
|
|
|
flip = true, -- flip rx line
|
|
|
|
total = true, -- report total amount of packets
|
2011-11-28 03:26:59 +00:00
|
|
|
color = "ff0000", -- rx errors are red
|
2015-10-05 17:11:51 +00:00
|
|
|
title = "Errors (RX)"
|
2008-05-28 19:37:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return { traffic, packets }
|
|
|
|
end
|