include $(TOPDIR)/rules.mk
PKG_NAME:=collectd
-PKG_VERSION:=5.5.3
-PKG_RELEASE:=2
+PKG_VERSION:=5.7.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://collectd.org/files/
-PKG_MD5SUM:=6f10633d0f73f99ef61472a8e377d4a058de161e80f3353b4b17d394c68f2f44
+PKG_SOURCE_URL:=https://collectd.org/files/ \
+ https://github.com/collectd/collectd/releases/download/collectd-$(PKG_VERSION)
+PKG_HASH:=7edd3643c0842215553b2421d5456f4e9a8a58b07e216b40a7e8e91026d8e501
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
-PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
+PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>, Hannu Nyman <hannu.nyman@iki.fi>
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
battery \
ceph \
cgroups \
+ chrony \
+ cpusleep \
curl_json \
curl_xml \
dbi \
+ dpdkstat \
drbd \
ethstat \
fhcount \
genericjmx \
gmond \
+ gps \
+ grpc \
hddtemp \
+ hugepages \
+ intel_rdt \
ipc \
ipmi \
ipvs \
java \
log_logstash \
+ lua \
lvm \
lpar \
mbmon \
memcached \
mic \
monitorus \
+ mqtt \
multimeter \
netapp \
nfs \
notify_desktop \
notify_email \
+ notify_nagios \
numa \
openldap \
openvz \
write_kafka \
write_log \
write_mongodb \
+ write_prometheus \
write_redis \
write_riemann \
write_sensu \
write_tsdb \
+ xencpu \
xmms \
zfs_arc \
+ zone \
zookeeper
COLLECTD_PLUGINS_SELECTED:= \
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Lightweight system statistics collection daemon
- URL:=http://verplant.org/collectd/
+ URL:=https://collectd.org/
endef
define Package/collectd
# common configure args
CONFIGURE_ARGS+= \
+ --disable-werror \
--disable-debug \
--enable-daemon \
--with-nan-emulation \
+++ /dev/null
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -7,7 +7,7 @@ SUBDIRS += daemon
- PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\<module_register\>'
-
- if COMPILER_IS_GCC
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- endif
-
- AM_CPPFLAGS = -I$(srcdir)/daemon
---- a/src/libcollectdclient/Makefile.am
-+++ b/src/libcollectdclient/Makefile.am
-@@ -1,7 +1,7 @@
- AUTOMAKE_OPTIONS = foreign no-dependencies
-
- if COMPILER_IS_GCC
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- endif
-
- pkginclude_HEADERS = collectd/client.h collectd/network.h collectd/network_buffer.h collectd/lcc_features.h
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
-@@ -82,6 +82,7 @@ static const char *config_keys[] =
- "HeartBeat",
- "RRARows",
- "RRATimespan",
-+ "RRASingle",
- "XFF",
- "WritesPerSecond",
- "RandomTimeout"
-@@ -103,6 +104,8 @@ static rrdcreate_config_t rrdcreate_conf
- /* timespans = */ NULL,
- /* timespans_num = */ 0,
-
-+ /* rrasingle = */ 0,
+@@ -61,6 +61,7 @@ typedef struct rrd_queue_s rrd_queue_t;
+ static const char *config_keys[] = {
+ "CacheTimeout", "CacheFlush", "CreateFilesAsync", "DataDir",
+ "StepSize", "HeartBeat", "RRARows", "RRATimespan",
++ "RRASingle",
+ "XFF", "WritesPerSecond", "RandomTimeout"};
+ static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
+
+@@ -78,6 +79,8 @@ static rrdcreate_config_t rrdcreate_conf
+ /* timespans = */ NULL,
+ /* timespans_num = */ 0,
+
++ /* rrasingle = */ 0,
+
- /* consolidation_functions = */ NULL,
- /* consolidation_functions_num = */ 0,
+ /* consolidation_functions = */ NULL,
+ /* consolidation_functions_num = */ 0,
-@@ -1110,6 +1113,14 @@ static int rrd_config (const char *key,
+@@ -971,6 +974,12 @@ static int rrd_config(const char *key, c
+ /* compar = */ rrd_compare_numeric);
- free (value_copy);
- }
-+ else if (strcasecmp ("RRASingle", key) == 0)
-+ {
+ free(value_copy);
++ } else if (strcasecmp ("RRASingle", key) == 0) {
+ if (IS_TRUE (value))
+ {
+ rrdcreate_config.rrasingle = 1;
+ NOTICE ("rrdtool plugin: RRASingle = true: creating only AVERAGE RRAs");
+ }
-+ }
- else if (strcasecmp ("XFF", key) == 0)
- {
- double tmp = atof (value);
+ } else if (strcasecmp("XFF", key) == 0) {
+ double tmp = atof(value);
+ if ((tmp < 0.0) || (tmp >= 1.0)) {
--- a/src/utils_rrdcreate.c
+++ b/src/utils_rrdcreate.c
-@@ -213,6 +213,9 @@ static int rra_get (char ***ret, const v
+@@ -180,6 +180,9 @@ static int rra_get(char ***ret, const va
rts_num = rra_timespans_num;
}
+ rra_types_num = 1;
+
rra_max = rts_num * rra_types_num;
- assert (rra_max > 0);
+ assert(rra_max > 0);
--- a/src/utils_rrdcreate.h
+++ b/src/utils_rrdcreate.h
-@@ -41,6 +41,8 @@ struct rrdcreate_config_s
+@@ -40,6 +40,8 @@ struct rrdcreate_config_s {
int *timespans;
size_t timespans_num;
--- a/src/daemon/configfile.c
+++ b/src/daemon/configfile.c
-@@ -111,7 +111,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, NULL},
- {"ReadThreads", NULL, "5"},
- {"WriteThreads", NULL, "5"},
+@@ -104,7 +104,7 @@ static cf_global_option_t cf_global_opti
+ {"BaseDir", NULL, 0, PKGLOCALSTATEDIR},
+ {"PIDFile", NULL, 0, PIDFILE},
+ {"Hostname", NULL, 0, NULL},
+- {"FQDNLookup", NULL, 0, "true"},
++ {"FQDNLookup", NULL, 0, "false"},
+ {"Interval", NULL, 0, NULL},
+ {"ReadThreads", NULL, 0, "5"},
+ {"WriteThreads", NULL, 0, "5"},
+++ /dev/null
---- a/version-gen.sh
-+++ b/version-gen.sh
-@@ -2,7 +2,7 @@
-
- DEFAULT_VERSION="5.5.3.git"
-
--VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
-+#VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
-
- if test -z "$VERSION"; then
- VERSION="$DEFAULT_VERSION"
--- a/src/daemon/plugin.c
+++ b/src/daemon/plugin.c
-@@ -1149,7 +1149,7 @@ static int plugin_insert_read (read_func
- int status;
- llentry_t *le;
+@@ -1108,7 +1108,7 @@ static int plugin_insert_read(read_func_
+ int status;
+ llentry_t *le;
-- rf->rf_next_read = cdtime ();
-+ rf->rf_next_read = cdtime () + (cdtime_t) 1073741824; //delay first read 1s
- rf->rf_effective_interval = rf->rf_interval;
+- rf->rf_next_read = cdtime();
++ rf->rf_next_read = cdtime() + (cdtime_t) 1073741824; //delay first read 1s
+ rf->rf_effective_interval = rf->rf_interval;
- pthread_mutex_lock (&read_lock);
+ pthread_mutex_lock(&read_lock);
--- a/src/olsrd.c
+++ b/src/olsrd.c
-@@ -658,7 +658,7 @@ static int olsrd_read (void) /* {{{ */
+@@ -585,7 +585,7 @@ static int olsrd_read(void) /* {{{ */
if (fh == NULL)
return (-1);
-- fputs ("\r\n", fh);
-+ fputs ("/all \r\n", fh);
- fflush (fh);
+- fputs("\r\n", fh);
++ fputs("/all \r\n", fh);
+ fflush(fh);
- while (fgets (buffer, sizeof (buffer), fh) != NULL)
+ while (fgets(buffer, sizeof(buffer), fh) != NULL) {
--- a/configure.ac
+++ b/configure.ac
-@@ -2627,7 +2627,7 @@ then
+@@ -3186,7 +3186,7 @@ then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
--- a/configure.ac
+++ b/configure.ac
-@@ -705,6 +705,9 @@ AC_CHECK_HEADERS(net/pfvar.h,
- have_termios_h="no"
- AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
+@@ -804,6 +804,9 @@ AC_CACHE_CHECK([whether clock_boottime a
+ [c_cv_have_clock_boottime_monotonic="no"]))
+
+# For the iwinfo plugin
+AC_CHECK_LIB(iwinfo, iwinfo_backend, [with_iwinfo="yes"], [with_iwinfo="no (libiwinfo not found)"], [])
# For the turbostat plugin
have_asm_msrindex_h="no"
AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"])
-@@ -5310,6 +5313,7 @@ plugin_interface="no"
+@@ -5946,6 +5949,7 @@ plugin_interface="no"
plugin_ipmi="no"
plugin_ipvs="no"
plugin_irq="no"
plugin_load="no"
plugin_log_logstash="no"
plugin_memory="no"
-@@ -5713,6 +5717,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])
-+AC_PLUGIN([iwinfo], [$with_iwinfo], [Common iwinfo wireless statistics])
- AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
- AC_PLUGIN([load], [$plugin_load], [System load])
- AC_PLUGIN([logfile], [yes], [File logging plugin])
-@@ -6042,6 +6047,7 @@ Configuration:
- oracle . . . . . . . $with_oracle
- protobuf-c . . . . . $have_protoc_c
- python . . . . . . . $with_python
-+ iwinfo . . . . . . . $with_iwinfo
-
- Features:
- daemon mode . . . . . $enable_daemon
-@@ -6091,6 +6097,7 @@ Configuration:
- iptables . . . . . . $enable_iptables
- ipvs . . . . . . . . $enable_ipvs
- irq . . . . . . . . . $enable_irq
-+ iwinfo . . . . . . . $enable_iwinfo
- java . . . . . . . . $enable_java
- load . . . . . . . . $enable_load
- logfile . . . . . . . $enable_logfile
+@@ -6416,6 +6420,7 @@ AC_PLUGIN([ipmi], [$plugi
+ AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
+ AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
+ AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
++AC_PLUGIN([iwinfo], [$with_iwinfo], [Common iwinfo wireless statistics])
+ AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
+ AC_PLUGIN([load], [$plugin_load], [System load])
+ AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging])
+@@ -6797,6 +6802,7 @@ AC_MSG_RESULT([ libyajl . . . . . . .
+ AC_MSG_RESULT([ oracle . . . . . . . $with_oracle])
+ AC_MSG_RESULT([ protobuf-c . . . . . $have_protoc_c])
+ AC_MSG_RESULT([ protoc 3 . . . . . . $have_protoc3])
++AC_MSG_RESULT([ iwinfo . . . . . . . $with_iwinfo])
+ AC_MSG_RESULT()
+ AC_MSG_RESULT([ Features:])
+ AC_MSG_RESULT([ daemon mode . . . . . $enable_daemon])
+@@ -6853,6 +6859,7 @@ AC_MSG_RESULT([ ipmi . . . . . . . .
+ AC_MSG_RESULT([ iptables . . . . . . $enable_iptables])
+ AC_MSG_RESULT([ ipvs . . . . . . . . $enable_ipvs])
+ AC_MSG_RESULT([ irq . . . . . . . . . $enable_irq])
++AC_MSG_RESULT([ iwinfo . . . . . . . $enable_iwinfo])
+ AC_MSG_RESULT([ java . . . . . . . . $enable_java])
+ AC_MSG_RESULT([ load . . . . . . . . $enable_load])
+ AC_MSG_RESULT([ logfile . . . . . . . $enable_logfile])
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
-@@ -128,6 +128,7 @@
+@@ -135,6 +135,7 @@
#@BUILD_PLUGIN_IPTABLES_TRUE@LoadPlugin iptables
#@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
#@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
#@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
@BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
#@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar
-@@ -582,6 +583,12 @@
+@@ -649,6 +650,12 @@
# IgnoreSelected true
#</Plugin>
# JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
-@@ -2612,6 +2612,27 @@ and all other interrupts are collected.
+@@ -3127,6 +3127,27 @@ and all other interrupts are collected.
=back
+}
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -457,6 +457,13 @@ irq_la_SOURCES = irq.c
+@@ -568,6 +568,13 @@ irq_la_SOURCES = irq.c
irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
endif
java_la_SOURCES = java.c
--- a/src/types.db
+++ b/src/types.db
-@@ -228,6 +228,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
+@@ -260,6 +260,7 @@ voltage_threshold 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
--- a/src/ping.c
+++ b/src/ping.c
-@@ -655,7 +655,7 @@ static int ping_read (void) /* {{{ */
- / ((double) (pkg_recv * (pkg_recv - 1))));
+@@ -635,7 +635,7 @@ static int ping_read(void) /* {{{ */
+ ((double)(pkg_recv * (pkg_recv - 1))));
/* Calculate drop rate. */
-- droprate = ((double) (pkg_sent - pkg_recv)) / ((double) pkg_sent);
-+ droprate = ((double) (pkg_sent - pkg_recv)) * 100 / ((double) pkg_sent);
+- droprate = ((double)(pkg_sent - pkg_recv)) / ((double)pkg_sent);
++ droprate = ((double)(pkg_sent - pkg_recv)) * 100 / ((double)pkg_sent);
- submit (hl->host, "ping", latency_average);
- submit (hl->host, "ping_stddev", latency_stddev);
+ submit(hl->host, "ping", latency_average);
+ submit(hl->host, "ping_stddev", latency_stddev);