Browse Source

collectd: update to 5.7.1

Update collectd to version 5.7.1

* replace 003-remove-werror.patch with configure option
* remove 200-fix-git-describe-error.patch that is now unnecessary
* reformat other patches due to whitespace changes
* add new plugins to the list as disabled

* correct download & homepage links
* add myself as the second maintainer

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
lilik-openwrt-22.03
Hannu Nyman 8 years ago
parent
commit
2fc5a82b48
10 changed files with 111 additions and 131 deletions
  1. +21
    -6
      utils/collectd/Makefile
  2. +0
    -22
      utils/collectd/patches/003-remove-werror.patch
  3. +25
    -27
      utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch
  4. +9
    -9
      utils/collectd/patches/140-fix-fqdnlookup.patch
  5. +0
    -11
      utils/collectd/patches/200-fix-git-describe-error.patch
  6. +7
    -7
      utils/collectd/patches/300-delay-first-read-cycle.patch
  7. +5
    -5
      utils/collectd/patches/400-fix-olsrd-get-all.patch
  8. +1
    -1
      utils/collectd/patches/600-fix-libmodbus-detection.patch
  9. +37
    -37
      utils/collectd/patches/900-add-iwinfo-plugin.patch
  10. +6
    -6
      utils/collectd/patches/920-fix-ping-droprate.patch

+ 21
- 6
utils/collectd/Makefile View File

@ -8,16 +8,17 @@
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
@ -31,20 +32,28 @@ COLLECTD_PLUGINS_DISABLED:= \
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 \
@ -53,11 +62,13 @@ COLLECTD_PLUGINS_DISABLED:= \
memcached \
mic \
monitorus \
mqtt \
multimeter \
netapp \
nfs \
notify_desktop \
notify_email \
notify_nagios \
numa \
openldap \
openvz \
@ -84,12 +95,15 @@ COLLECTD_PLUGINS_DISABLED:= \
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:= \
@ -163,7 +177,7 @@ define Package/collectd/Default
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Lightweight system statistics collection daemon
URL:=http://verplant.org/collectd/
URL:=https://collectd.org/
endef
define Package/collectd
@ -191,6 +205,7 @@ endif
# common configure args
CONFIGURE_ARGS+= \
--disable-werror \
--disable-debug \
--enable-daemon \
--with-nan-emulation \


+ 0
- 22
utils/collectd/patches/003-remove-werror.patch View File

@ -1,22 +0,0 @@
--- 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

+ 25
- 27
utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch View File

@ -1,40 +1,38 @@
--- 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;
}
@ -42,11 +40,11 @@
+ 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;


+ 9
- 9
utils/collectd/patches/140-fix-fqdnlookup.patch View File

@ -1,11 +1,11 @@
--- 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"},

+ 0
- 11
utils/collectd/patches/200-fix-git-describe-error.patch View File

@ -1,11 +0,0 @@
--- 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"

+ 7
- 7
utils/collectd/patches/300-delay-first-read-cycle.patch View File

@ -1,11 +1,11 @@
--- 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);

+ 5
- 5
utils/collectd/patches/400-fix-olsrd-get-all.patch View File

@ -1,11 +1,11 @@
--- 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) {

+ 1
- 1
utils/collectd/patches/600-fix-libmodbus-detection.patch View File

@ -18,7 +18,7 @@ Reversed patch to be applied:
--- a/configure.ac
+++ b/configure.ac
@@ -2627,7 +2627,7 @@ then
@@ -3186,7 +3186,7 @@ then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"


+ 37
- 37
utils/collectd/patches/900-add-iwinfo-plugin.patch View File

@ -1,8 +1,8 @@
--- 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)"], [])
@ -10,7 +10,7 @@
# 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"
@ -18,33 +18,33 @@
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
@ -52,7 +52,7 @@
#@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>
@ -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
@@ -2612,6 +2612,27 @@ and all other interrupts are collected.
@@ -3127,6 +3127,27 @@ and all other interrupts are collected.
=back
@ -250,7 +250,7 @@
+}
--- 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
@ -266,11 +266,11 @@
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

+ 6
- 6
utils/collectd/patches/920-fix-ping-droprate.patch View File

@ -1,11 +1,11 @@
--- 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);

Loading…
Cancel
Save