Merge branch 'collectd-5.4' into collectd-5.5
threshold plugin: Fix "Dead assignment" warning.
ted plugin: Fix "Dead assignment" warning.
tail_csv plugin: Fix "Dead assignment" warning.
tail plugin: Fix "Dead assignment" warning.
snmp plugin: Fix "Dead assignment" warning.
powerdns plugin: Fix "Dead assignment" warning.
ping plugin: Fix "Dead assignment" warning.
onewire plugin: Fix "Dead assignment" warning.
openvpn plugin: Fix "Dead assignment" warning.
ntpd plugin: Fix "Dead assignment" warning.
network plugin: Fix "Dead assignment" warning.
modbus plugin: Fix "Dead assignment" warning.
onewire plugin: Fix "Dead assignment" warning.
nfs plugin: Fix handling of servers with 42 or 44 fields.
battery plugin: Fix file descriptor leak.
src/libcollectdclient/client.c: Fix "Dead assignment" warning.
gmond plugin: Fix handling of COUNTER and ABSOLUTE data sources.
email plugin: Fix "Dead assignment" warning.
src/daemon/filter_chain.c: Fix "Dead assignment" warning.
curl_json plugin: Fix "Dead assignment" warning.
amqp plugin: Fix "Dead assignment" warning.
src/utils_avltree.c: Add assertions to rotate_{left,right}().
clang's static code analysis thought that x->right / x->left could be NULL,
reporting false positives. Let's see if this fixes it.
clang's static code analysis thought that x->right / x->left could be NULL,
reporting false positives. Let's see if this fixes it.
snmp plugin: Fix off-by-one array access.
exec plugin: Don't assign variable that is never read.
Merge branch 'collectd-5.4' into collectd-5.5
src/utils_db_query.c: Fix use-after-free.
"r_area->next" was evaluated after "r_area" was freed.
"r_area->next" was evaluated after "r_area" was freed.
barometer plugin: Initialize output arrays.
src/daemon/common.c: Implement strjoin() with memcpy().
The previous implementation used strncat() which has the unfortunate and
unintuitive behavior of copying n+1 bytes to the buffer.
The previous implementation used strncat() which has the unfortunate and
unintuitive behavior of copying n+1 bytes to the buffer.
src/utils_cache.c: Remove incorrect free.
"ce" is not updated / used in this loop, so it would be theoretically
possible for "ce" to be freed twice.
"ce" is not updated / used in this loop, so it would be theoretically
possible for "ce" to be freed twice.
fix openldap segfatult when ldapi is used v2
fix openldap segfatult when ldapi is used
Merge branch 'collectd-5.4' into collectd-5.5
network plugin: Avoid "status may be used uninitialized" warning.
liboconfig: Declare yylex().
email plugin: Fix freeing linked lists.
The previous code essentially did:
for (…; …; ptr = ptr->next)
free (ptr);
The "ptr->next" is a use-after-free.
The previous code essentially did:
for (…; …; ptr = ptr->next)
free (ptr);
The "ptr->next" is a use-after-free.
network plugin: Make sure all memory is freed when the receive thread fails.
Not all that useful (your receive thread just died …) but hopefully
makes the static analysis happy.
Not all that useful (your receive thread just died …) but hopefully
makes the static analysis happy.
Merge branch 'collectd-5.4' into collectd-5.5
Merge remote-tracking branch 'github/pr/1088' into collectd-5.4
src/utils_llist.c: Handle unlikely corner case.
This handles the following (unlikely) case:
(l->head == NULL) && (e == NULL)
In this case, the following code will dereference a NULL pointer:
if (l->head == e)
l->head = e->next;
This handles the following (unlikely) case:
(l->head == NULL) && (e == NULL)
In this case, the following code will dereference a NULL pointer:
if (l->head == e)
l->head = e->next;
src/utils_avltree.c: Rewrite checks in c_avl_pick().
The previous code made the (correct) assumption that "height" is always
greater than zero. This tripped up clang's "scan-build".
This confuses the static analysis in two more places in this file, which
are not as easy to fix :(
The previous code made the (correct) assumption that "height" is always
greater than zero. This tripped up clang's "scan-build".
This confuses the static analysis in two more places in this file, which
are not as easy to fix :(
ceph plugin: Fix allocation size.
barometer plugin: Fix allocation size.
network plugin: Explicitly initialize "fd_num" to zero.
I have the feeling that initialization via memset() and unions in the sockent
structure confuse clang's scan-build.
I have the feeling that initialization via memset() and unions in the sockent
structure confuse clang's scan-build.
notification target: Pass void** to tn_destroy().
The previous call was bad, resulting in errors in free().
The previous call was bad, resulting in errors in free().
perl plugin: Fix invalid free().
notification_meta_t.name is a char[], which we must not free.
notification_meta_t.name is a char[], which we must not free.
liboconfig: Disable some clang warnings.
Hopefully fixes:
scanner.c:4128:17: error: unused function 'yyunput' [-Werror,-Wunused-function]
static void yyunput (int c, register char * yy_bp )
^
scanner.c:4173:16: error: function 'input' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static int input (void)
^
2 errors generated.
Hopefully fixes:
scanner.c:4128:17: error: unused function 'yyunput' [-Werror,-Wunused-function]
static void yyunput (int c, register char * yy_bp )
^
scanner.c:4173:16: error: function 'input' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static int input (void)
^
2 errors generated.
liboconfig: Declare yyparse().
Should hopefully fix:
oconfig.c:68:12: error: implicit declaration of function 'yyparse' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
status = yyparse ();
^
Should hopefully fix:
oconfig.c:68:12: error: implicit declaration of function 'yyparse' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
status = yyparse ();
^
In rrd synchronous file creation use lock_file
to prevent the creation of the same file at the same time multiple times
and obtain a corrupt rrd file.
to prevent the creation of the same file at the same time multiple times
and obtain a corrupt rrd file.
Allow empty Plugin blocks.
Allow empty Plugin blocks.
use counter type for Innodb_buffer_pool_pages_flushed
Fix 64 bit check issue, running the preprocessor does not honour CFLAGS which holds the relevant -m64
Corrected text in README
Merge branch 'collectd-5.4' into collectd-5.5
Conflicts:
src/write_redis.c
Conflicts:
src/write_redis.c
Revert "contrib/redhat/collectd.spec: added bison and flex"
This reverts commit 38203b1c8d8a8e5e567d7f6783dd8b88a2487070.
A misunderstanding about which tarball to use with the RPM specfile led
us here. See #1079 for the whole conversation.
This reverts commit 38203b1c8d8a8e5e567d7f6783dd8b88a2487070.
A misunderstanding about which tarball to use with the RPM specfile led
us here. See #1079 for the whole conversation.
configure: turbostat: check for MSR_PKG_C10_RESIDENCY symbol
Older versions of `asm/msr-index.h` don't have all the symbol needed to
build the turbostat plugin. Checking for MSR_PKG_C10_RESIDENCY seems to
guarantee we have a recent enough `asm/msr-index.h`.
Fixes #1075
Older versions of `asm/msr-index.h` don't have all the symbol needed to
build the turbostat plugin. Checking for MSR_PKG_C10_RESIDENCY seems to
guarantee we have a recent enough `asm/msr-index.h`.
Fixes #1075
collectd.conf.pod: update libyajl URL
Fixes #1081
Thanks to @msalmonse for pointing this out!
Fixes #1081
Thanks to @msalmonse for pointing this out!
Fix a libtool warning
libtool: warning: '-version-info/-version-number' is ignored for
convenience libraries
libtool: warning: '-version-info/-version-number' is ignored for
convenience libraries
Merge remote-tracking branch 'github/pr/1065' into collectd-5.5
contrib/redhat/collectd.spec: added bison and flex
Current .spec does not work due to missing bison and flex dependencies.
This fix lets install bison and flex into the build environment as well as
define YACC and YFLAGS environment variables.
Current .spec does not work due to missing bison and flex dependencies.
This fix lets install bison and flex into the build environment as well as
define YACC and YFLAGS environment variables.
write_redis plugin: Check the return value of format_values().
write_redis: Increase parsability by using format_values from common.h
write_redis: Increase parsability of multi-valued keys by insterting delimiting characters
configure.ac: Move all checks for "struct ip6_ext" into one place.
Fixes: #348
Fixes: #348
Automatically add -DSOLARIS2=8 if required for ip6_ext
Fixes: #348
Fixes: #348
processes plugin: Initialize the cswitch_{in,}vol fields.
Makefile.am: Link tests with required libraries, too.
"make check" fails on Solaris because libraries are missing:
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
kstat_data_lookup ./.libs/libcommon.a(common.o)
kstat_lookup ./.libs/libcommon.a(common.o)
kstat_read ./.libs/libcommon.a(common.o)
getaddrinfo ./.libs/libcommon.a(common.o)
freeaddrinfo ./.libs/libcommon.a(common.o)
gai_strerror ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
"make check" fails on Solaris because libraries are missing:
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
kstat_data_lookup ./.libs/libcommon.a(common.o)
kstat_lookup ./.libs/libcommon.a(common.o)
kstat_read ./.libs/libcommon.a(common.o)
getaddrinfo ./.libs/libcommon.a(common.o)
freeaddrinfo ./.libs/libcommon.a(common.o)
gai_strerror ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
configure.ac: Ask users to build 64-bit Solaris binaries.
By default, the compilers will build 32-bit binaries on Solaris. This is
sub-optimal for us, for example reading /proc entries for 64-bit
processes doesn't work when collectd is 32-bit.
Fixes: #1077
By default, the compilers will build 32-bit binaries on Solaris. This is
sub-optimal for us, for example reading /proc entries for 64-bit
processes doesn't work when collectd is 32-bit.
Fixes: #1077
Merge branch 'collectd-5.4' into collectd-5.5
dns plugin: Check for "struct ip6_ext".
Solaris appears to declare the struct, but only when The Right defines
are specified at compile time. As a quick and dirty fix, only build with
IPv6 support when the struct is usable.
Fixes: #348
Solaris appears to declare the struct, but only when The Right defines
are specified at compile time. As a quick and dirty fix, only build with
IPv6 support when the struct is usable.
Fixes: #348
smart: KNF
Update smart.c
Are you sure this doesn't memory-leak?
(I didn't have time to run valgrind but is it possible that this command is missing?)
Are you sure this doesn't memory-leak?
(I didn't have time to run valgrind but is it possible that this command is missing?)
vmem plugin: fix types for nr_dirtied and nr_written
tcpconns plugin: Fix memory leak.
"prev" was set to NULL and never updated, leading to "port_list_head" to
be set to an entry later in the list. This leaks memory because earlier
entries in the list are now unreachable.
Fixes: #1074
"prev" was set to NULL and never updated, leading to "port_list_head" to
be set to an entry later in the list. This leaks memory because earlier
entries in the list are now unreachable.
Fixes: #1074
tail plugin: initialize user_data_t
src/configfile.c: Set a plugin context when autoloading plugins.
Fixes: #1069
Fixes: #1069
statsd plugin: Dispatch NaN when no timer event was recorded.
This makes timing events appear faster when writing to RRD files.
Fixes: #1038, #1049
This makes timing events appear faster when writing to RRD files.
Fixes: #1038, #1049
Fix VERSION->PACKAGE_VERSION and PACKAGE->PACKAGE_NAME so they're always defined
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.
disk plugin: Coding style changes.
I also reorganized the code to try to keep the CFReleases and
IOObjectReleases a little more manageable.
Signed-off-by: Florian Forster <octo@collectd.org>
I also reorganized the code to try to keep the CFReleases and
IOObjectReleases a little more manageable.
Signed-off-by: Florian Forster <octo@collectd.org>
disk plugin: Fix compatibility for Mac OS X 10.10.
Here’s a fixed version of the disk plugin that makes it work under Mac
OSX 10.10, and hopefully previous releases. The original version was
looking for the disk name in one dictionary, but it was actually in
another. I suspect at some point, Apple moved the disk name property,
but I don’t have any previous releases to check.
I changed the code to look for the disk name in both dictionaries, so
hopefully it’s backward compatible.
Signed-off-by: Florian Forster <octo@collectd.org>
Here’s a fixed version of the disk plugin that makes it work under Mac
OSX 10.10, and hopefully previous releases. The original version was
looking for the disk name in one dictionary, but it was actually in
another. I suspect at some point, Apple moved the disk name property,
but I don’t have any previous releases to check.
I changed the code to look for the disk name in both dictionaries, so
hopefully it’s backward compatible.
Signed-off-by: Florian Forster <octo@collectd.org>
tail_csv plugin: Print warning and continue when metric is not found.
Previously, when multiple metrics were specified on one "Collect" line and one
didn't exist, all *following* metrics would be ignored. This patch changes this
to continue in this case and configure as many metrics as possible.
Previously, when multiple metrics were specified on one "Collect" line and one
didn't exist, all *following* metrics would be ignored. This patch changes this
to continue in this case and configure as many metrics as possible.
Plugin tail_csv: the manual says that you can use multiple times the
Collect option but the code expecs t"Collect n1 n2 n3 n4", fix
to allow to put the option Collect multiple times.
Collect option but the code expecs t"Collect n1 n2 n3 n4", fix
to allow to put the option Collect multiple times.
Plugin tail_csv: if TimeFrom is not specified in config file
the default value for time_from is -1 and the type of fileds_num
is size_t, so the comparsion of signed and unsigned not work as espected
the default value for time_from is -1 and the type of fileds_num
is size_t, so the comparsion of signed and unsigned not work as espected
stats plugin: Fix reference of undeclared symbol.
Issue: #997
Issue: #997
statsd plugin: Free latency counter and AVL trees.
latency counters (used by TIMER metrics) and AVL trees (used by SET metrics)
were not freed when cleaning up unused metrics. This resulted in leaked memory.
Fixes: #997
latency counters (used by TIMER metrics) and AVL trees (used by SET metrics)
were not freed when cleaning up unused metrics. This resulted in leaked memory.
Fixes: #997
cpu plugin: Correct number of expected CPU states on Mac OS X.
This appears to be a regression introduced in f14ab935. Thanks to Robert Viduya
for reporting the bug.
Signed-off-by: Florian Forster <octo@collectd.org>
This appears to be a regression introduced in f14ab935. Thanks to Robert Viduya
for reporting the bug.
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'origin/collectd-5.3' into collectd-5.4
update changelog + bump release dates
Build system: Fix linking with libheap.la and depend on testing.h.
collectd-tg tried to link with libheap.a (instead of ….la), which
doesn't exist. testing.h was not mentioned by any target, leading to it
being missing form the tarballs.
collectd-tg tried to link with libheap.a (instead of ….la), which
doesn't exist. testing.h was not mentioned by any target, leading to it
being missing form the tarballs.
Build system: Build tested units as libraries.
This simplifies the build rules for the tests, aka. check programs.
* test_foo.c have been renamed to foo_test.c.
* foo_test.c now reside right next to foo.c and foo.h.
* Build and refer to .la files, rather than depending on .c files from
other directories.
Fixes: #1042
This simplifies the build rules for the tests, aka. check programs.
* test_foo.c have been renamed to foo_test.c.
* foo_test.c now reside right next to foo.c and foo.h.
* Build and refer to .la files, rather than depending on .c files from
other directories.
Fixes: #1042
write_redis: Replaced method for checking for a NULL value for the redis connection
write_redis: Log error message from redis command failures
write_redis: improve checking the redis connection
Filterchain: if we don't find a writer, output the available writers to syslog.
bindings/java/Makefile.am: Add "uninstall-local" target.
Otherwise "make distcheck" will complain about leftover files.
Otherwise "make distcheck" will complain about leftover files.
bindings/java/Makefile.am: Use $(srcdir) when specifying dependencies.
This fixes out-of-tree builds, like "make distcheck" does.
This fixes out-of-tree builds, like "make distcheck" does.