Florian Forster [Fri, 29 Sep 2017 11:05:26 +0000 (13:05 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Fri, 29 Sep 2017 06:44:22 +0000 (08:44 +0200)]
dbi plugin: Fix additional memory leaks.
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>
Florian Forster [Wed, 27 Sep 2017 08:23:40 +0000 (10:23 +0200)]
Merge remote-tracking branch 'github/pr/2451' into collectd-5.6
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>
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>
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
Florian Forster [Thu, 21 Sep 2017 15:22:39 +0000 (17:22 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Wed, 20 Sep 2017 17:38:10 +0000 (19:38 +0200)]
perl plugin: Improve error message.
Florian Forster [Wed, 20 Sep 2017 17:34:56 +0000 (19:34 +0200)]
Merge remote-tracking branch 'github/pr/2391' into collectd-5.6
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
Marc Fournier [Mon, 4 Sep 2017 09:51:04 +0000 (11:51 +0200)]
collectd.spec: avoid accidentally picking an ancient/unsupported java version
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
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.
Pavel Rochnyack [Wed, 2 Aug 2017 05:15:50 +0000 (12:15 +0700)]
perl plugin: Added check of proper interpreter initialization.
Closes: #927
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
Pavel Rochnyack [Fri, 21 Jul 2017 18:06:58 +0000 (01:06 +0700)]
network: Fix free() before use
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
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
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.
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.
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.
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.
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
Ruben Kerkhof [Wed, 12 Jul 2017 16:58:18 +0000 (18:58 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
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.
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
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
Ruben Kerkhof [Fri, 7 Jul 2017 16:40:55 +0000 (18:40 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
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
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
Ruben Kerkhof [Sun, 2 Jul 2017 18:34:59 +0000 (20:34 +0200)]
tcpconns plugin: fix build on FreeBSD current
FreeBSD commit https://github.com/freebsd/freebsd/commit/
3a5c9aaf2b2ea107bcaf0ba28b706238d92bdbbd
hides inpcb and tcpcb from userland.
Patch taken from FreeBSD ports tree, thanks glebius@.
Ruben Kerkhof [Fri, 30 Jun 2017 14:17:06 +0000 (16:17 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Fri, 30 Jun 2017 14:15:25 +0000 (16:15 +0200)]
email, exec and unixsock plugins: enlarge buffer for getgrnam_r result
Thanks to Jeremie Courreges-Anglas and Daniel Jakots.
Ruben Kerkhof [Fri, 30 Jun 2017 14:12:57 +0000 (16:12 +0200)]
email, exec and unixsock plugins: fix error handling
Diff from Jeremie Courreges-Anglas, via Daniel Jakots
Ruben Kerkhof [Wed, 28 Jun 2017 17:38:12 +0000 (19:38 +0200)]
Merge pull request #2331 from mfournier/ldap_unbind-segfault
openldap: check ld structure before passing it to ldap_unbind()
Marc Fournier [Wed, 28 Jun 2017 11:46:59 +0000 (13:46 +0200)]
openldap: check ld structure before passing it to ldap_unbind()
This prevents collectd from segfaulting when the ldap session setup
fails before opening a connection to openldap (syntax error in the URL
option for example).
Florian Forster [Tue, 6 Jun 2017 18:11:05 +0000 (20:11 +0200)]
Bump version to 5.7.2; Update ChangeLog.
Ruben Kerkhof [Tue, 6 Jun 2017 08:28:19 +0000 (10:28 +0200)]
Merge pull request #2310 from octo/ff/intel_rdt
intel_rdt plugin: Remove unnecessary goto.
Florian Forster [Mon, 5 Jun 2017 05:33:36 +0000 (07:33 +0200)]
intel_rdt plugin: Remove unnecessary goto.
Ruben Kerkhof [Thu, 1 Jun 2017 18:37:49 +0000 (20:37 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Tue, 30 May 2017 15:25:17 +0000 (17:25 +0200)]
Bind plugin: plug a few leaks
Fixes: #2303
Iain Buclaw [Fri, 19 May 2017 10:55:37 +0000 (12:55 +0200)]
format_graphite: Error if call to uc_get_rate fails to return a value.
This prevents a wrong value being sent to graphite for DERIVE types.
See #2209
Signed-off-by: Florian Forster <octo@collectd.org>
Florian Forster [Fri, 19 May 2017 06:39:45 +0000 (08:39 +0200)]
src/daemon/utils_cache.c: Add debug message for lookup of missing metrics.
Issue: #1234
Florian Forster [Fri, 19 May 2017 06:34:37 +0000 (08:34 +0200)]
src/daemon/utils_cache.c: Remove unnecessary cast.
(data_set_t).ds_num has been changed to be a size_t.
Florian Forster [Thu, 18 May 2017 07:23:32 +0000 (09:23 +0200)]
src/daemon/utils_cache.c: Read time *after* acquiring the lock.
Fixes: #1193
Florian Forster [Wed, 17 May 2017 06:01:29 +0000 (08:01 +0200)]
amqp plugin: Enable the "ExchangeType" for publishers, too.
Fixes: #2286
Florian Forster [Tue, 16 May 2017 17:34:25 +0000 (19:34 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Mon, 15 May 2017 12:40:26 +0000 (14:40 +0200)]
curl_json plugin: Fix array index and key handling.
Previously, the "key" was loaded by calling cj_cb_map_key() from
cj_cb_inc_array_index(). That means that the key for the previous element
was loaded as the array index was updated for the next element, resulting
in an off-by-one error. Also the key was not unset in time, resulting in
two metrics with the same identifier being created.
This patch fixes this with the following changes:
* cj_advance_array() (nee cj_cb_inc_array_index()) now loads the key for
the new index position instead of the previous one.
* The initial "0" key is loaded from cj_cb_start_array().
* cj_advance_array() always updates the key. The "update_key" argument
has been removed.
* Refactoring: key loading has been moved out of cj_cb_map_key() and
into its own function, cj_load_key().
Unit tests are in a separate commit for easier cherry-picking.
Fixes: #2266
Florian Forster [Mon, 15 May 2017 06:14:03 +0000 (08:14 +0200)]
collectd.conf(5): Fix typo ("queries" vs. "queried").
By avoiding the word: "metrics" is bettern than "statistics".
Ruben Kerkhof [Sun, 14 May 2017 10:38:58 +0000 (12:38 +0200)]
Merge pull request #2278 from octo/ff/perl
perl plugin: Fix potential double-free.
Florian Forster [Sun, 14 May 2017 06:24:51 +0000 (08:24 +0200)]
perl plugin: Fix potential double-free.
The av2notification_meta() function updated it's parameter by doing
(*m) = malloc();
Afterwards, if an error occurred, it would call `free(*m);` and (potentially)
return, leaving an invalid pointer stored in `m`. The caller would then try to
free the returned pointer because it was non-NULL.
This patch fixes this by doing several code cleanups:
* The meta argument is not updated unnecessarily. Instead, a local variable
is allocated and used within the loop and only on success is the return
pointer updated.
* Introduce additional local variables instead of re-using the `tmp` variable
multiple times.
* Name the variable pointing to the end of the linked list appropriately
`tail` and remove one level of indirection. Reading code that is using
pointers to pointers is unnecessarily hard.
Florian Forster [Fri, 12 May 2017 13:17:13 +0000 (15:17 +0200)]
Merge pull request #2275 from octo/ff/prometheus
write_prometheus plugin: Fix incorrect use of realloc().
Florian Forster [Fri, 12 May 2017 13:16:50 +0000 (15:16 +0200)]
Merge pull request #2274 from octo/ff/putval
src/utils_cmd_putval.c: Fix multi-value PUTVAL.
Florian Forster [Fri, 12 May 2017 10:08:55 +0000 (12:08 +0200)]
src/utils_cmd_putval.c: Fix multi-value PUTVAL.
vl.values was allocated outside of the loop and then copied into each
ret_putval->vl[]. This means that later values overwrote the values
stored in previous ret_putval->vl[].
Florian Forster [Fri, 12 May 2017 11:05:37 +0000 (13:05 +0200)]
write_prometheus plugin: Fix incorrect use of realloc().
Calling realloc(ptr, 0) is undefined. Call free() explicitly.
Florian Forster [Fri, 12 May 2017 09:16:43 +0000 (11:16 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
Florian Forster [Sun, 7 May 2017 18:34:09 +0000 (20:34 +0200)]
bind plugin: Use timegm() to convert to time_t if available.
FreeBSD doesn't provide the "extern long timezone", presumably because
it's "only" an XSI extension, leading to a portability issue with the
previous approach.
timegm() is a non-standard function available in GNU's and BSD's libc
which is doing exactly what we need. The previous code is left as a
fallback.
Fixes: #1268
Ed Ravin [Sat, 6 May 2017 02:53:59 +0000 (22:53 -0400)]
fix BIND timezone parsing issue
Florian Forster [Sun, 7 May 2017 10:06:47 +0000 (12:06 +0200)]
collectd.conf(5): Add section documenting the ignorelist functionality.
Fixes: #2267
Ruben Kerkhof [Fri, 14 Apr 2017 12:32:01 +0000 (14:32 +0200)]
Merge branch 'collectd-5.6' into collectd-5.7
Pavel Rochnyack [Mon, 3 Apr 2017 05:57:09 +0000 (11:57 +0600)]
network plugin: Fix endless loop DOS in parse_packet()
When correct 'Signature part' is received by Collectd, configured without
AuthFile option, condition for endless loop occurs due to missing increase
of pointer to next unprocessed part.
This is a forward-port of #2233.
Fixes: CVE-2017-7401
Closes: #2174
Signed-off-by: Florian Forster <octo@collectd.org>
Ruben Kerkhof [Fri, 10 Mar 2017 14:36:09 +0000 (15:36 +0100)]
Merge pull request #2210 from rpv-tomsk/processes-fix-init
processes plugin: Fix broken compilation on AIX
Pavel Rochnyack [Thu, 9 Mar 2017 17:57:41 +0000 (23:57 +0600)]
processes plugin: Fix broken compilation on AIX
After a
bb0000acfc57e230fc1c26099bc7acb913680f1a an extra pse.cpu_system
statement was left in the AIX / elif HAVE_PROCINFO_H section, which caused
the compilation to fail.
Fixes: #1981
Ruben Kerkhof [Sun, 5 Mar 2017 17:34:37 +0000 (18:34 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Conflicts:
contrib/redhat/collectd.spec
Ruben Kerkhof [Sun, 5 Mar 2017 17:30:23 +0000 (18:30 +0100)]
collectd.spec: Don't enable XFS support on RHEL6
It is missing for i386.
If there's strong interest in having support for xfs in the df plugin in
RHEL6 we can do some macro magic to only BuildRequire xfsprogs-devel if
were not on rhel6 i386, but this was the easiest fix and unblocks our
package builds.
Ruben Kerkhof [Sun, 5 Mar 2017 16:14:53 +0000 (17:14 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Sun, 5 Mar 2017 16:14:18 +0000 (17:14 +0100)]
Merge pull request #2204 from collectd/check-for-cap-is-supported
Check for the CAP_IS_SUPPORTED macro
Ruben Kerkhof [Sun, 5 Mar 2017 15:46:47 +0000 (16:46 +0100)]
Check for the CAP_IS_SUPPORTED macro
On EPEL6:
src/daemon/common.c: In function 'check_capability':
src/daemon/common.c:1571: error: implicit declaration of function 'CAP_IS_SUPPORTED'
make[1]: *** [src/daemon/common.lo] Error 1
Ruben Kerkhof [Fri, 24 Feb 2017 16:44:55 +0000 (17:44 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Fri, 24 Feb 2017 16:42:59 +0000 (17:42 +0100)]
look for cap_get_proc instead of cap_get_bound
a2ddc38 switched the capability check from cap_get_bound() to
cap_get_proc()
Ruben Kerkhof [Fri, 24 Feb 2017 16:40:41 +0000 (17:40 +0100)]
Merge pull request #2151 from mfournier/check_capability-rewrite-fix
daemon/common.c: Fix check_capability() by using cap_get_proc()
Ruben Kerkhof [Fri, 24 Feb 2017 16:28:28 +0000 (17:28 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Conflicts:
src/utils_match.c
Marc Fournier [Wed, 25 Jan 2017 07:10:48 +0000 (08:10 +0100)]
smart: log warning if CAP_SYS_RAWIO is missing
Related to #2143
Ruben Kerkhof [Fri, 24 Feb 2017 15:52:17 +0000 (16:52 +0100)]
Merge pull request #2192 from maryamtahhan/bugfix_regex_memleak
fix for memory leak in utils_match.c
Krzysztof Matczak [Fri, 24 Feb 2017 09:38:14 +0000 (09:38 +0000)]
fix for memory leak in utils_match.c
Change-Id: I058afae8c0a99115bda70e125840fc6bd224b358
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
Ruben Kerkhof [Wed, 22 Feb 2017 20:09:46 +0000 (21:09 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Marc Fournier [Wed, 11 Jan 2017 12:39:27 +0000 (13:39 +0100)]
log_logstash: send log messages to STDERR by default
See also
dec394e08
Marc Fournier [Tue, 10 Jan 2017 21:58:21 +0000 (22:58 +0100)]
src/daemon/collectd.c: do not refer to syslog in error message
... as the message the user would be looking for can be found on
stderr/stdout or in any configured logfile.
Marc Fournier [Tue, 10 Jan 2017 21:23:55 +0000 (22:23 +0100)]
logfile: send log messages to STDERR by default
This prevents early startup log messages from going unnoticed if the
default logfile isn't writeable.
Fixes: #2057
Ruben Kerkhof [Wed, 22 Feb 2017 10:17:58 +0000 (11:17 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Conflicts:
contrib/redhat/collectd.spec
Ruben Kerkhof [Wed, 22 Feb 2017 08:59:02 +0000 (09:59 +0100)]
collectd.spec: enable XFS support in df plugin
Fixes #2178
Ruben Kerkhof [Sun, 19 Feb 2017 11:59:13 +0000 (12:59 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Tue, 14 Feb 2017 10:12:28 +0000 (11:12 +0100)]
Merge pull request #2167 from maryamtahhan/feat_dpdkstat_bugfix_5_7
dpdkstat: Fix metrics' types
Marc Fournier [Mon, 13 Feb 2017 14:39:00 +0000 (15:39 +0100)]
Merge pull request #2170 from javicacheiro/fix_redhat_spec_file
Fix rpm spec file for 5.7.1
Javier Cacheiro [Fri, 10 Feb 2017 10:58:07 +0000 (11:58 +0100)]
Fix release
Javier Cacheiro [Thu, 9 Feb 2017 21:50:01 +0000 (22:50 +0100)]
Fix rpm spec file for 5.7.1
Ruben Kerkhof [Wed, 8 Feb 2017 16:36:46 +0000 (17:36 +0100)]
Merge pull request #2165 from maryamtahhan/feat_rdt_bugfix
intel_rdt: bugfix configuration
Przemyslaw Szczerbik [Wed, 8 Feb 2017 14:28:09 +0000 (14:28 +0000)]
dpdkstat: Fix metrics' types
This patch fixes parsing of metrics' types. Some statistics, such as
rx_q0errors, rx_q0bytes or rx_q0packet, don't contain suffix _errors, _bytes or
_packets. This has caused them to use generic type 'derive', rather than
more specific one, for instance 'if_rx_errors'. Additionally, some
statistics contain string 'error', rather than 'errors'.
Change-Id: I51dfa9c4d98346a654adbc4041b64ebd3897278c
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
Maryam Tahhan [Wed, 8 Feb 2017 13:48:12 +0000 (13:48 +0000)]
intel_rdt: bugfix configuration
Fix the configuration to stop collectd bombing out and deal with configuration
errors gracefully. Otherwise collectd will fail at the configuration phase
with: "Error: Reading the config file failed!".
Signed-off-by: Tahhan, Maryam <maryam.tahhan@intel.com>
Marc Fournier [Sat, 28 Jan 2017 10:47:38 +0000 (11:47 +0100)]
notify_email: don't explicitly link against libssl and libcrypto
libesmtp takes care of this.
Pointed out by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852924
Marc Fournier [Wed, 25 Jan 2017 06:37:41 +0000 (07:37 +0100)]
daemon/common.c: Fix check_capability() by using cap_get_proc()
Rewrite this function, as
58acba67f made it a no-op.
Marc Fournier [Mon, 23 Jan 2017 19:05:30 +0000 (20:05 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Ruben Kerkhof [Fri, 23 Dec 2016 17:47:59 +0000 (18:47 +0100)]
dpdkstat plugin: jump to the right label
Florian Forster [Mon, 23 Jan 2017 07:42:35 +0000 (08:42 +0100)]
Bump version to 5.7.1; Update ChangeLog.
Denys Fedoryshchenko [Fri, 6 Jan 2017 01:36:16 +0000 (03:36 +0200)]
mqtt plugin: Fix invalid symbols in topic name.
Denys Fedoryshchenko [Fri, 6 Jan 2017 01:36:16 +0000 (03:36 +0200)]
mqtt plugin: Fix resource leak.
Fixes: #2123
Marc Fournier [Tue, 10 Jan 2017 22:40:43 +0000 (23:40 +0100)]
Merge pull request #2122 from octo/issue/2108
src/daemon/plugin.c: Register plugin_update_internal_statistics() as …
Marc Fournier [Tue, 10 Jan 2017 22:01:43 +0000 (23:01 +0100)]
Merge branch 'collectd-5.6' into collectd-5.7
Marc Fournier [Tue, 10 Jan 2017 20:39:22 +0000 (21:39 +0100)]
chrony: add missing build flag
This is a backport of
211bd4843.