Code

collectd.git
10 years agocorrect typo in error message
Marc Fournier [Tue, 24 Jun 2014 15:48:26 +0000 (17:48 +0200)]
correct typo in error message

10 years agoSyslog: if we can't find the loglevel specified by the configuration string default...
Wilfried Goesgens [Sat, 7 Jun 2014 10:01:32 +0000 (12:01 +0200)]
Syslog: if we can't find the loglevel specified by the configuration string default to 'info' and warn about the unknown configuration option. no way to make syslog totaly silent anymore.

10 years agoBit shift right by 8 to get return code from exit status
Scott Sanders [Fri, 19 Sep 2014 14:31:18 +0000 (10:31 -0400)]
Bit shift right by 8 to get return code from exit status

Pull-Request: #741
Signed-off-by: Florian Forster <octo@collectd.org>
10 years agocpu plugin: Remove temperature code for Mac OS X.
Florian Forster [Wed, 17 Sep 2014 06:24:57 +0000 (08:24 +0200)]
cpu plugin: Remove temperature code for Mac OS X.

This code would throw an error for some systems, because the temperature
couldn't be read. Since the plugin still works in general, this was very
confusing to users. Becaus the temperature, even when read sucessfully, was
never dispatched, remove the code entirely. We might want to add this back to
the apple_sensors plugin eventually.

Fixes: #22
10 years agoswap plugin: Make "cached" optional under Linux.
Florian Forster [Wed, 17 Sep 2014 05:41:38 +0000 (07:41 +0200)]
swap plugin: Make "cached" optional under Linux.

This is the smallest possible fix for OpenVZ, where cached is not available.
master has a more complete fix which should be used going forward.

Fixes: #733
10 years agoFix typo in if caluse
Vladimir Smirnov [Wed, 10 Sep 2014 19:08:50 +0000 (21:08 +0200)]
Fix typo in if caluse

Fixes #729

Signed-off-by: Florian Forster <octo@collectd.org>
10 years agosrc/common.c: Fix strstripnewline().
Florian Forster [Wed, 10 Sep 2014 14:54:26 +0000 (16:54 +0200)]
src/common.c: Fix strstripnewline().

Because the length of the string was decremented too late, the function
would actually overwrite the trailing null byte instead of the newline.

10 years agoRPM specfile: enable netlink plugin on RHEL > 5
Marc Fournier [Mon, 8 Sep 2014 14:59:30 +0000 (16:59 +0200)]
RPM specfile: enable netlink plugin on RHEL > 5

10 years agoRPM specfile: fix bogus dates
Marc Fournier [Mon, 8 Sep 2014 14:42:14 +0000 (16:42 +0200)]
RPM specfile: fix bogus dates

modern rpmbuild versions appear to be more strict on this point.

10 years agoRPM specfile: support for RHEL7
Marc Fournier [Mon, 8 Sep 2014 14:41:21 +0000 (16:41 +0200)]
RPM specfile: support for RHEL7

10 years agoRPM specfile: add missing %files section for modbus plugin
Marc Fournier [Mon, 8 Sep 2014 12:12:51 +0000 (14:12 +0200)]
RPM specfile: add missing %files section for modbus plugin

complement to a781eb2c5

10 years agoRPM specfile: remove duplicate modbus block
Marc Fournier [Mon, 8 Sep 2014 10:26:55 +0000 (12:26 +0200)]
RPM specfile: remove duplicate modbus block

10 years agonetwork plugin: Improve client connecting behavior.
Florian Forster [Sat, 6 Sep 2014 08:58:45 +0000 (10:58 +0200)]
network plugin: Improve client connecting behavior.

This moves the socket creation logic so it's called from
networt_send_buffer_plain(). This allows us to recover after network
failures or when collectd was started before the network was available.

Fixes: #627
10 years agosrc/utils_match.[ch]: Implement match_value_reset().
Florian Forster [Wed, 3 Sep 2014 07:10:00 +0000 (09:10 +0200)]
src/utils_match.[ch]: Implement match_value_reset().

This is called from the curl and memcachec plugins. Previously, gauge
average, minimum and maximum values were calculated since the start of
the daemon, rather than per-interval. This is not the documented
functionality.

Fixes: #663
10 years agocurl plugin: Use the utility functions for config handling.
Florian Forster [Wed, 3 Sep 2014 05:39:27 +0000 (07:39 +0200)]
curl plugin: Use the utility functions for config handling.

10 years agoMerge remote-tracking branch 'github/collectd-5.3' into collectd-5.3
Florian Forster [Tue, 2 Sep 2014 17:51:37 +0000 (19:51 +0200)]
Merge remote-tracking branch 'github/collectd-5.3' into collectd-5.3

10 years agosrc/meta_data.c: If the meta_data_t is empty, avoid calling malloc(0).
Florian Forster [Tue, 2 Sep 2014 17:50:47 +0000 (19:50 +0200)]
src/meta_data.c: If the meta_data_t is empty, avoid calling malloc(0).

10 years agosrc/utils_format_json.c: Handle empty meta_data_t gracefully.
Florian Forster [Tue, 2 Sep 2014 17:49:11 +0000 (19:49 +0200)]
src/utils_format_json.c: Handle empty meta_data_t gracefully.

Previously, `meta != NULL` and `keys_num == 0` was possible and would
result in "{}", which is not valid JSON.

Fixes: 716
10 years agopython plugin: Don't create empty meta_data_t objects.
Florian Forster [Tue, 2 Sep 2014 17:48:10 +0000 (19:48 +0200)]
python plugin: Don't create empty meta_data_t objects.

Fixes: #716
10 years agosrc/utils_rrdcreate.c: Free "args".
Florian Forster [Tue, 2 Sep 2014 14:54:07 +0000 (16:54 +0200)]
src/utils_rrdcreate.c: Free "args".

Thanks to Yves Mettier for pointing this out!

Fixes: #661
10 years agoRPM specfile: update changelog without incrementing release number
Marc Fournier [Fri, 29 Aug 2014 15:20:57 +0000 (17:20 +0200)]
RPM specfile: update changelog without incrementing release number

10 years agoGenericJMXConfConnection: Remove unused imports.
Florian Forster [Thu, 28 Aug 2014 18:55:45 +0000 (20:55 +0200)]
GenericJMXConfConnection: Remove unused imports.

10 years agojava plugin: Make sure cjni_thread_detach() is called on all paths.
Florian Forster [Thu, 28 Aug 2014 18:41:25 +0000 (20:41 +0200)]
java plugin: Make sure cjni_thread_detach() is called on all paths.

Each call to cjni_thread_attach() much be accompanied by
a call to cjni_thread_detach(). Some error handling cases were missing
the call, potentially locking the plugin up.

10 years agoEL <6 provide perl-ExtUtils-Embed with base perl
Kevin Bowling [Thu, 14 Aug 2014 09:30:45 +0000 (02:30 -0700)]
EL <6 provide perl-ExtUtils-Embed with base perl

Conflicts:
contrib/redhat/collectd.spec

10 years agocollectd.conf: Fix default packet size of the network plugin.
Florian Forster [Mon, 18 Aug 2014 07:58:34 +0000 (09:58 +0200)]
collectd.conf: Fix default packet size of the network plugin.

Fixes: #710
10 years agoMerge branch 'collectd-4.10' into collectd-5.3
Florian Forster [Mon, 18 Aug 2014 07:33:29 +0000 (09:33 +0200)]
Merge branch 'collectd-4.10' into collectd-5.3

10 years agocurl_xml plugin: Fixed tautological pointer comparison error.
Arthur Marble [Sun, 17 Aug 2014 22:34:04 +0000 (17:34 -0500)]
curl_xml plugin: Fixed tautological pointer comparison error.

Fixes: http://bugs.debian.org/758481
Signed-off-by: Florian Forster <octo@collectd.org>
10 years agocollectd.conf(5): add detail & example about multi-instance filterchain targets
Marc Fournier [Wed, 13 Aug 2014 07:09:14 +0000 (09:09 +0200)]
collectd.conf(5): add detail & example about multi-instance filterchain targets

10 years agosnmp: free snmp_pdu struct allocated by snmp_pdu_create()
Marc Fournier [Fri, 8 Aug 2014 13:55:10 +0000 (15:55 +0200)]
snmp: free snmp_pdu struct allocated by snmp_pdu_create()

This should fix the leak reported in issue #610.

10 years agoMerge pull request #689 from ymettier/ym/cd53_fix_tcpconns_inet_diag
Marc Fournier [Thu, 7 Aug 2014 12:32:47 +0000 (14:32 +0200)]
Merge pull request #689 from ymettier/ym/cd53_fix_tcpconns_inet_diag

Fix for 'linux/inet_diag.h: No such file or directory'

10 years agoRedHat RPM spec: add modbus plugin
Marc Fournier [Wed, 6 Aug 2014 14:59:21 +0000 (16:59 +0200)]
RedHat RPM spec: add modbus plugin

...  now that EPEL6 provides libmodbus

10 years agoFix for 'linux/inet_diag.h: No such file or directory'
Yves Mettier [Mon, 4 Aug 2014 12:01:01 +0000 (14:01 +0200)]
Fix for 'linux/inet_diag.h: No such file or directory'

10 years agofix: use DOUBLE_TO_CDTIME_T() to match input type
Marc Fournier [Mon, 4 Aug 2014 11:37:09 +0000 (13:37 +0200)]
fix: use DOUBLE_TO_CDTIME_T() to match input type

... as strtod() returns a double not a time_t.

Follow-up to 7d1d59fb to match what ada80db25 does (currently in
master) and avoid a merge conflict.

10 years agomistake, SAVE_LIBS="$LIBS" is correct.
KOMEDA Shinji [Wed, 30 Jul 2014 08:56:07 +0000 (17:56 +0900)]
mistake, SAVE_LIBS="$LIBS" is correct.

10 years agopatch required to build oracle plugin, collectd-5.4.0 (#653)
KOMEDA Shinji [Wed, 25 Jun 2014 13:34:15 +0000 (22:34 +0900)]
patch required to build oracle plugin, collectd-5.4.0 (#653)

10 years agoMerge pull request #579 from mfournier/libiptc-ldflags
Pierre-Yves Ritschard [Mon, 28 Jul 2014 20:48:17 +0000 (22:48 +0200)]
Merge pull request #579 from mfournier/libiptc-ldflags

link iptables plugin against flags from pkg-config

10 years agoutils_vl_lookup: Fixed a race when creating user objects.
Sebastian Harl [Sun, 27 Jul 2014 12:15:23 +0000 (14:15 +0200)]
utils_vl_lookup: Fixed a race when creating user objects.

This could cause multiple aggregation instances to be created in the
aggregation plugin when first writing data to the plugin. This, in turn, led
to "value too old" warnings because subsequently all data was submitted twice.

Thanks to @faxm0dem for reporting this in GH #535.

10 years agoPlugin exec: change notification time to integer.
Manuel Luis Sanmartín Rozada [Thu, 19 Jun 2014 14:37:15 +0000 (16:37 +0200)]
Plugin exec: change notification time to integer.
  Acording to collectd-exec.5 NOTIFICATION DATA FORMAT: time is epoch, i. e. as seconds since 1970-01-01 00:00:00 UTC.

10 years agocmd PUTNOTIF time option: handle double values.
Manuel Luis Sanmartín Rozada [Thu, 19 Jun 2014 17:14:53 +0000 (19:14 +0200)]
cmd PUTNOTIF time option: handle double values.

Conflicts:
src/utils_cmd_putnotif.c

10 years agoPlugin java: fix notification time conversion to cdtime_t.
Manuel Luis Sanmartín Rozada [Thu, 19 Jun 2014 13:14:02 +0000 (15:14 +0200)]
Plugin java: fix notification time conversion to cdtime_t.

10 years agoPlugin threshold: time is not set in missing notifications.
Manuel Luis Sanmartín Rozada [Thu, 19 Jun 2014 14:50:48 +0000 (16:50 +0200)]
Plugin threshold: time is not set in missing notifications.

10 years agomanpage: document 2 missing options to amqp plugin section
Marc Fournier [Tue, 24 Jun 2014 15:09:08 +0000 (17:09 +0200)]
manpage: document 2 missing options to amqp plugin section

10 years agoadd missing backticks which broke the build
Marc Fournier [Mon, 23 Jun 2014 16:00:01 +0000 (18:00 +0200)]
add missing backticks which broke the build

10 years agowrite_riemann: coding style consistency
Marc Fournier [Mon, 23 Jun 2014 14:47:20 +0000 (16:47 +0200)]
write_riemann: coding style consistency

Make the style in line with 50d1b34d6 (from master) and avoid later
merge conflict.

10 years agodon't assume pkg-config is in PATH
Lauri Tirkkonen [Thu, 22 May 2014 11:05:40 +0000 (14:05 +0300)]
don't assume pkg-config is in PATH

10 years agoConfigparser: when we alocate an empty list, we also need to reset the counter; else...
Wilfried Goesgens [Thu, 5 Jun 2014 18:04:13 +0000 (20:04 +0200)]
Configparser: when we alocate an empty list, we also need to reset the counter; else we will trip over this later.
This fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750440

10 years agoAdd DeleteSocket option in synopsis of manpage
txaj [Mon, 28 Apr 2014 16:28:41 +0000 (11:28 -0500)]
Add DeleteSocket option in synopsis of manpage

Signed-off-by: Florian Forster <octo@collectd.org>
10 years agoadd brackets to the list of characters graphite chokes on
Marc Fournier [Tue, 1 Apr 2014 22:22:34 +0000 (00:22 +0200)]
add brackets to the list of characters graphite chokes on

10 years agoGraphite deals poorly with metric names containing quotes.
Pierre-Yves Ritschard [Fri, 24 Jan 2014 15:49:22 +0000 (16:49 +0100)]
Graphite deals poorly with metric names containing quotes.

Sanitize graphite metrics with our own escaping function,
better suited for this use-case than the one in `utils_parse_option`

10 years agofix for #477: Notification time gone wrong
Adrian Miron [Sat, 8 Mar 2014 16:56:11 +0000 (18:56 +0200)]
fix for #477: Notification time gone wrong

Sub-second time handling was added in collectd 5.0.0. This adds support
for this to the target_notification plugin, which got missed out at the
time.

10 years agoUpdated Color to match DataSources and DSName for single-series graphs.
Joel Uckelman [Tue, 4 Mar 2014 11:07:04 +0000 (12:07 +0100)]
Updated Color to match DataSources and DSName for single-series graphs.

10 years agoFix missed change from int to double for interval
Justin Burnham [Thu, 6 Mar 2014 06:36:21 +0000 (22:36 -0800)]
Fix missed change from int to double for interval

10 years agoindent wh_init() to be consistent with the rest of the file
Marc Fournier [Sat, 29 Mar 2014 12:37:36 +0000 (13:37 +0100)]
indent wh_init() to be consistent with the rest of the file

10 years agoCall curl_global_init() in _init of plugins using curl
Jeremy Katz [Mon, 27 Jan 2014 01:43:19 +0000 (20:43 -0500)]
Call curl_global_init() in _init of plugins using curl

Need to call curl_global_init() or curl_easy_init() during init
for plugins when we're still running single threaded.  This
updates the remaining ones

10 years agolink iptables plugin against flags from pkg-config
Marc Fournier [Mon, 10 Mar 2014 20:28:36 +0000 (21:28 +0100)]
link iptables plugin against flags from pkg-config

This solves issue #326 for ubuntu versions >= 13.10

10 years agowrite_riemann plugin: Receive acknowledge message when using TCP.
John-John Tedro [Tue, 17 Sep 2013 13:40:13 +0000 (15:40 +0200)]
write_riemann plugin: Receive acknowledge message when using TCP.

Not receiving an acknowledge message when communicating with riemann over TCP
will cause the riemann instance to eventually hang for extended periods of time
because of resource exhaustion.

Took the time to reaorganize the riemann_send function to simplify locking.

10 years agoPlease free strings *after* printing them ;-)
Matthias Urlichs [Wed, 5 Feb 2014 09:49:24 +0000 (10:49 +0100)]
Please free strings *after* printing them ;-)

Signed-off-by: Florian Forster <octo@collectd.org>
10 years agoMerge remote-tracking branch 'origin/collectd-4.10' into collectd-5.3
Marc Fournier [Thu, 23 Jan 2014 13:18:08 +0000 (14:18 +0100)]
Merge remote-tracking branch 'origin/collectd-4.10' into collectd-5.3

10 years agoMerge remote-tracking branch 'origin/pr/490' into collectd-5.3
Marc Fournier [Thu, 23 Jan 2014 13:17:25 +0000 (14:17 +0100)]
Merge remote-tracking branch 'origin/pr/490' into collectd-5.3

10 years agoconfigure: Fixed linker options when checking for amqp_tcp_socket_new. sh/collectd-5.3
Sebastian Harl [Wed, 22 Jan 2014 12:34:30 +0000 (13:34 +0100)]
configure: Fixed linker options when checking for amqp_tcp_socket_new.

This fixes the check when using GCC's --as-needed which fails when options are
not specified in the right order. Libraries (-l options) have to be specified
after any source files. autoconf does the right thing when using $LIBS for
that case rather than $LDFLAGS.

10 years agoamqp plugin: Don't use C++ style comments.
Sebastian Harl [Wed, 22 Jan 2014 12:29:53 +0000 (13:29 +0100)]
amqp plugin: Don't use C++ style comments.

10 years agoMerge pull request #2 from mfournier/amqp-symbol_lookup
Sebastian Harl [Wed, 22 Jan 2014 12:27:30 +0000 (04:27 -0800)]
Merge pull request #2 from mfournier/amqp-symbol_lookup

amqp: fix symbol lookup error with librabbitmq >= 0.4.0

10 years agoamqp: fix symbol lookup error with librabbitmq >= 0.4.0
Marc Fournier [Tue, 21 Jan 2014 09:24:53 +0000 (10:24 +0100)]
amqp: fix symbol lookup error with librabbitmq >= 0.4.0

amqp_socket_close() which we were using isn't exported anymore.
See https://github.com/alanxz/rabbitmq-c/commit/bdda7ab

amqp_destroy_connection() implicitly closes the socket, so we don't need
to bother about this if using librabbitmq >= 0.4.0

credits to @tokkee for figuring that out !

10 years agonetwork: comment libgcrypt initalization process
Marc Fournier [Wed, 15 Jan 2014 23:30:42 +0000 (00:30 +0100)]
network: comment libgcrypt initalization process

10 years agoapache plugin: Call curl_global_init() from the init function.
Florian Forster [Wed, 15 Jan 2014 22:47:33 +0000 (23:47 +0100)]
apache plugin: Call curl_global_init() from the init function.

This is a shot in the dark in trying to address #513. By calling this
from an init() callback, I hope to be initializing the curl and gcrypt
libraries before collectd becomes multi-threaded, avoiding the problems
described in the issue.

10 years ago[network] set_thread_cbs so we initialize the right threading mode in gcry_check_version
Chris Lundquist [Wed, 15 Jan 2014 02:33:13 +0000 (18:33 -0800)]
[network] set_thread_cbs so we initialize the right threading mode in gcry_check_version

Signed-off-by: Florian Forster <octo@collectd.org>
10 years agoamqp plugin: Fixed compilation when using rabbitmq-c < 0.4.
Sebastian Harl [Mon, 13 Jan 2014 14:46:43 +0000 (15:46 +0100)]
amqp plugin: Fixed compilation when using rabbitmq-c < 0.4.

Thanks to Marc Fournier for noticing!

10 years agoMerge branch 'collectd-4.10' into collectd-5.3
Marc Fournier [Wed, 8 Jan 2014 17:24:27 +0000 (18:24 +0100)]
Merge branch 'collectd-4.10' into collectd-5.3

10 years agoRevert "curl_xml.c: avoid using uninitalized variable in error message"
Marc Fournier [Wed, 8 Jan 2014 17:05:40 +0000 (18:05 +0100)]
Revert "curl_xml.c: avoid using uninitalized variable in error message"

This reverts commit bbbf37d55a3959951604c4be482e9a705a0f86d9.

A different fix for this problem was commited to the collectd-5.4 branch
(8327ee64) and conflicts with this patch. Also, initializing url the
same way as 8327ee64 does it, to avoid a merge conflict.

10 years agointerface.c: FreeBSD-10 support
Marc Fournier [Tue, 7 Jan 2014 15:06:10 +0000 (16:06 +0100)]
interface.c: FreeBSD-10 support

Quoting @trtrmitya in github issue #506 : "[...] it is broken on
FreeBSD-10, in which getifaddrs() returns not only link level stats for
a particular interface, but also entries for each IP configured on that
interface. As a result if_submit() is called several times for each
interface, which results in incorrect data being logged.

I am attaching a patch which fixes a problem on FreeBSD (9/10), but it
should work for every *BSD because [...] the getifaddrs implementation
first appeared in BSDi BSD/OS."

Many thanks to @trtrmitya for providing the patch !

10 years agocurl_xml.c: avoid using uninitalized variable in error message
Marc Fournier [Tue, 7 Jan 2014 10:30:59 +0000 (11:30 +0100)]
curl_xml.c: avoid using uninitalized variable in error message

Thanks to @trtrmitya for reporting this. Fixes GH#507

10 years agocurl plugin: Fixed a segfault when using <Match> without an Instance.
Sebastian Harl [Sun, 22 Dec 2013 12:59:44 +0000 (13:59 +0100)]
curl plugin: Fixed a segfault when using <Match> without an Instance.

Thanks to Alexander Golovko for reporting this in
http://bugs.debian.org/732701

10 years agoamqp plugin: Added support for rabbitmq-c 0.4.x.
Sebastian Harl [Sat, 23 Nov 2013 14:54:26 +0000 (15:54 +0100)]
amqp plugin: Added support for rabbitmq-c 0.4.x.

Upstream introduced a new socket interface and deprecated the old one. This
leads to compiler errors when using GCC and -Werror.

10 years agocollection3: Fix data source names
Rainer Müller [Wed, 27 Feb 2013 18:46:41 +0000 (19:46 +0100)]
collection3: Fix data source names

Data sources were renamed in 6c1415d, but the data source names for some
of these entries still referenced the old data sources.

11 years agoLink to IOKit using -framework
Rainer Müller [Sun, 10 Nov 2013 02:51:40 +0000 (03:51 +0100)]
Link to IOKit using -framework

The libIOKit.dylib symlink no longer exists in OS X 10.9 Mavericks, we
now have to link using -framework. This should also work in all previous
versions of OS X.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agosrc/types.db: Remove maximum value on "cache_size".
Florian Forster [Wed, 13 Nov 2013 18:59:27 +0000 (19:59 +0100)]
src/types.db: Remove maximum value on "cache_size".

Fixes #466. Thanks to @dlacko for pointing this out!

11 years agoMerge pull request #393 from mfournier/prevent-building-with-old-libpcap
Marc Fournier [Mon, 14 Oct 2013 13:47:05 +0000 (06:47 -0700)]
Merge pull request #393 from mfournier/prevent-building-with-old-libpcap

Prevent building with old libpcap

11 years agofix error message in target_{replace,set}
Marc Fournier [Mon, 7 Oct 2013 21:11:44 +0000 (23:11 +0200)]
fix error message in target_{replace,set}

Remove erroneous hint that "Type" can be altered. Also correct a small
typo. Thanks to @mjulian for pointing that out !

Fixes GH#448

11 years agoUpdate collectd.conf.pod
Fabien Wernli [Fri, 27 Sep 2013 07:42:46 +0000 (09:42 +0200)]
Update collectd.conf.pod

spotted by lukas227 in IRC:
23:43 < lukas227> Hi, I think I found a mistake in the threshold.conf(5) man page: the example
                  THRESHOLD CONFIGURATION is within <Threshold></Threshold> tags, but should
                  probably be within <Plugin "threshold"></Plugin> tags (doesn work with
                  <Threshold> for me)
Day changed to 27 Sep 2013

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoAvoid using first person in the error message
Tim Laszlo [Tue, 24 Sep 2013 18:20:29 +0000 (13:20 -0500)]
Avoid using first person in the error message

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoReplace you with your in error message
Tim Laszlo [Tue, 24 Sep 2013 15:35:22 +0000 (10:35 -0500)]
Replace you with your in error message

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agozfs_arc plugin: Collect "allocated" and "stolen" on FreeBSD only.
Florian Forster [Mon, 19 Aug 2013 15:04:11 +0000 (17:04 +0200)]
zfs_arc plugin: Collect "allocated" and "stolen" on FreeBSD only.

The appropriate log messages have been demoted to WARNING.

Github: #305

11 years agocurl_json plugin: avoid accessing off the end of the avl_tree_s
Jim Radford [Sat, 10 Aug 2013 16:14:27 +0000 (09:14 -0700)]
curl_json plugin: avoid accessing off the end of the avl_tree_s

It's not written this way, but really we have a union { *key; *tree; }
which is differentiated by checking for the presence a magic field
which only exists in key.  This leads to accesses off the end of the
tree.  Putting the magic at start of the key avoids this.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agocurl_json plugin: avoid unlikely overrun
Jim Radford [Sat, 10 Aug 2013 16:10:56 +0000 (09:10 -0700)]
curl_json plugin: avoid unlikely overrun

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoMerge branch 'collectd-5.2' into collectd-5.3
Florian Forster [Sun, 18 Aug 2013 10:13:48 +0000 (12:13 +0200)]
Merge branch 'collectd-5.2' into collectd-5.3

11 years agoAttempt to fix collectd/collectd#229 by doing user / group lookups before we fork.
Ceri Storey [Wed, 14 Aug 2013 15:56:24 +0000 (16:56 +0100)]
Attempt to fix collectd/collectd#229 by doing user / group lookups before we fork.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoRedHat RPM spec: support for RHEL5
Marc Fournier [Tue, 6 Aug 2013 15:25:56 +0000 (17:25 +0200)]
RedHat RPM spec: support for RHEL5

plus some minor updates: bump version to 5.3.1 & add usage example.

11 years agocheck if libpcap has PCAP_ERROR_IFACE_NOT_UP
Marc Fournier [Fri, 9 Aug 2013 12:53:24 +0000 (14:53 +0200)]
check if libpcap has PCAP_ERROR_IFACE_NOT_UP

This should prevent DNS plugin from being built on systems with libpcap
older than 1.0.0.

GitHub issue #373

11 years agomemcached plugin: actually connect when using a unix socket
Jim Radford [Wed, 7 Aug 2013 20:05:47 +0000 (13:05 -0700)]
memcached plugin: actually connect when using a unix socket

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agocsv plugin: set datadir null when free
Manuel Luis Sanmartin Rozada [Tue, 6 Aug 2013 10:30:52 +0000 (12:30 +0200)]
csv plugin: set datadir null when free

If you define twice DataDir:

    <Plugin csv>
DataDir "/opt/collectd/var/lib/collectd/csv"
DataDir stdout
    </Plugin>

the second time datadir will not be null and
you will get garbage in value_list_to_filename

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agocsv plugin: fix forgotten "datadir" in re-implement value_list_to_filename()
Manuel Luis Sanmartin Rozada [Mon, 5 Aug 2013 23:05:01 +0000 (01:05 +0200)]
csv plugin: fix forgotten "datadir" in re-implement value_list_to_filename()

In the commit 7f90e30 the re-implementation of value_list_to_filename
forgot to prepend the datadir string.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agorrdcached, rrdtool plugins: Add directory separator after datadir.
Florian Forster [Wed, 24 Jul 2013 13:36:00 +0000 (15:36 +0200)]
rrdcached, rrdtool plugins: Add directory separator after datadir.

D'oh! Thanks to @rcpoison for pointing this out!

Github: #380

11 years agorrdcached, rrdtool plugins: Honor the "DataDir" setting.
Florian Forster [Wed, 24 Jul 2013 12:12:53 +0000 (14:12 +0200)]
rrdcached, rrdtool plugins: Honor the "DataDir" setting.

This fixes a regression introduced in:
bfd3f06ef4996707036756371c5724ebf2748821

Github: #380

11 years agolpar: make dots in configure.in consistent with other plugins
Marc Fournier [Mon, 15 Jul 2013 09:52:31 +0000 (11:52 +0200)]
lpar: make dots in configure.in consistent with other plugins

11 years agoBump version to 5.3.1; Update ChangeLog. collectd-5.3.1
Florian Forster [Sat, 13 Jul 2013 09:41:35 +0000 (11:41 +0200)]
Bump version to 5.3.1; Update ChangeLog.

11 years agoMerge branch 'collectd-5.2' into collectd-5.3
Florian Forster [Sat, 13 Jul 2013 09:23:32 +0000 (11:23 +0200)]
Merge branch 'collectd-5.2' into collectd-5.3

11 years agosrc/plugin.c: Free the "data_sets" AVL tree.
Florian Forster [Sat, 13 Jul 2013 06:20:28 +0000 (08:20 +0200)]
src/plugin.c: Free the "data_sets" AVL tree.

This pops up every time I investigate memory leaks and it's annoying me.

11 years agowrite_graphite plugin: Don't call close() on invalid file descriptors.
Florian Forster [Sat, 13 Jul 2013 05:46:20 +0000 (07:46 +0200)]
write_graphite plugin: Don't call close() on invalid file descriptors.

11 years agowrite_graphite plugin: Don't call close() on invalid file descriptors.
Florian Forster [Sat, 13 Jul 2013 05:42:18 +0000 (07:42 +0200)]
write_graphite plugin: Don't call close() on invalid file descriptors.

11 years agowrite_graphite plugin: Actually check the return value of wg_send_message().
Florian Forster [Sat, 13 Jul 2013 05:38:05 +0000 (07:38 +0200)]
write_graphite plugin: Actually check the return value of wg_send_message().

Assignment to "status" was missing.