Merge branch 'collectd-5.6' into collectd-5.7
Conflicts:
src/rrdtool.c
Conflicts:
src/rrdtool.c
rrdtool plugin: Changes after review
* Handle "CacheFlush" as a double
* Updated documentation spelling
* Handle "CacheFlush" as a double
* Updated documentation spelling
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.
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.
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.
The "RandomTimeout" option value check moved from rrd_get_random_variation()
to rrd_init(). This will save few CPU cycles.
rrdtool plugin: Remove excessive complain
The plugin complains `Adjusting "RandomTimeout" to 0.000 seconds.` even
if no 'CacheTimeout' was set.
The plugin complains `Adjusting "RandomTimeout" to 0.000 seconds.` even
if no 'CacheTimeout' was set.
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.
Documentation states what the actual timeout for each value is chosen randomly
between <CacheTimeout>-<RandomTimeout> and <CacheTimeout>+<RandomTimeout>.
The implementation did not match this.
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
* 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
Merge branch 'collectd-5.6' into collectd-5.7
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.
There are various issues with it in combination with SELinux.
See https://marc.info/?l=selinux&m=149971836431361&w=2 for some
background.
Merge pull request #2357 from rpv-tomsk/issue-2305
Fixed failed compilation on AIX
Fixed failed compilation on AIX
Fixed failed compilation on AIX
Caused by typo in 2761915bed8c6caea41018be3e675aa712cc0b0a / #1842.
Closes: #2305
Caused by typo in 2761915bed8c6caea41018be3e675aa712cc0b0a / #1842.
Closes: #2305
Merge branch 'collectd-5.6' into collectd-5.7
Merge pull request #2341 from rpv-tomsk/issue-2328
curl plugins: Use configured URL for all poll cycles
curl plugins: Use configured URL for all poll cycles
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
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
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@.
FreeBSD commit https://github.com/freebsd/freebsd/commit/3a5c9aaf2b2ea107bcaf0ba28b706238d92bdbbd
hides inpcb and tcpcb from userland.
Patch taken from FreeBSD ports tree, thanks glebius@.
Merge branch 'collectd-5.6' into collectd-5.7
email, exec and unixsock plugins: enlarge buffer for getgrnam_r result
Thanks to Jeremie Courreges-Anglas and Daniel Jakots.
Thanks to Jeremie Courreges-Anglas and Daniel Jakots.
email, exec and unixsock plugins: fix error handling
Diff from Jeremie Courreges-Anglas, via Daniel Jakots
Diff from Jeremie Courreges-Anglas, via Daniel Jakots
Merge pull request #2331 from mfournier/ldap_unbind-segfault
openldap: check ld structure before passing it to ldap_unbind()
openldap: check ld structure before passing it to ldap_unbind()
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).
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).
Bump version to 5.7.2; Update ChangeLog.
Merge pull request #2310 from octo/ff/intel_rdt
intel_rdt plugin: Remove unnecessary goto.
intel_rdt plugin: Remove unnecessary goto.
intel_rdt plugin: Remove unnecessary goto.
Merge branch 'collectd-5.6' into collectd-5.7
Bind plugin: plug a few leaks
Fixes: #2303
Fixes: #2303
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>
This prevents a wrong value being sent to graphite for DERIVE types.
See #2209
Signed-off-by: Florian Forster <octo@collectd.org>
src/daemon/utils_cache.c: Add debug message for lookup of missing metrics.
Issue: #1234
Issue: #1234
src/daemon/utils_cache.c: Remove unnecessary cast.
(data_set_t).ds_num has been changed to be a size_t.
(data_set_t).ds_num has been changed to be a size_t.
src/daemon/utils_cache.c: Read time *after* acquiring the lock.
Fixes: #1193
Fixes: #1193
amqp plugin: Enable the "ExchangeType" for publishers, too.
Fixes: #2286
Fixes: #2286
Merge branch 'collectd-5.6' into collectd-5.7
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
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
collectd.conf(5): Fix typo ("queries" vs. "queried").
By avoiding the word: "metrics" is bettern than "statistics".
By avoiding the word: "metrics" is bettern than "statistics".
Merge pull request #2278 from octo/ff/perl
perl plugin: Fix potential double-free.
perl plugin: Fix potential double-free.
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.
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.
Merge pull request #2275 from octo/ff/prometheus
write_prometheus plugin: Fix incorrect use of realloc().
write_prometheus plugin: Fix incorrect use of realloc().
Merge pull request #2274 from octo/ff/putval
src/utils_cmd_putval.c: Fix multi-value PUTVAL.
src/utils_cmd_putval.c: Fix multi-value PUTVAL.
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[].
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[].
write_prometheus plugin: Fix incorrect use of realloc().
Calling realloc(ptr, 0) is undefined. Call free() explicitly.
Calling realloc(ptr, 0) is undefined. Call free() explicitly.
Merge branch 'collectd-5.6' into collectd-5.7
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
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
fix BIND timezone parsing issue
collectd.conf(5): Add section documenting the ignorelist functionality.
Fixes: #2267
Fixes: #2267
Merge branch 'collectd-5.6' into collectd-5.7
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>
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>
Merge pull request #2210 from rpv-tomsk/processes-fix-init
processes plugin: Fix broken compilation on AIX
processes plugin: Fix broken compilation on AIX
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
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
Merge branch 'collectd-5.6' into collectd-5.7
Conflicts:
contrib/redhat/collectd.spec
Conflicts:
contrib/redhat/collectd.spec
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.
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.
Merge branch 'collectd-5.6' into collectd-5.7
Merge pull request #2204 from collectd/check-for-cap-is-supported
Check for the CAP_IS_SUPPORTED macro
Check for the CAP_IS_SUPPORTED macro
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
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
Merge branch 'collectd-5.6' into collectd-5.7
look for cap_get_proc instead of cap_get_bound
a2ddc38 switched the capability check from cap_get_bound() to
cap_get_proc()
a2ddc38 switched the capability check from cap_get_bound() to
cap_get_proc()
Merge pull request #2151 from mfournier/check_capability-rewrite-fix
daemon/common.c: Fix check_capability() by using cap_get_proc()
daemon/common.c: Fix check_capability() by using cap_get_proc()
Merge branch 'collectd-5.6' into collectd-5.7
Conflicts:
src/utils_match.c
Conflicts:
src/utils_match.c
smart: log warning if CAP_SYS_RAWIO is missing
Related to #2143
Related to #2143
Merge pull request #2192 from maryamtahhan/bugfix_regex_memleak
fix for memory leak in utils_match.c
fix for memory leak in utils_match.c
fix for memory leak in utils_match.c
Change-Id: I058afae8c0a99115bda70e125840fc6bd224b358
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
Change-Id: I058afae8c0a99115bda70e125840fc6bd224b358
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
Merge branch 'collectd-5.6' into collectd-5.7
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.
... as the message the user would be looking for can be found on
stderr/stdout or in any configured logfile.
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
This prevents early startup log messages from going unnoticed if the
default logfile isn't writeable.
Fixes: #2057
Merge branch 'collectd-5.6' into collectd-5.7
Conflicts:
contrib/redhat/collectd.spec
Conflicts:
contrib/redhat/collectd.spec
collectd.spec: enable XFS support in df plugin
Fixes #2178
Fixes #2178
Merge branch 'collectd-5.6' into collectd-5.7
Merge pull request #2167 from maryamtahhan/feat_dpdkstat_bugfix_5_7
dpdkstat: Fix metrics' types
dpdkstat: Fix metrics' types
Merge pull request #2170 from javicacheiro/fix_redhat_spec_file
Fix rpm spec file for 5.7.1
Fix rpm spec file for 5.7.1
Fix release
Fix rpm spec file for 5.7.1
Merge pull request #2165 from maryamtahhan/feat_rdt_bugfix
intel_rdt: bugfix configuration
intel_rdt: bugfix configuration
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>
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>
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>
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>
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
libesmtp takes care of this.
Pointed out by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852924
daemon/common.c: Fix check_capability() by using cap_get_proc()
Rewrite this function, as 58acba67f made it a no-op.
Rewrite this function, as 58acba67f made it a no-op.
Merge branch 'collectd-5.6' into collectd-5.7
dpdkstat plugin: jump to the right label
Bump version to 5.7.1; Update ChangeLog.
mqtt plugin: Fix invalid symbols in topic name.
mqtt plugin: Fix resource leak.
Fixes: #2123
Fixes: #2123
Merge pull request #2122 from octo/issue/2108
src/daemon/plugin.c: Register plugin_update_internal_statistics() as …
src/daemon/plugin.c: Register plugin_update_internal_statistics() as …
Merge branch 'collectd-5.6' into collectd-5.7
src/daemon/plugin.c: explicitly declare vl.interval
This properly gets rid of the warning reported in #2108
Thanks to @charliesignalfx for suggesting this and reporting the issue !
This properly gets rid of the warning reported in #2108
Thanks to @charliesignalfx for suggesting this and reporting the issue !
src/daemon/plugin.c: avoid deprecated statement
As suggested by @rubenk in #2122
As suggested by @rubenk in #2122
collectd.spec: ensure write_riemann build deps are installed
collectd.spec: fixes to previous commit
collectd.spec: re-enable write_riemann on EL7, as build dep is now available in EPEL7
Merge branch 'collectd-5.6' into collectd-5.7
curl_json: use configured interval as default timeout value
When no timeout is specified, the default timeout should be set to the
configured interval, not the default timeout (which is -1, no timeout).
This bug got introduced in bce14a848.
When no timeout is specified, the default timeout should be set to the
configured interval, not the default timeout (which is -1, no timeout).
This bug got introduced in bce14a848.
intel_rdt: check libpqos library version.
Change-Id: I83d42b63873569445d4c6339d7a69761e16ead14
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
Change-Id: I83d42b63873569445d4c6339d7a69761e16ead14
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
src/daemon/plugin.c: Register plugin_update_internal_statistics() as a read callback.
The previous special-snowflake-solution had issues since it didn't set a plugin
context up.
Fixes: #2108
The previous special-snowflake-solution had issues since it didn't set a plugin
context up.
Fixes: #2108
Merge branch 'collectd-5.6' into collectd-5.7
src/daemon/common.c: Change swrite() to return errno if possible.
Merge pull request #2121 from octo/netapp
netapp plugin: Fix complation problems.
netapp plugin: Fix complation problems.
netapp plugin: Fix compilation problems.
Fixes: #2120
Fixes: #2120
Auto-Merge pull request #2113 from rubenk/dpdk-double-close
Automatically merged due to "Automerge" label
Automatically merged due to "Automerge" label
Merge pull request #2114 from mfournier/dpdkstat-formatstring
dpdkstat: use portable format strings
dpdkstat: use portable format strings
dpdkstat: use portable format strings
Merge pull request #2112 from rubenk/battery-plugin-nul-terminate-buffer
Battery plugin: nul-terminate buffer
Battery plugin: nul-terminate buffer