Merge branch 'collectd-5.5'
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.
Merge branch 'collectd-5.5'
fix openldap segfatult when ldapi is used v2
fix openldap segfatult when ldapi is used
Merge remote-tracking branch 'github/pr/1087'
Merge branch 'collectd-5.5'
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.5'
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 ();
^
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
add support for simple authentication
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.
network plugin: Simplify config handling.
Remove network_config_set_{boolean,string} and replace them with
cf_util_get_{boolean,string}. The other, more specialized, config handling
functions were also simplified.
Remove network_config_set_{boolean,string} and replace them with
cf_util_get_{boolean,string}. The other, more specialized, config handling
functions were also simplified.
Allow empty Plugin blocks.
Allow empty Plugin blocks.
use counter type for Innodb_buffer_pool_pages_flushed
Merge remote-tracking branch 'github/pr/1085'
Fix 64 bit check issue, running the preprocessor does not honour CFLAGS which holds the relevant -m64
use counter type for Innodb_buffer_pool_pages_flushed
Merge branch 'collectd-5.5'
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
Merge branch '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.
Merge branch 'collectd-5.5'
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
zone plugin: Fix strerror -> sstrerror.
zone plugin: Minor code cleanups.
zone plugin: Undefine _FILE_OFFSET_BITS when building on 32bit hosts.
Fixes: #1077
Fixes: #1077
Merge branch 'collectd-5.5'
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?)
smart: KNF
Merge pull request #1076 from schuellerf/master
Update smart.c
Update smart.c
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
src/daemon/configfile.c: Remove unnecessary "continue" statements.
Merge remote-tracking branch 'github/pr/1067'
plugin: not return -1 if plugin_flush_callback_name fails
Do not call plugin_unregister if the read registration fails.
plugin: fix white space.
plugin: remove cast type information from malloc.
plugin: move the code to create flush/name to plugin_flush_callback_name
apcups plugin: Implement the "PersistentConnection" option.
If set to false, close the connection after each interval. This lets
users chose this method if persistent connections pose a problem.
Fixes: #617
If set to false, close the connection after each interval. This lets
users chose this method if persistent connections pose a problem.
Fixes: #617
apcups plugin: Handle "END APC" lines correctly and stop reading.
Fixes: #617
Fixes: #617
apcups plugin: Fight code rot.
* Use the cleaner "complex" config and the cf_util_* functions.
* Rename "host" and "port" to "node" and "service".
Use cf_util_get_service() so users may specify services as string.
* Remove unused defines.
* Use the cleaner "complex" config and the cf_util_* functions.
* Rename "host" and "port" to "node" and "service".
Use cf_util_get_service() so users may specify services as string.
* Remove unused defines.
Support for call the flush callback at regular intervals using
the read plugin callback.
the read plugin callback.
varnish: update plugin_register_complex_read() to new default value
... just a follow up to cce136946b, in which one of the two
plugin_register_complex_read() calls got missed out.
... just a follow up to cce136946b, in which one of the two
plugin_register_complex_read() calls got missed out.
processes: revert re-introduction of ps_read_tasks
This commit partially revert 30eeeee996124de666f907877f8196e5580101ed
which solved incorrectly the merge conflict
Signed-off-by: Arthur Gautier <baloo@gandi.net>
This commit partially revert 30eeeee996124de666f907877f8196e5580101ed
which solved incorrectly the merge conflict
Signed-off-by: Arthur Gautier <baloo@gandi.net>
src/daemon/plugin.[ch]: Use cdtime_t for the interval argument of "register complex read".
All plugins converted to "struct timespec", just so that
plugin_register_complex_read() would convert back to cdtime_t again. This patch
removed this crazyness; the new "determine automatically" value is zero (used
to be NULL).
All plugins converted to "struct timespec", just so that
plugin_register_complex_read() would convert back to cdtime_t again. This patch
removed this crazyness; the new "determine automatically" value is zero (used
to be NULL).
Merge remote-tracking branch 'github/pr/1036'
Conflicts:
src/processes.c
Conflicts:
src/processes.c
Merge branch 'pr/1033'
processes plugin: Read number of threads from /proc/$pid/stat as a fallback.
Should reading the number of threads from /prod/$pid/status fail, use the
number provided by /prod/$pid/stat as a fallback. If that fails, too, use 1.
As discussed with @manuelluis in #1033.
Should reading the number of threads from /prod/$pid/status fail, use the
number provided by /prod/$pid/stat as a fallback. If that fails, too, use 1.
As discussed with @manuelluis in #1033.
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>
Remove old systemd unit
collectd.service superseded by systemd.collectd.service
collectd.service superseded by systemd.collectd.service
Merge remote-tracking branch 'github/pr/1056'
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 network: add support for the timeout argument in the flush callback