collectd: Update luci-statistics / collectd to 5.4.1 - Luci
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Sep 2014 13:29:11 +0000 (13:29 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Sep 2014 13:29:11 +0000 (13:29 +0000)
[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>
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/interface.lua
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping.lua

index 449a4e2..0da546c 100644 (file)
@@ -22,7 +22,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                number_format = "%5.0lf",
                data = {
                        sources = {
-                               conntrack = { "entropy" }
+                               conntrack = { "value" }
                        },
                        options = {
                                conntrack = { 
index 9b698d2..a6f3b5c 100644 (file)
@@ -22,9 +22,9 @@ function rrdargs( graph, plugin, plugin_instance )
        --
        local traffic = {
 
-               -- draw this diagram for each data instance
+               -- draw this diagram for each plugin instance
                per_instance = true,
-               title = "%H: Transfer on %di",
+               title = "%H: Transfer on %pi",
                vlabel = "Bytes/s",
 
                -- diagram data description
@@ -58,9 +58,9 @@ function rrdargs( graph, plugin, plugin_instance )
        --
        local packets = {
 
-               -- draw this diagram for each data instance
+               -- draw this diagram for each plugin instance
                per_instance = true,
-               title = "%H: Packets on %di",
+               title = "%H: Packets on %pi",
                vlabel = "Packets/s",
 
                -- diagram data description
index 5707f3a..bdffc85 100644 (file)
@@ -20,7 +20,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                -- Ping roundtrip time
                { title = "%H: ICMP Round Trip Time", vlabel = "ms",
                  number_format = "%5.1lf ms", data = {
-                       sources = { ping = { "ping" } },
+                       sources = { ping = { "value" } },
                        options = { ping__ping = { noarea = true, title = "%di" } }
                } },