When collectd's modbus plugin was marked broken in May, there was some
discussion on list if collectd (used by Luci statistics) should be bumped up
from the currently used old 4.10 branch (4.10.7) to the 5.1 released in
April. See https://lists.openwrt.org/pipermail/openwrt-devel/2012-May/015524.html
I have attempted to do that, but with only partial success.
I have successfully compiled collectd 5.1.0 with all non-broken plugins for
ar71xx, but not all plugins seem to actually work. Some of the basic network
related plugins like "ping" and "conntrack" produce empty output. So, the
bump seems to require some extra work.
Some notes in case others want to continue experimenting:
- FQDNLookup option has been turned on by default in 5.1 (See
http://git.verplant.org/?p=collectd.git;a=commit;h=e58f85bb68b4c45130bb6fdf40b51db95d2b71e5
). That seems to cause collectd to refuse to start in a basic Openwrt box.
(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 patch
140-fix-fqdnlookup-option.patch to revert the change.
- quilt choked on some -Werror related patches, so I removed them from
003-remove-werror.patch.
- 120-fix_kernel_2.6.37.patch seems to be unnecessary. I removed it.
Current version of my bump patch is included.
Index: packages/utils/collectd/Makefile
===================================================================
--- packages/utils/collectd/Makefile (revision 32887)
+++ packages/utils/collectd/Makefile (working copy)
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=collectd
-PKG_VERSION:=4.10.7
-PKG_RELEASE:=2
+PKG_VERSION:=5.1.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://collectd.org/files/
-PKG_MD5SUM:=f4193fdb5002ddac8159c88032a726bc
+PKG_MD5SUM:=141570150b4608c0c567330f6f146e0f
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
@@ -22,11 +22,14 @@
PKG_BUILD_PARALLEL:=1
COLLECTD_PLUGINS_DISABLED:= \
+ amqp \
apple_sensors \
battery \
cpufreq \
curl_json \
+ curl_xml \
entropy \
+ ethstat \
genericjmx \
gmond \
hddtemp \
@@ -34,7 +37,9 @@
ipvs \
java \
libvirt \
+ lpar \
mbmon \
+ md \
memcachec \
memcached \
monitorus \
@@ -43,11 +48,13 @@
nfs \
notify_desktop \
notify_email \
+ numa \
openvz \
oracle \
perl \
pinba \
python \
+ redis \
routeros \
rrdcached \
serial \
@@ -56,6 +63,8 @@
tokyotyrant \
uuid \
vserver \
+ write_graphite \
+ write_mongodb \
xmms \
zfs_arc \
@@ -104,11 +113,11 @@
sensors \
snmp \
syslog \
+ table \
tail \
- table \
- ted \
tcpconns \
teamspeak2 \
+ ted \
thermal \
unixsock \
uptime \
Index: packages/utils/collectd/files/collectd.conf
===================================================================
--- packages/utils/collectd/files/collectd.conf (revision 32887)
+++ packages/utils/collectd/files/collectd.conf (working copy)
@@ -5,7 +5,7 @@
#
#Hostname "localhost"
-#FQDNLookup true
+#FQDNLookup false
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
#PluginDir "/usr/lib/collectd"
Index: packages/utils/collectd/patches/130-fix_netlink_kernel_3.3-patch
===================================================================
--- packages/utils/collectd/patches/130-fix_netlink_kernel_3.3-patch
(revision 32887)
+++ packages/utils/collectd/patches/130-fix_netlink_kernel_3.3-patch
(working copy)
@@ -1,8 +1,6 @@
-Index: collectd-4.10.7/src/netlink.c
-===================================================================
---- collectd-4.10.7.orig/src/netlink.c 2012-04-01 16:20:24.000000000 +0200
-+++ collectd-4.10.7/src/netlink.c 2012-06-07 17:22:16.212616882 +0200
-@@ -223,7 +223,7 @@
+--- a/src/netlink.c
++++ b/src/netlink.c
+@@ -223,7 +223,7 @@ static int link_filter (const struct soc
msg = NLMSG_DATA (nmh);
@@ -11,7 +9,7 @@
if (msg_len < 0)
{
ERROR ("netlink plugin: link_filter: msg_len = %i < 0;", msg_len);
-@@ -554,24 +554,19 @@
+@@ -554,24 +554,19 @@ static int ir_init (void)
static int ir_read (void)
{
@@ -38,7 +36,7 @@
{
ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed.");
return (-1);
-@@ -608,8 +603,7 @@
+@@ -608,8 +603,7 @@ static int ir_read (void)
continue;
}
Index: packages/utils/collectd/patches/140-fix-fqdnlookup-option.patch
===================================================================
--- packages/utils/collectd/patches/140-fix-fqdnlookup-option.patch
(revision 0)
+++ packages/utils/collectd/patches/140-fix-fqdnlookup-option.patch
(revision 0)
@@ -0,0 +1,11 @@
+--- a/src/configfile.c
++++ b/src/configfile.c
+@@ -95,7 +95,7 @@ static cf_global_option_t cf_global_opti
+ {"BaseDir", NULL, PKGLOCALSTATEDIR},
+ {"PIDFile", NULL, PIDFILE},
+ {"Hostname", NULL, NULL},
+- {"FQDNLookup", NULL, "true"},
++ {"FQDNLookup", NULL, "false"},
+ {"Interval", NULL, "10"},
+ {"ReadThreads", NULL, "5"},
+ {"Timeout", NULL, "2"},
Index: packages/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch
===================================================================
--- packages/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch
(revision 32887)
+++ packages/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch
(working copy)
@@ -17,7 +17,7 @@
/* consolidation_functions = */ NULL,
/* consolidation_functions_num = */ 0
};
-@@ -1027,6 +1030,14 @@ static int rrd_config (const char *key,
+@@ -1060,6 +1063,14 @@ static int rrd_config (const char *key,
free (value_copy);
}
@@ -34,7 +34,7 @@
double tmp = atof (value);
--- a/src/utils_rrdcreate.c
+++ b/src/utils_rrdcreate.c
-@@ -122,6 +122,9 @@ static int rra_get (char ***ret, const v
+@@ -125,6 +125,9 @@ static int rra_get (char ***ret, const v
rts_num = rra_timespans_num;
}
Index: packages/utils/collectd/patches/120-fix_kernel_2.6.37.patch
===================================================================
--- packages/utils/collectd/patches/120-fix_kernel_2.6.37.patch (revision 32887)
+++ packages/utils/collectd/patches/120-fix_kernel_2.6.37.patch (working copy)
@@ -1,78 +0,0 @@
---- a/src/owniptc/libiptc.c
-+++ b/src/owniptc/libiptc.c
-@@ -81,11 +81,11 @@ static const char *hooknames[] = {
- };
-
- /* Convenience structures */
--struct ipt_error_target
-+ struct ipt_error_target2
- {
- STRUCT_ENTRY_TARGET t;
- char error[TABLE_MAXNAMELEN];
--};
-+};
-
- struct chain_head;
- struct rule_head;
-@@ -1007,10 +1007,10 @@ static int parse_table(TC_HANDLE_T h)
- /* Convenience structures */
- struct iptcb_chain_start{
- STRUCT_ENTRY e;
-- struct ipt_error_target name;
-+ struct ipt_error_target2 name;
- };
- #define IPTCB_CHAIN_START_SIZE (sizeof(STRUCT_ENTRY) +
\
-- ALIGN(sizeof(struct ipt_error_target)))
-+ ALIGN(sizeof(struct ipt_error_target2)))
-
- struct iptcb_chain_foot {
- STRUCT_ENTRY e;
-@@ -1021,10 +1021,10 @@ struct iptcb_chain_foot {
-
- struct iptcb_chain_error {
- STRUCT_ENTRY entry;
-- struct ipt_error_target target;
-+ struct ipt_error_target2 target;
- };
- #define IPTCB_CHAIN_ERROR_SIZE (sizeof(STRUCT_ENTRY) +
\
-- ALIGN(sizeof(struct ipt_error_target)))
-+ ALIGN(sizeof(struct ipt_error_target2)))
-
-
-
-@@ -1069,7 +1069,7 @@ static int iptcc_compile_chain(TC_HANDLE
- head->e.next_offset = IPTCB_CHAIN_START_SIZE;
- strcpy(head->name.t.u.user.name, ERROR_TARGET);
- head->name.t.u.target_size =
-- ALIGN(sizeof(struct ipt_error_target));
-+ ALIGN(sizeof(struct ipt_error_target2));
- strcpy(head->name.error, c->name);
- } else {
- repl->hook_entry[c->hooknum-1] = c->head_offset;
-@@ -1113,7 +1113,7 @@ static int iptcc_compile_chain_offsets(T
- if (!iptcc_is_builtin(c)) {
- /* Chain has header */
- *offset += sizeof(STRUCT_ENTRY)
-- + ALIGN(sizeof(struct ipt_error_target));
-+ + ALIGN(sizeof(struct ipt_error_target2));
- (*num)++;
- }
-
-@@ -1153,7 +1153,7 @@ static int iptcc_compile_table_prep(TC_H
- /* Append one error rule at end of chain */
- num++;
- offset += sizeof(STRUCT_ENTRY)
-- + ALIGN(sizeof(struct ipt_error_target));
-+ + ALIGN(sizeof(struct ipt_error_target2));
-
- /* ruleset size is now in offset */
- *size = offset;
-@@ -1177,7 +1177,7 @@ static int iptcc_compile_table(TC_HANDLE
- error->entry.target_offset = sizeof(STRUCT_ENTRY);
- error->entry.next_offset = IPTCB_CHAIN_ERROR_SIZE;
- error->target.t.u.user.target_size =
-- ALIGN(sizeof(struct ipt_error_target));
-+ ALIGN(sizeof(struct ipt_error_target2));
- strcpy((char *)&error->target.t.u.user.name, ERROR_TARGET);
- strcpy((char *)&error->target.error, "ERROR");
-
Index: packages/utils/collectd/patches/900-add-iwinfo-plugin.patch
===================================================================
--- packages/utils/collectd/patches/900-add-iwinfo-plugin.patch (revision 32887)
+++ packages/utils/collectd/patches/900-add-iwinfo-plugin.patch (working copy)
@@ -1,6 +1,6 @@
--- a/configure.in
+++ b/configure.in
-@@ -490,6 +490,9 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [],
+@@ -536,6 +536,9 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [],
have_termios_h="no"
AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
@@ -10,7 +10,7 @@
#
# Checks for typedefs, structures, and compiler characteristics.
#
-@@ -4008,6 +4011,7 @@ plugin_interface="no"
+@@ -4482,6 +4485,7 @@ plugin_interface="no"
plugin_ipmi="no"
plugin_ipvs="no"
plugin_irq="no"
@@ -18,7 +18,7 @@
plugin_libvirt="no"
plugin_load="no"
plugin_memory="no"
-@@ -4315,6 +4319,7 @@ AC_PLUGIN([ipmi], [$plugin_ipmi],
+@@ -4806,6 +4810,7 @@ AC_PLUGIN([ipmi], [$plugin_ipmi],
AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
@@ -26,7 +26,7 @@
AC_PLUGIN([java], [$with_java], [Embed the Java Virtual
Machine])
AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
AC_PLUGIN([load], [$plugin_load], [System load])
-@@ -4593,6 +4598,7 @@ Configuration:
+@@ -5097,6 +5102,7 @@ Configuration:
protobuf-c . . . . . $have_protoc_c
oracle . . . . . . . $with_oracle
python . . . . . . . $with_python
@@ -34,7 +34,7 @@
Features:
daemon mode . . . . . $enable_daemon
-@@ -4632,6 +4638,7 @@ Configuration:
+@@ -5138,6 +5144,7 @@ Configuration:
iptables . . . . . . $enable_iptables
ipvs . . . . . . . . $enable_ipvs
irq . . . . . . . . . $enable_irq
@@ -44,7 +44,7 @@
load . . . . . . . . $enable_load
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
-@@ -82,6 +82,7 @@ FQDNLookup true
+@@ -84,6 +84,7 @@
#@BUILD_PLUGIN_IPMI_TRUE@LoadPlugin ipmi
#@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
#@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
@@ -52,7 +52,7 @@
#@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
#@BUILD_PLUGIN_LIBVIRT_TRUE@LoadPlugin libvirt
@BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
-@@ -376,6 +377,12 @@ FQDNLookup true
+@@ -403,6 +404,12 @@
# IgnoreSelected true
#</Plugin>
@@ -67,7 +67,7 @@
# JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
-@@ -1468,6 +1468,27 @@ and all other interrupts are collected.
+@@ -1628,6 +1628,27 @@ and all other interrupts are collected.
=back
@@ -250,7 +250,7 @@
+}
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -454,6 +454,15 @@ collectd_LDADD += "-dlopen" irq.la
+@@ -479,6 +479,15 @@ collectd_LDADD += "-dlopen" irq.la
collectd_DEPENDENCIES += irq.la
endif
@@ -268,8 +268,11 @@
java_la_SOURCES = java.c
--- a/src/types.db
+++ b/src/types.db
-@@ -171,3 +171,4 @@ voltage value:GAUGE:U:U
+@@ -178,6 +178,7 @@ voltage value:GAUGE:U:U
vs_memory value:GAUGE:0:9223372036854775807
vs_processes value:GAUGE:0:65535
vs_threads value:GAUGE:0:65535
+stations value:GAUGE:0:256
+ #
+ # Legacy types
+ # (required for the v5 upgrade target)
Index: packages/utils/collectd/patches/200-fix-git-describe-error.patch
===================================================================
--- packages/utils/collectd/patches/200-fix-git-describe-error.patch
(revision 32887)
+++ packages/utils/collectd/patches/200-fix-git-describe-error.patch
(working copy)
@@ -2,7 +2,7 @@
+++ b/version-gen.sh
@@ -2,7 +2,7 @@
- DEFAULT_VERSION="4.10.7.git"
+ DEFAULT_VERSION="5.1.0.git"
-VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
+#VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
Index: packages/utils/collectd/patches/003-remove-werror.patch
===================================================================
--- packages/utils/collectd/patches/003-remove-werror.patch (revision 32887)
+++ packages/utils/collectd/patches/003-remove-werror.patch (working copy)
@@ -1,6 +1,6 @@
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -7,7 +7,7 @@ SUBDIRS += liboconfig
+@@ -4,7 +4,7 @@ SUBDIRS += liboconfig
endif
if COMPILER_IS_GCC
@@ -9,17 +9,6 @@
endif
AM_CPPFLAGS = -DPREFIX='"${prefix}"'
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -1836,7 +1836,7 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- SUBDIRS = libcollectdclient $(am__append_1) $(am__append_2)
--@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror
-+@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall
- AM_CPPFLAGS = -DPREFIX='"${prefix}"' \
- -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
- -DLOCALSTATEDIR='"${localstatedir}"' \
--- a/src/libcollectdclient/Makefile.am
+++ b/src/libcollectdclient/Makefile.am
@@ -1,7 +1,7 @@
@@ -31,36 +20,3 @@
endif
pkginclude_HEADERS = client.h lcc_features.h
---- a/src/libcollectdclient/Makefile.in
-+++ b/src/libcollectdclient/Makefile.in
-@@ -329,7 +329,7 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = foreign no-dependencies
--@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror
-+@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall
- pkginclude_HEADERS = client.h lcc_features.h
- lib_LTLIBRARIES = libcollectdclient.la
- nodist_pkgconfig_DATA = libcollectdclient.pc
---- a/src/owniptc/Makefile.am
-+++ b/src/owniptc/Makefile.am
-@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = foreign no-dependenci
- EXTRA_DIST = libiptc.c README.collectd
-
- if COMPILER_IS_GCC
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- endif
-
- noinst_LTLIBRARIES = libiptc.la
---- a/src/owniptc/Makefile.in
-+++ b/src/owniptc/Makefile.in
-@@ -298,7 +298,7 @@ top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = foreign no-dependencies
- EXTRA_DIST = libiptc.c README.collectd
--@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror
-+@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall
- noinst_LTLIBRARIES = libiptc.la
- libiptc_la_SOURCES = libip4tc.c libip6tc.c \
- ipt_kernel_headers.h libip6tc.h libiptc.h linux_list.h \
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel