Merge branch 'collectd-5.4' into collectd-5.5
drbd plugin: improve header lines identification
Recent DRBD versions display more detailed build information in
`/proc/drbd`, which caused the header identification to fail.
Comparing the first part of each line against all known header prefixes
will hopefully make this more robust.
Fixes #1514
Signed-off-by: Florian Forster <octo@collectd.org>
Recent DRBD versions display more detailed build information in
`/proc/drbd`, which caused the header identification to fail.
Comparing the first part of each line against all known header prefixes
will hopefully make this more robust.
Fixes #1514
Signed-off-by: Florian Forster <octo@collectd.org>
df: remove legacy code skipping "rootfs" monitoring
3512bb1 added code to skip duplicate reporting of `rootfs` mounted on `/`.
f9c1c5b and f0398d0 added generic code to skip any volume mounted twice.
Depending on the order of the entries in `/etc/mtab`, reporting for `/` was
entirely skipped.
This patch basically reverts the first, non-generic patch, as it's
superseded by the 2 others.
Fixes #1402
Signed-off-by: Florian Forster <octo@collectd.org>
3512bb1 added code to skip duplicate reporting of `rootfs` mounted on `/`.
f9c1c5b and f0398d0 added generic code to skip any volume mounted twice.
Depending on the order of the entries in `/etc/mtab`, reporting for `/` was
entirely skipped.
This patch basically reverts the first, non-generic patch, as it's
superseded by the 2 others.
Fixes #1402
Signed-off-by: Florian Forster <octo@collectd.org>
ChangeLog: Fix mangled entries.
Bump version to 5.5.1; Update ChangeLog.
Merge pull request #1517 from mfournier/systemd-upstart-build-issue
systemd.collectd.service: improve systemd & capabilities explanations
systemd.collectd.service: improve systemd & capabilities explanations
docs: Add info about mode7 requirement for ntpd
Since ntpd-4.2.7p230 "mode 7" requests are ignored by default, and
that's what ntpd plugin uses currently. The ntp daemon must be
explicitly configured to enable mode7 requests.
This patch adds short information about that to collectd.conf manpage.
Related to collectd/collectd#932
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Since ntpd-4.2.7p230 "mode 7" requests are ignored by default, and
that's what ntpd plugin uses currently. The ntp daemon must be
explicitly configured to enable mode7 requests.
This patch adds short information about that to collectd.conf manpage.
Related to collectd/collectd#932
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Merge branch 'collectd-5.4' into collectd-5.5
docs: mention regexps for the interface plugin
It is very useful to collect data (or ignore) from a group of interfaces
that are similarly named - especially if the list is dynamic and it's
not feasible to update configuration each time an interface shows up or
disappears. It's possible to use regexps to specify interfaces to
collect data from (or ignore), but it's not clearly stated anywhere in
the documentation.
This is an attempt to improve documentation in this area.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
It is very useful to collect data (or ignore) from a group of interfaces
that are similarly named - especially if the list is dynamic and it's
not feasible to update configuration each time an interface shows up or
disappears. It's possible to use regexps to specify interfaces to
collect data from (or ignore), but it's not clearly stated anywhere in
the documentation.
This is an attempt to improve documentation in this area.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
systemd.collectd.service: improve systemd & capabilities explanations
Fixes #1444
Fixes #1444
exec plugin: Revert file mode to 0644.
This fixes a regression from 94e562250296b1435e3e48cd302055d89c4c702b.
This fixes a regression from 94e562250296b1435e3e48cd302055d89c4c702b.
virt plugin: make indentation explicit
Fixes this warning raised by gcc-6's new "misleading-indentation"
option:
```
virt.c: In function 'lv_init':
virt.c:331:2: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
return 0;
^~~~~~
virt.c:328:5: note: ...this 'if' clause, but it is not
if (virInitialize () != 0)
^~
```
Fixes this warning raised by gcc-6's new "misleading-indentation"
option:
```
virt.c: In function 'lv_init':
virt.c:331:2: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
return 0;
^~~~~~
virt.c:328:5: note: ...this 'if' clause, but it is not
if (virInitialize () != 0)
^~
```
df: remove legacy references to ReportReserved
The ReportReserved option was removed in fcb3cbf. This patch cleans up a
couple of references which got left behind.
The ReportReserved option was removed in fcb3cbf. This patch cleans up a
couple of references which got left behind.
Merge branch 'collectd-5.4' into collectd-5.5
write_redis: don't return with lock held
src/utils_latency.c: Fix format string error.
src/utils_latency.c: Ensure that LLONG_MAX is defined.
EPEL5 doesn't have it in <limits.h> apparently.
EPEL5 doesn't have it in <limits.h> apparently.
src/utils_latency.c: Store "bin_width" as cdtime_t.
This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.
Issue: #1131
This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.
Issue: #1131
src/utils_latency.c: Fix change_bin_width().
A missing cast when calculating "width_change_ratio" caused all metrics to
be moved to bucket #0.
A missing cast when calculating "width_change_ratio" caused all metrics to
be moved to bucket #0.
varnish: fix leak on read
Since VSM_Close doesn't free the object we leak a few bytes
every interval
Since VSM_Close doesn't free the object we leak a few bytes
every interval
openvpn plugin: Fix "Dead assignment" warning.
modbus plugin: Make sure variable is initialized.
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
tail plugin: Make sure variable is initialized.
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
This was introduced by the merge
(09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
Fix header condition
The dependency is either UTMPX or UTMP or Statgrab. The inclusion above hasn't statgrab.h in the elif-chain, that means compilation fails when only libstatgrab is available. The line can safely be taken out as the same condition is checked in #L120.
The dependency is either UTMPX or UTMP or Statgrab. The inclusion above hasn't statgrab.h in the elif-chain, that means compilation fails when only libstatgrab is available. The line can safely be taken out as the same condition is checked in #L120.
Fixed rrdtool sigsegv (datadir==NULL ptr dereferencing)
processes: correct a typo
Merge branch 'collectd-5.4' into collectd-5.5
write_redis: don't return with lock held
redis plugin: make sure buffer is null-terminated
CID 37938
CID 37938
perl: unlock mutex on error
CID 37970
CID 37970
openvpn: free resource on error
openvpn: fix error message
openvpn: check return value of malloc
CID 37987
CID 37987
curl_json: remove dead code
CID 37963
CID 37963
snmp plugin: don't read from uninitialized pointer
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
libcollectdclient: don't close socket twice
CID #38039
CID #38039
email plugin: fix check for result of malloc
CID #38010
CID #38010
Fixed rrdtool sigsegv (datadir==NULL ptr dereferencing)
openldap plugin: fix build on OSX El Capitan
OpenLDAP is deprecated in OSX El Capitan.
Apple would like us to use the OpenDirectory Framework instead.
Treat these deprecation warnings as warnings, not errors.
OpenLDAP is deprecated in OSX El Capitan.
Apple would like us to use the OpenDirectory Framework instead.
Treat these deprecation warnings as warnings, not errors.
collectd.conf.pod: mention IPv6 option to the iptables plugin
Thanks to @michaelsalmon for pointing this out !
Fix #1496
Thanks to @michaelsalmon for pointing this out !
Fix #1496
remove the addressof in the sizeof
quick fix for issue 1501?
the new warning for pointer access introduced in gcc 4.8 helped to find
this one.
quick fix for issue 1501?
the new warning for pointer access introduced in gcc 4.8 helped to find
this one.
Merge branch 'collectd-5.4' into collectd-5.5
perl plugin: Check "return value" of PERL_GET_CONTEXT.
CID: 37985
CID: 37985
email plugin: Don't call type_list_incr() with type == NULL.
CID: 37988
CID: 37988
gmond plugin: Inline the plugin_dispatch_values() call.
Since version 5.3, a write queue is used. This means that the
plugin_dispatch_values() call will create a copy of the value list and
return quickly. Creating yet another copy here is therefore not as useful
anymore.
CID: 38114
Since version 5.3, a write queue is used. This means that the
plugin_dispatch_values() call will create a copy of the value list and
return quickly. Creating yet another copy here is therefore not as useful
anymore.
CID: 38114
gmond plugin: Check return value of sendto(2).
CID: 38113
CID: 38113
gmond plugin: Check return value of setsockopt(2).
CID: 38112
CID: 38112
Merge branch 'collectd-5.4' into collectd-5.5
zfs_arc plugin: Plug memory leak on Linux.
CID: 42796
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 42796
Signed-off-by: Florian Forster <octo@collectd.org>
configure.ac: warn when pkg-config is not installed
It hasn't been optional for a while now.
Fixes:
checking for rrd.h... no
./configure: 25157: Syntax error: word unexpected (expecting ")")
Signed-off-by: Florian Forster <octo@collectd.org>
It hasn't been optional for a while now.
Fixes:
checking for rrd.h... no
./configure: 25157: Syntax error: word unexpected (expecting ")")
Signed-off-by: Florian Forster <octo@collectd.org>
barometer plugin: cleanup whitespace
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
collectd.conf(5): Document all metrics created by CollectInternalStats.
collectd.conf(5): Improve documentation of the CollectdInternalStats option.
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.4' into collectd-5.5
src/utils_ignorelist.c: Refactoring / code style fixes.
One of the goals was to remove uses of smalloc().
One of the goals was to remove uses of smalloc().
swap plugin: don't exit when malloc fails
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.4' into collectd-5.5
curl_json plugin: Rewrite logic to add a path to db->tree.
CID: 37991
CID: 37991
curl_xml plugin: Correctly free xpath object.
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.4' into collectd-5.5
ping plugin: Protect access to ping_thread_error.
This is primarily to make Coverity happy.
CID: 37976
This is primarily to make Coverity happy.
CID: 37976
ping plugin: Remove "static" from local variable.
This caused Coverity to see concurrency issues where there are none.
CID: 37934
This caused Coverity to see concurrency issues where there are none.
CID: 37934
rrdtool plugin: Improve handling of the "DataDir" option.
CID: 37977
CID: 37977
python plugin: Check return value of cpy_unicode_or_bytes_to_string().
CID: 37984
CID: 37984
python plugin: Check return value of malloc().
CID: 37981, 37982, 37983
CID: 37981, 37982, 37983
python plugin: Fix memory leak.
The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.
CID: 38002
The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.
CID: 38002
tail plugin: Fix memory leak.
CID: 38013
CID: 38013
postgresql plugin: Register a new user data pointer with udb_query_set_user_data() unconditionally.
CID: 38019
CID: 38019
email plugin: Refactor the accept() loop.
This removes the assumption that accept() returning a socket (success)
implies that errno is not equal to EINTR. This is probably a reasonable
assumption, but trips up Coverity may be a bit hard to read.
CID: 38009
This removes the assumption that accept() returning a socket (success)
implies that errno is not equal to EINTR. This is probably a reasonable
assumption, but trips up Coverity may be a bit hard to read.
CID: 38009
email plugin: Free "connection" in error handling.
CID: 38010
CID: 38010
postgresql plugin: Remove invalid free().
CID: 37936
CID: 37936
src/collectd-tg.c: Explicitly null-terminate string.
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_format_json.c: Check return value of json_escape_string().
CID: 37946
CID: 37946
Merge branch 'collectd-5.4' into collectd-5.5
src/utils_format_json.c: Make sure "keys" is freed in all error paths.
CID: 38008
CID: 38008
sigrok plugin: don't pass status to strerror
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'collectd/collectd-5.4' into collectd-5.5
multimeter plugin: Initizliaze "struct termios".
CID: 38036
CID: 38036
configure.ac: fix previous change to detect libjvm
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.4' into collectd-5.5
meta_data.c: check return value of md_entry_alloc
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
iptables plugin: remove dead code
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
src/filter_chain.c: Refactor fc_process_chain() a wee bit.
src/filter_chain.c: Delete dead code.
CID: 37961
CID: 37961
src/common.c: Check arguments of parse_values().
CID: 37965
CID: 37965
libcollectdclient: Check return value of setsockopt().
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.4' into collectd-5.5
configure.ac: fix libjvm detection on OSX
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
unixsock: check return value of chmod
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
zookeeper plugin: remove dead code
status cannot be 0 inside the loop
CID #37964
Signed-off-by: Florian Forster <octo@collectd.org>
status cannot be 0 inside the loop
CID #37964
Signed-off-by: Florian Forster <octo@collectd.org>
write_tsdb plugin: don't close a closed socket
CID #37979 and #37980
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37979 and #37980
Signed-off-by: Florian Forster <octo@collectd.org>
zfs-arc plugin: check return value of malloc
CID #37989
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37989
Signed-off-by: Florian Forster <octo@collectd.org>
bind plugin: plug small leak
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: plug a few leaks on error
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
stats plugin: close fd on error
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
utils_cache.c: plug leak on error
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
Aggregration plugin: plug leak on error
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
varnish plugin: fix two resource leaks on error
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
write_riemann plugin: plug leak on error
CID #37996
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37996
Signed-off-by: Florian Forster <octo@collectd.org>
libcollectdclient: free result of getaddrinfo
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>