collectd.git
6 years agoMerge pull request #2684 from rpv-tomsk/fix-2673
Pavel Rochnyak [Sat, 10 Feb 2018 11:23:08 +0000 (18:23 +0700)]
Merge pull request #2684 from rpv-tomsk/fix-2673

write_prometheus: Set SO_REUSEADDR on listening socket

6 years agoMerge pull request #2613 from elfiesmelfie/update_dpdk_note
Pavel Rochnyak [Sat, 10 Feb 2018 11:19:02 +0000 (18:19 +0700)]
Merge pull request #2613 from elfiesmelfie/update_dpdk_note

docs: update dpdkstats documentation

6 years agowrite_prometheus: Set SO_REUSEADDR on listening socket
Pavel Rochnyack [Sat, 10 Feb 2018 10:46:30 +0000 (17:46 +0700)]
write_prometheus: Set SO_REUSEADDR on listening socket

Otherwise Collectd fails to bind the socket after restart.

Thanks to Richard Weinberger and Brandon Hume for reporting.

Closes: #2570
Closes: #2673

6 years agoAuto-Merge pull request #2683 from rpv-tomsk/fix-2607
collectd bot [Sat, 10 Feb 2018 10:12:50 +0000 (11:12 +0100)]
Auto-Merge pull request #2683 from rpv-tomsk/fix-2607

Automatically merged due to "Automerge" label

6 years agowrite_kafka: 'rd_kafka_errno2err' is deprecated, fix failed builds
Pavel Rochnyack [Sat, 10 Feb 2018 09:20:41 +0000 (09:20 +0000)]
write_kafka: 'rd_kafka_errno2err' is deprecated, fix failed builds

Since librdkafka-0.11.0 applications should use rd_kafka_last_error()
to retrieve the error code from the legacy APIs.

Thanks to hikdo.

Closes: #2607
Closes: #2628
Closes: #2640

6 years agoUpdate BUILD.dpdkstat.md
Maryam Tahhan [Fri, 26 Jan 2018 11:41:57 +0000 (11:41 +0000)]
Update BUILD.dpdkstat.md

fixed trailing word "Version"

6 years agodocs: dpdk extended the initial note
Maryam Tahhan [Tue, 12 Dec 2017 16:36:52 +0000 (16:36 +0000)]
docs: dpdk extended the initial note

6 years agodocs: update dpdkstats documentation
Maryam Tahhan [Mon, 11 Dec 2017 16:14:20 +0000 (16:14 +0000)]
docs: update dpdkstats documentation

Update the dpdkstats documentation to state that it shouldn't be used with
OVS-with-DPDK. The Open vSwitch plugins is what should be used.

Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
6 years agoliboconfig: Coding style changes.
Florian Forster [Tue, 5 Dec 2017 15:58:29 +0000 (16:58 +0100)]
liboconfig: Coding style changes.

Mostly whitespace.

6 years agoliboconfig: Improve error handling.
Florian Forster [Tue, 5 Dec 2017 15:56:53 +0000 (16:56 +0100)]
liboconfig: Improve error handling.

  * Use the YYERROR macro instead of exit(3).
  * Remove newlines from strings passed to yyerror().
  * Change return valud or yyerror() from int to void.

6 years agoliboconfig: Check return values of calloc() and realloc().
Florian Forster [Tue, 5 Dec 2017 15:53:34 +0000 (16:53 +0100)]
liboconfig: Check return values of calloc() and realloc().

CID: 38123

6 years agoemail plugin: Avoid strtok_r to tokenize input.
Florian Forster [Tue, 5 Dec 2017 15:50:33 +0000 (16:50 +0100)]
email plugin: Avoid strtok_r to tokenize input.

Coverity (wrongly) thinks that "type" might have been NULL (since its
first argument is non-NULL, this cannot happen). It has a point about
insufficient NULL-ness checks, though, as "tmp" may very well be NULL and
we're passing it to atoi() which will likely not take this well.

CID: 37988

6 years agotable plugin: Add explicit NULL checks to clear functions.
Florian Forster [Mon, 4 Dec 2017 07:18:33 +0000 (08:18 +0100)]
table plugin: Add explicit NULL checks to clear functions.

CID: 37966

6 years agoexec plugin: Check return value of plugin_thread_create().
Florian Forster [Fri, 1 Dec 2017 20:05:00 +0000 (21:05 +0100)]
exec plugin: Check return value of plugin_thread_create().

CID: 37942, 37943

6 years agorrdtool plugin: Check return value of c_avl_get().
Florian Forster [Fri, 1 Dec 2017 19:45:04 +0000 (20:45 +0100)]
rrdtool plugin: Check return value of c_avl_get().

CID: 37940

6 years agoAuto-Merge pull request #2589 from octo/cid/37960
collectd bot [Fri, 1 Dec 2017 15:14:57 +0000 (16:14 +0100)]
Auto-Merge pull request #2589 from octo/cid/37960

Automatically merged due to "Automerge" label

6 years agoAuto-Merge pull request #2588 from octo/cid/37968
collectd bot [Fri, 1 Dec 2017 14:20:59 +0000 (15:20 +0100)]
Auto-Merge pull request #2588 from octo/cid/37968

Automatically merged due to "Automerge" label

6 years agocontrib/format.sh src/perl.c
Florian Forster [Fri, 1 Dec 2017 13:59:55 +0000 (14:59 +0100)]
contrib/format.sh src/perl.c

6 years agopowerdns plugin: Remove the unused ret_buffer_size argument …
Florian Forster [Fri, 1 Dec 2017 13:18:50 +0000 (14:18 +0100)]
powerdns plugin: Remove the unused ret_buffer_size argument …

… from powerdns_get_data().

6 years agoperl plugin: Fix exporting notification meta data.
Florian Forster [Fri, 1 Dec 2017 13:30:23 +0000 (14:30 +0100)]
perl plugin: Fix exporting notification meta data.

Previously, the while loop ensured that meta was NULL, causing the for
loop to never been executed. This introduces a new temporary variable to
avoid changing meta before the for loop.

CID: 37960

6 years agopowerdns plugin: Declare variables on first use.
Florian Forster [Fri, 1 Dec 2017 11:06:26 +0000 (12:06 +0100)]
powerdns plugin: Declare variables on first use.

6 years agopowerdns plugin: Ensure powerdns_get_data() returns a non-NULL buffer.
Florian Forster [Fri, 1 Dec 2017 11:05:21 +0000 (12:05 +0100)]
powerdns plugin: Ensure powerdns_get_data() returns a non-NULL buffer.

Coverity is concerned that if buffer is NULL, strtok_r() is called with
two NULL arguments, causing a NULL pointer dereference.

CID: 37968

6 years agoAuto-Merge pull request #2580 from octo/cid/179235
collectd bot [Tue, 28 Nov 2017 08:32:33 +0000 (09:32 +0100)]
Auto-Merge pull request #2580 from octo/cid/179235

Automatically merged due to "Automerge" label

6 years agocontrib/format.sh src/aggregation.c
Florian Forster [Tue, 28 Nov 2017 07:24:14 +0000 (08:24 +0100)]
contrib/format.sh src/aggregation.c

6 years agoaggregation plugin: Check return value of config functions.
Florian Forster [Tue, 28 Nov 2017 07:21:48 +0000 (08:21 +0100)]
aggregation plugin: Check return value of config functions.

CID: 179235

6 years agoaggregation plugin: Declare variables on initialization.
Florian Forster [Tue, 28 Nov 2017 07:17:05 +0000 (08:17 +0100)]
aggregation plugin: Declare variables on initialization.

6 years agoAuto-Merge pull request #2575 from octo/cid/37934
collectd bot [Sat, 25 Nov 2017 08:18:51 +0000 (09:18 +0100)]
Auto-Merge pull request #2575 from octo/cid/37934

Automatically merged due to "Automerge" label

6 years agoping plugin: Lock the mutex later.
Florian Forster [Sat, 25 Nov 2017 07:28:35 +0000 (08:28 +0100)]
ping plugin: Lock the mutex later.

Coverity gets confused if holding the lock while allocating pingobj.

CID: 37934

6 years agoAuto-Merge pull request #2568 from octo/cid/157645
collectd bot [Wed, 22 Nov 2017 07:14:52 +0000 (08:14 +0100)]
Auto-Merge pull request #2568 from octo/cid/157645

Automatically merged due to "Automerge" label

6 years agoset target: Fix memory leak.
Florian Forster [Wed, 22 Nov 2017 06:47:14 +0000 (07:47 +0100)]
set target: Fix memory leak.

CID: 157645

6 years agoAuto-Merge pull request #2565 from octo/cid/37966
collectd bot [Mon, 20 Nov 2017 14:10:07 +0000 (15:10 +0100)]
Auto-Merge pull request #2565 from octo/cid/37966

Automatically merged due to "Automerge" label

6 years agotable plugin: Refactor realloc() calls.
Florian Forster [Mon, 20 Nov 2017 13:26:41 +0000 (14:26 +0100)]
table plugin: Refactor realloc() calls.

Increase the number of elements in the successful path only, instead of
increasing it immediately and decreasing on error.

6 years agotable plugin: Assert that result_num is zero when result is NULL.
Florian Forster [Mon, 20 Nov 2017 13:19:46 +0000 (14:19 +0100)]
table plugin: Assert that result_num is zero when result is NULL.

The Coverity check gets confused by the `tbl->results == NULL` check:
due to the check, is assumes that tbl->results *may* be NULL. It then
discovers the dereference in tbl_clear() without realizing that "result"
and "result_num" are linked and that situation can't happen. This
assertion makes this link a bit easier to conclude.

CID: 37966

6 years agoAuto-Merge pull request #2563 from octo/cid/179225
collectd bot [Mon, 20 Nov 2017 12:06:19 +0000 (13:06 +0100)]
Auto-Merge pull request #2563 from octo/cid/179225

Automatically merged due to "Automerge" label

6 years agoAuto-Merge pull request #2561 from octo/cid/157643
collectd bot [Mon, 20 Nov 2017 11:36:14 +0000 (12:36 +0100)]
Auto-Merge pull request #2561 from octo/cid/157643

Automatically merged due to "Automerge" label

6 years agoAuto-Merge pull request #2560 from octo/cid/179237
collectd bot [Mon, 20 Nov 2017 11:15:53 +0000 (12:15 +0100)]
Auto-Merge pull request #2560 from octo/cid/179237

Automatically merged due to "Automerge" label

6 years agoAuto-Merge pull request #2559 from octo/cid/179236
collectd bot [Mon, 20 Nov 2017 10:42:03 +0000 (11:42 +0100)]
Auto-Merge pull request #2559 from octo/cid/179236

Automatically merged due to "Automerge" label

6 years agogps plugin: Properly unlock mutex after waiting.
Florian Forster [Mon, 20 Nov 2017 10:21:41 +0000 (11:21 +0100)]
gps plugin: Properly unlock mutex after waiting.

How did this ever work?!

CID: 158522

6 years agowrite_tsdb plugin: Unlock mutex before destroying it.
Florian Forster [Mon, 20 Nov 2017 10:19:52 +0000 (11:19 +0100)]
write_tsdb plugin: Unlock mutex before destroying it.

CID: 179224

6 years agowrite_graphite plugin: Unlock mutex before destroying it.
Florian Forster [Mon, 20 Nov 2017 10:18:32 +0000 (11:18 +0100)]
write_graphite plugin: Unlock mutex before destroying it.

CID: 179225

6 years agoset target: Ensure that int being cast to size_t is positive or zero.
Florian Forster [Mon, 20 Nov 2017 10:04:01 +0000 (11:04 +0100)]
set target: Ensure that int being cast to size_t is positive or zero.

CID: 157643

6 years agowrite_sensu plugin: Unlock mutex before destroying it.
Florian Forster [Mon, 20 Nov 2017 09:50:51 +0000 (10:50 +0100)]
write_sensu plugin: Unlock mutex before destroying it.

CID: 179237

6 years agosrc/utils_format_json.c: Check return values of yajl_gen_* functions.
Florian Forster [Mon, 20 Nov 2017 09:43:10 +0000 (10:43 +0100)]
src/utils_format_json.c: Check return values of yajl_gen_* functions.

CID: 179228, 179236, 179239

6 years agoAuto-Merge pull request #2554 from octo/cid/179227
collectd bot [Fri, 17 Nov 2017 17:20:21 +0000 (18:20 +0100)]
Auto-Merge pull request #2554 from octo/cid/179227

Automatically merged due to "Automerge" label

6 years agowrite_riemann plugin: Unlock mutex before destroying it.
Florian Forster [Fri, 17 Nov 2017 16:16:39 +0000 (17:16 +0100)]
write_riemann plugin: Unlock mutex before destroying it.

CID: 179227

6 years agoAuto-Merge pull request #2547 from octo/cid/81390
collectd bot [Fri, 17 Nov 2017 15:08:50 +0000 (16:08 +0100)]
Auto-Merge pull request #2547 from octo/cid/81390

Automatically merged due to "Automerge" label

6 years agogps plugin: Fix double unlock.
Florian Forster [Fri, 17 Nov 2017 14:15:32 +0000 (15:15 +0100)]
gps plugin: Fix double unlock.

CID: 179241

6 years agosnmp plugin: Ensure that index is within bounds.
Florian Forster [Fri, 17 Nov 2017 13:56:06 +0000 (14:56 +0100)]
snmp plugin: Ensure that index is within bounds.

CID: 81389, 81390

6 years agoAuto-Merge pull request #2545 from octo/turbostat
collectd bot [Fri, 17 Nov 2017 12:15:19 +0000 (13:15 +0100)]
Auto-Merge pull request #2545 from octo/turbostat

Automatically merged due to "Automerge" label

6 years agocontrib/format.sh src/msr-index.h src/turbostat.c
Florian Forster [Fri, 17 Nov 2017 10:51:43 +0000 (11:51 +0100)]
contrib/format.sh src/msr-index.h src/turbostat.c

6 years agomsr-index: include GPLv2 header
Vincent Brillault [Tue, 26 Sep 2017 17:34:03 +0000 (19:34 +0200)]
msr-index: include GPLv2 header

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoturbostat: import msr-index header from linux
Vincent Brillault [Mon, 25 Sep 2017 19:21:45 +0000 (21:21 +0200)]
turbostat: import msr-index header from linux

Since Linux 4.12, the kernel does not expose msr-index.h to the userland
anymore. This commit pulls and hardcode the required definitions.

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agosrc/daemon/meta_data.c: Fix double unlock.
Florian Forster [Wed, 15 Nov 2017 21:31:47 +0000 (22:31 +0100)]
src/daemon/meta_data.c: Fix double unlock.

CID: 179245

6 years agoFix documentation typo for PostgreSQL plugin
Feike Steenbergen [Wed, 15 Nov 2017 07:46:57 +0000 (08:46 +0100)]
Fix documentation typo for PostgreSQL plugin

In collectd/src/postgresql_default.conf the name for the backends
query is plural, yet in the documentation it is singular. This caused
me some lost time when running this plugin.

It is also wrongly listed on the wiki:

https://collectd.org/wiki/index.php/Plugin:PostgreSQL
Signed-off-by: Florian Forster <octo@collectd.org>
6 years agopostgresql: fix last sum() related parse errors
Marc Fournier [Wed, 8 Nov 2017 16:26:51 +0000 (17:26 +0100)]
postgresql: fix last sum() related parse errors

These queries return empty values when a database doesn't have any
tables yet, which results in collectd logging this error every Interval:

```
db query utils: udb_result_submit: Parsing `' as derive failed.
```

Related to #1905

6 years agoAuto-Merge pull request #2518 from octo/issue/2510
collectd bot [Sun, 5 Nov 2017 06:26:30 +0000 (07:26 +0100)]
Auto-Merge pull request #2518 from octo/issue/2510

Automatically merged due to "Automerge" label

6 years agonetlink plugin: Improve error reporting for mnl_attr_validate2() and mnl_socket_recvf...
Florian Forster [Sun, 5 Nov 2017 05:23:24 +0000 (06:23 +0100)]
netlink plugin: Improve error reporting for mnl_attr_validate2() and mnl_socket_recvfrom().

Issue: #2510

6 years agoMerge branch 'collectd-5.6' into collectd-5.7
Pavel Rochnyack [Fri, 20 Oct 2017 13:54:09 +0000 (20:54 +0700)]
Merge branch 'collectd-5.6' into collectd-5.7

6 years ago[2475] write_prometheus plugin: Fix port listening
tcarreira [Thu, 12 Oct 2017 15:37:28 +0000 (16:37 +0100)]
[2475] write_prometheus plugin: Fix port listening

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agowrite_prometheus plugin: Implement logging callback.
Florian Forster [Tue, 10 Oct 2017 20:38:05 +0000 (22:38 +0200)]
write_prometheus plugin: Implement logging callback.

6 years agomemcached: Fix CPU usage reporting collectd-5.6
Pavel Rochnyack [Mon, 9 Oct 2017 10:22:00 +0000 (17:22 +0700)]
memcached: Fix CPU usage reporting

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agostatsd: Document collectd behaviour when receiving the 0.000 timer value
Pavel Rochnyack [Sun, 20 Mar 2016 08:51:26 +0000 (14:51 +0600)]
statsd: Document collectd behaviour when receiving the 0.000 timer value

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agocollectd-python(5): Fix documentation of Notification.dispatch().
Mytnyk, VolodymyrX [Thu, 5 Jan 2017 17:14:07 +0000 (17:14 +0000)]
collectd-python(5): Fix documentation of Notification.dispatch().

Cherry-picked from PR #2135
Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoMerge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Fri, 6 Oct 2017 07:50:06 +0000 (09:50 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7

6 years agoBump version to 5.6.3; Update ChangeLog. collectd-5.6.3
Florian Forster [Fri, 6 Oct 2017 06:53:37 +0000 (08:53 +0200)]
Bump version to 5.6.3; Update ChangeLog.

6 years agoMerge remote-tracking branch 'github/pr/2466' into collectd-5.7
Florian Forster [Fri, 6 Oct 2017 05:26:57 +0000 (07:26 +0200)]
Merge remote-tracking branch 'github/pr/2466' into collectd-5.7

6 years agowrite_prometheus plugin: Don't construct struct sockaddr_in6 manually.
Florian Forster [Thu, 5 Oct 2017 20:17:46 +0000 (22:17 +0200)]
write_prometheus plugin: Don't construct struct sockaddr_in6 manually.

On FreeBSD, the struct is an incomplete type.

6 years agowrite_prometheus plugin: Add support for libmicrohttpd < 0.9.0.
Florian Forster [Thu, 5 Oct 2017 18:17:21 +0000 (20:17 +0200)]
write_prometheus plugin: Add support for libmicrohttpd < 0.9.0.

0.9.0 was released in July 2010, yet Precise, which we're still building for,
ships 0.4.6. *sigh*

6 years agowrite_prometheus plugin: Fall back to IPv4 socket if IPv6 fails.
Florian Forster [Thu, 5 Oct 2017 13:23:28 +0000 (15:23 +0200)]
write_prometheus plugin: Fall back to IPv4 socket if IPv6 fails.

Unfortunately, for libmicrohttpd "dual stack" means "enforce IPv6 (but
allow IPv4, too)". That means that on systems without IPv6,
libmicrohttpd'd initialization fails (when the dual stack flag is set).
To work around this limitation we open the socket ourselves and pass it
to libmicrohttpd to use.

Fixes: #2149

6 years agoMerge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Fri, 29 Sep 2017 11:05:26 +0000 (13:05 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7

6 years agodbi plugin: Fix additional memory leaks.
Florian Forster [Fri, 29 Sep 2017 06:44:22 +0000 (08:44 +0200)]
dbi plugin: Fix additional memory leaks.

6 years agodbi plugin: Fix memory leak.
Pavel Rochnyack [Thu, 12 May 2016 10:24:00 +0000 (16:24 +0600)]
dbi plugin: Fix memory leak.

Some memory was leaked when shutting down.

This is a partial back-port of 5ee365a.

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoMerge remote-tracking branch 'github/pr/2451' into collectd-5.6
Florian Forster [Wed, 27 Sep 2017 08:23:40 +0000 (10:23 +0200)]
Merge remote-tracking branch 'github/pr/2451' into collectd-5.6

6 years agosnmp plugin: Style fix
Pavel Rochnyack [Tue, 26 Sep 2017 15:30:52 +0000 (22:30 +0700)]
snmp plugin: Style fix

Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org>
6 years agosnmp plugin: Fix double free of request PDU
Pavel Rochnyack [Wed, 31 May 2017 16:27:13 +0000 (23:27 +0700)]
snmp plugin: Fix double free of request PDU

snmp_sess_synch_response() always frees request PDU, in both case of request
error and success. If error condition occurs inside of `while (status == 0)`
loop, double free of `req` happens.

Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoemail, exec and unixsock plugins: Use _SC_GETPW_R_SIZE_MAX.
Florian Forster [Wed, 27 Sep 2017 06:07:10 +0000 (08:07 +0200)]
email, exec and unixsock plugins: Use _SC_GETPW_R_SIZE_MAX.

Fixes: #2208

6 years agoMerge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Thu, 21 Sep 2017 15:22:39 +0000 (17:22 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7

6 years agoperl plugin: Improve error message.
Florian Forster [Wed, 20 Sep 2017 17:38:10 +0000 (19:38 +0200)]
perl plugin: Improve error message.

6 years agoMerge remote-tracking branch 'github/pr/2391' into collectd-5.6
Florian Forster [Wed, 20 Sep 2017 17:34:56 +0000 (19:34 +0200)]
Merge remote-tracking branch 'github/pr/2391' into collectd-5.6

6 years agoMerge pull request #2417 from bluca/dpdk_pkgconfig_backport
Florian Forster [Mon, 18 Sep 2017 06:58:44 +0000 (08:58 +0200)]
Merge pull request #2417 from bluca/dpdk_pkgconfig_backport

configure.ac: dpdk: use pkg-config - 5.7

6 years agocollectd.spec: avoid accidentally picking an ancient/unsupported java version
Marc Fournier [Mon, 4 Sep 2017 09:51:04 +0000 (11:51 +0200)]
collectd.spec: avoid accidentally picking an ancient/unsupported java version

6 years agontpd: Correct loop offset and error calculation
Neil Wilson [Thu, 23 Feb 2017 17:03:34 +0000 (17:03 +0000)]
ntpd: Correct loop offset and error calculation

Stop the scaling calculation dropping the sign of the underlying value

Fixes: #2188

6 years agoconfigure.ac: dpdk: use pkg-config
Christian Ehrhardt [Thu, 17 Aug 2017 19:11:30 +0000 (20:11 +0100)]
configure.ac: dpdk: use pkg-config

To detect cflags and libs use the sometimes provided pkg-config for
libdpdk. That avoids build errors on systems where special flags are
needed and provided by dpdk via pkg-config, but not yet considered by
the collectd build system.

6 years agoperl plugin: Added check of proper interpreter initialization.
Pavel Rochnyack [Wed, 2 Aug 2017 05:15:50 +0000 (12:15 +0700)]
perl plugin: Added check of proper interpreter initialization.

Closes: #927

6 years agoMerge pull request #2375 from rpv-tomsk/small-fix
Ruben Kerkhof [Fri, 21 Jul 2017 19:09:58 +0000 (21:09 +0200)]
Merge pull request #2375 from rpv-tomsk/small-fix

network: Fix free() before use

6 years agonetwork: Fix free() before use
Pavel Rochnyack [Fri, 21 Jul 2017 18:06:58 +0000 (01:06 +0700)]
network: Fix free() before use

6 years agoMerge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Thu, 20 Jul 2017 07:11:09 +0000 (09:11 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7

Conflicts:
src/rrdtool.c

6 years agorrdtool plugin: Changes after review
Pavel Rochnyack [Wed, 19 Jul 2017 12:28:15 +0000 (19:28 +0700)]
rrdtool plugin: Changes after review

* Handle "CacheFlush" as a double
* Updated documentation spelling

6 years agorrdtool plugin: Respect RandomTimeout while calling CacheFlush handler
Pavel Rochnyack [Mon, 17 Jul 2017 05:26:16 +0000 (12:26 +0700)]
rrdtool plugin: Respect RandomTimeout while calling CacheFlush handler

The CacheFlush implementation does not respect RandomTimeout value.
All cache values, whose flush is deferred by RandomTimeout variance,
will be flushed. That can cause a partial or full cache flush,
depending on the value of RandomTimeout.

6 years agorrdtool plugin: Configuration check moved to init callback
Pavel Rochnyack [Mon, 17 Jul 2017 04:26:04 +0000 (11:26 +0700)]
rrdtool plugin: Configuration check moved to init callback

The "RandomTimeout" option value check moved from rrd_get_random_variation()
to rrd_init(). This will save few CPU cycles.

6 years agorrdtool plugin: Remove excessive complain
Pavel Rochnyack [Mon, 17 Jul 2017 04:15:52 +0000 (11:15 +0700)]
rrdtool plugin: Remove excessive complain

The plugin complains `Adjusting "RandomTimeout" to 0.000 seconds.` even
if no 'CacheTimeout' was set.

6 years agorrdtool plugin: Raise interval of random_variation to match documentation
Pavel Rochnyack [Mon, 17 Jul 2017 04:13:53 +0000 (11:13 +0700)]
rrdtool plugin: Raise interval of random_variation to match documentation

Documentation states what the actual timeout for each value is chosen randomly
between <CacheTimeout>-<RandomTimeout> and <CacheTimeout>+<RandomTimeout>.

The implementation did not match this.

6 years agorrdtool plugin: Fix flushing
Pavel Rochnyack [Sun, 16 Jul 2017 15:56:05 +0000 (22:56 +0700)]
rrdtool plugin: Fix flushing

* Value from wrong option was passed to rrd_cache_flush()
* Variable cache_flush_timeout was used as cdtime_t type time while value was set as simple seconds
* Added info message about CacheFlush ajusting
* Documentation updated

6 years agoMerge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Wed, 12 Jul 2017 16:58:18 +0000 (18:58 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7

6 years agocollectd.service: remove NoNewPrivileges setting
Ruben Kerkhof [Wed, 12 Jul 2017 16:54:49 +0000 (18:54 +0200)]
collectd.service: remove NoNewPrivileges setting

There are various issues with it in combination with SELinux.
See https://marc.info/?l=selinux&m=149971836431361&w=2 for some
background.

6 years agoMerge pull request #2357 from rpv-tomsk/issue-2305
Ruben Kerkhof [Wed, 12 Jul 2017 15:44:34 +0000 (17:44 +0200)]
Merge pull request #2357 from rpv-tomsk/issue-2305

Fixed failed compilation on AIX

6 years agoFixed failed compilation on AIX
Pavel Rochnyack [Tue, 11 Jul 2017 04:08:56 +0000 (11:08 +0700)]
Fixed failed compilation on AIX

Caused by typo in 2761915bed8c6caea41018be3e675aa712cc0b0a / #1842.

Closes: #2305

6 years agoMerge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Fri, 7 Jul 2017 16:40:55 +0000 (18:40 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7

6 years agoMerge pull request #2341 from rpv-tomsk/issue-2328
Ruben Kerkhof [Tue, 4 Jul 2017 15:27:03 +0000 (17:27 +0200)]
Merge pull request #2341 from rpv-tomsk/issue-2328

curl plugins: Use configured URL for all poll cycles

6 years agocurl plugins: Use configured URL for all poll cycles
Pavel Rochnyack [Tue, 4 Jul 2017 10:31:46 +0000 (17:31 +0700)]
curl plugins: Use configured URL for all poll cycles

After redirect received, Collectd send subsequent requests to new location.
That is wrong - Collectd should use configured URL for all poll cycles, regardless of the responses received previously.

Problem was caused by libcurl issue 1631. To avoid that we set request url in each poll cycle.

Closes: #2328