collectd.git
8 years agoMerge remote-tracking branch 'github/pr/1336' into collectd-5.5
Florian Forster [Tue, 1 Dec 2015 20:33:41 +0000 (21:33 +0100)]
Merge remote-tracking branch 'github/pr/1336' into collectd-5.5

8 years agomemcached plugin: Use a DERIVE type for the "listen disabled" metric.
Florian Forster [Tue, 1 Dec 2015 15:25:41 +0000 (16:25 +0100)]
memcached plugin: Use a DERIVE type for the "listen disabled" metric.

Fixes: #1356

8 years agoexec plugin: Revert file mode to 0644.
Florian Forster [Tue, 1 Dec 2015 15:18:38 +0000 (16:18 +0100)]
exec plugin: Revert file mode to 0644.

This fixes a regression from 94e562250296b1435e3e48cd302055d89c4c702b.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Mon, 30 Nov 2015 21:58:29 +0000 (22:58 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoirq plugin: close file descriptor on failure
Ruben Kerkhof [Sat, 28 Nov 2015 22:17:59 +0000 (23:17 +0100)]
irq plugin: close file descriptor on failure

CID 38018

8 years agofhcount plugin: close file descriptor on failure
Ruben Kerkhof [Sat, 28 Nov 2015 22:15:24 +0000 (23:15 +0100)]
fhcount plugin: close file descriptor on failure

8 years agomodbus plugin: fix 2 leaks on error paths
Ruben Kerkhof [Sat, 28 Nov 2015 22:07:31 +0000 (23:07 +0100)]
modbus plugin: fix 2 leaks on error paths

8 years agofilecount plugin: fix leak on error path
Ruben Kerkhof [Sat, 28 Nov 2015 22:13:01 +0000 (23:13 +0100)]
filecount plugin: fix leak on error path

8 years agoceph plugin: close fd on error
Ruben Kerkhof [Sat, 28 Nov 2015 19:07:03 +0000 (20:07 +0100)]
ceph plugin: close fd on error

8 years agobind: tmp doesn't point to start of allocated memory
Ruben Kerkhof [Sat, 28 Nov 2015 18:45:42 +0000 (19:45 +0100)]
bind: tmp doesn't point to start of allocated memory

8 years agoamqp: use the right buffer size for sstrncpy
Ruben Kerkhof [Sat, 28 Nov 2015 17:48:20 +0000 (18:48 +0100)]
amqp: use the right buffer size for sstrncpy

buffer is a char *, not an array, so size_of returns the size
of the pointer.

8 years agopowerdns plugin: fix array initialization
Ruben Kerkhof [Sat, 28 Nov 2015 17:30:58 +0000 (18:30 +0100)]
powerdns plugin: fix array initialization

8 years agoFix build with older version of libprotobuf-c
Ruben Kerkhof [Sat, 28 Nov 2015 13:54:54 +0000 (14:54 +0100)]
Fix build with older version of libprotobuf-c

8 years agogcrypt: take search path into account
Ruben Kerkhof [Tue, 4 Aug 2015 13:40:34 +0000 (15:40 +0200)]
gcrypt: take search path into account

8 years agogcrypt: remove exec-prefix check
Ruben Kerkhof [Tue, 4 Aug 2015 13:28:03 +0000 (15:28 +0200)]
gcrypt: remove exec-prefix check

libgcrypt-config --libs already includes the correct library include path.
Also, we hardcoded it to $exec-prefix/lib, which is just plain wrong on
64bit architectures.

8 years agoprotoc: check for headers in new location as well
Ruben Kerkhof [Sun, 9 Aug 2015 17:05:25 +0000 (19:05 +0200)]
protoc: check for headers in new location as well

Newer versions of protobuf-c have their headers in
/usr/include/protobuf-c, and a symlink from
/usr/include/google/protobuf-c/.

These symlinks will eventually disappear however, so be prepared.

8 years agoprotoc: check for libprotobuf-c as well
Ruben Kerkhof [Sun, 9 Aug 2015 17:02:25 +0000 (19:02 +0200)]
protoc: check for libprotobuf-c as well

8 years agoprotoc: simplify configure check
Ruben Kerkhof [Sun, 9 Aug 2015 16:28:30 +0000 (18:28 +0200)]
protoc: simplify configure check

8 years agoprotoc: slightly nicer output in silent mode
Ruben Kerkhof [Sun, 9 Aug 2015 15:23:11 +0000 (17:23 +0200)]
protoc: slightly nicer output in silent mode

make[1]: Entering directory '/home/ruben/src/collectd/src'
  PROTOC-C     pinba.pb-c.c
  PROTOC-C     riemann.pb-c.c

8 years agoprotoc: log when compiler is missing
Ruben Kerkhof [Sun, 9 Aug 2015 15:02:33 +0000 (17:02 +0200)]
protoc: log when compiler is missing

In the case where we do have the required headers
but don't have the compiler, this makes it more clear
that we're missing the latter.

8 years agoSilence protoc-c in silence mode
Ruben Kerkhof [Sun, 9 Aug 2015 14:09:57 +0000 (16:09 +0200)]
Silence protoc-c in silence mode

Instead of showing the full command line, this shows:
  GEN      pinba.pb-c.c
  GEN      riemann.pb-c.c

8 years agowrite_riemann: only compile .proto files when enabled
Ruben Kerkhof [Sun, 9 Aug 2015 13:52:33 +0000 (15:52 +0200)]
write_riemann: only compile .proto files when enabled

If the write_riemann plugin is not enabled there's no
need to compile the protobuf files.

8 years agoPinba: only compile .proto files when enabled
Ruben Kerkhof [Sun, 9 Aug 2015 13:50:55 +0000 (15:50 +0200)]
Pinba: only compile .proto files when enabled

If the pinba plugin is not enabled there's no
need to compile the protobuf files.

8 years agoutils_mount: use reentrant getmntent_r when we can
Ruben Kerkhof [Sat, 25 Jul 2015 13:21:52 +0000 (15:21 +0200)]
utils_mount: use reentrant getmntent_r when we can

Fixes #1162

8 years agoSet locale environment variables at startup.
Florian Forster [Mon, 30 Nov 2015 19:27:24 +0000 (20:27 +0100)]
Set locale environment variables at startup.

Fixes: #1237

8 years agontp plugin: Unify casting to gauge_t.
Florian Forster [Mon, 30 Nov 2015 19:02:23 +0000 (20:02 +0100)]
ntp plugin: Unify casting to gauge_t.

Also add note about STA_NANO.

Issue: #1314.

8 years agoFix NTP kerninfo offset/estimated error scaling
Pierre Fersing [Tue, 20 Oct 2015 09:27:41 +0000 (11:27 +0200)]
Fix NTP kerninfo offset/estimated error scaling

8 years agocpu plugin: Improve error message for host_processors() failing.
Florian Forster [Mon, 30 Nov 2015 12:31:49 +0000 (13:31 +0100)]
cpu plugin: Improve error message for host_processors() failing.

Issue: #22

8 years agorrdtool: unlock mutex on error
Ruben Kerkhof [Sun, 29 Nov 2015 15:40:50 +0000 (16:40 +0100)]
rrdtool: unlock mutex on error

CID 37972

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agocsv plugin: plug memory leak on error
Ruben Kerkhof [Sat, 28 Nov 2015 19:19:26 +0000 (20:19 +0100)]
csv plugin: plug memory leak on error

CID 38015

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agorrdtool: release another lock on error
Ruben Kerkhof [Sun, 29 Nov 2015 17:14:28 +0000 (18:14 +0100)]
rrdtool: release another lock on error

CID 37973

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoceph plugin: Rewrite parse_keys() and compact_ds_name().
Florian Forster [Mon, 30 Nov 2015 10:25:48 +0000 (11:25 +0100)]
ceph plugin: Rewrite parse_keys() and compact_ds_name().

This rewrite removes the logic to add the original length to the end of
the buffer in case of truncation. This logic was guarded by:
  tmp[DATA_MAX_NAME_LEN - 1] = '\0';
  if(strlen(tmp) > DATA_MAX_NAME_LEN - 1) { ... }
and was therefore dead code.

Fixes: #1350

8 years agoceph plugin: Add unit test for parse_keys().
Florian Forster [Mon, 30 Nov 2015 09:15:06 +0000 (10:15 +0100)]
ceph plugin: Add unit test for parse_keys().

This is used to demonstrate a buffer overflow: when the first part of a
key is >63 characters, key_chars_remaining underflows and causes a buffer
overflow in the following iteration.

Issue: #1350

8 years agothe swrite interface is 'non-zero'
Sam Pointer [Wed, 25 Nov 2015 15:43:07 +0000 (15:43 +0000)]
the swrite interface is 'non-zero'

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agosnmp plugin: plug leak in error path.
Ruben Kerkhof [Fri, 27 Nov 2015 21:14:08 +0000 (22:14 +0100)]
snmp plugin: plug leak in error path.

Partial back port of #1368.

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agosnmp plugin: plug leak in error path.
Ruben Kerkhof [Fri, 27 Nov 2015 21:14:08 +0000 (22:14 +0100)]
snmp plugin: plug leak in error path.

Partial back port of #1368.

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoprocesses.c: plug memory leak in error path
Ruben Kerkhof [Fri, 27 Nov 2015 21:00:10 +0000 (22:00 +0100)]
processes.c: plug memory leak in error path

Found with Infer (http://fbinfer.com/)

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoutils_mount: use reentrant getmntent_r when we can
Ruben Kerkhof [Sat, 25 Jul 2015 13:21:52 +0000 (15:21 +0200)]
utils_mount: use reentrant getmntent_r when we can

Fixes #1162

(cherry picked from commit a916ae72b89d0bcb5fe28d55def7327e8a1f6ce0)

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Florian Forster [Thu, 26 Nov 2015 13:22:20 +0000 (14:22 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoc_avl_pick needs to update the 'size' field of the tree when it deletes
Corey Kosak [Wed, 25 Nov 2015 21:54:30 +0000 (16:54 -0500)]
c_avl_pick needs to update the 'size' field of the tree when it deletes
a node.

Signed-off-by: Florian Forster <octo@collectd.org>
8 years agoRemove duplicate call to pthread_mutex_destroy.
Corey Kosak [Wed, 25 Nov 2015 22:03:47 +0000 (17:03 -0500)]
Remove duplicate call to pthread_mutex_destroy.

8 years agostatsd plugin: Correctly free metrics at shutdown.
Florian Forster [Wed, 25 Nov 2015 10:51:04 +0000 (11:51 +0100)]
statsd plugin: Correctly free metrics at shutdown.

The previous shutdown handler leaked "timer" and "set" metrics. This is
not a huge problem in itself, as the daemon is exiting shortly after
anyway, but it makes debugging of memory leaks very hard.

Issue: #997

8 years agoapache plugin: DRY: use macro to determine number of fields.
Florian Forster [Fri, 20 Nov 2015 10:01:38 +0000 (11:01 +0100)]
apache plugin: DRY: use macro to determine number of fields.

8 years agoapache: parse whole response, not only the first 16 lines
Marc Fournier [Sun, 15 Nov 2015 10:49:06 +0000 (11:49 +0100)]
apache: parse whole response, not only the first 16 lines

mod_status recently started reporting more statistics. According to
http://www.apache.org/dist/httpd/CHANGES_2.4 `mod_proxy, mod_ssl,
mod_cache_socache, mod_socache_*: Support machine readable server-status
produced when using the "?auto" query string.` for version 2.4.13
onwards.

As we can't assume everything we need will be included in the first 16
lines of output anymore, we now simply scan through the whole output.

8 years agoRemove POLLRDNORM (equivalent to POLLIN)
Tamás Földesi [Wed, 8 Jul 2015 15:02:14 +0000 (17:02 +0200)]
Remove POLLRDNORM (equivalent to POLLIN)

8 years agoChecking for closed peer connection before send
Tamás Földesi [Tue, 30 Jun 2015 17:06:28 +0000 (19:06 +0200)]
Checking for closed peer connection before send

8 years agoAdd utils_ignorelist back to daemon (#1323)
Benjamin Drung [Tue, 27 Oct 2015 09:23:46 +0000 (10:23 +0100)]
Add utils_ignorelist back to daemon (#1323)

commit 216c6246b73645ac093de15b87aedc9abc6ebc80 moves the collectd
daemon files into the src/daemon/ directory, but also silently drops
utils_ignorelist. Dropping utils_ignorelist from the daemon has the
drawback that it cannot be used by plugins any more and that 16 plugins
need to bundle ignorelist.

Thus add utils_ignorelist back to the collectd daemon.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Sun, 8 Nov 2015 16:14:54 +0000 (17:14 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoFix clang complaining about extraneous parenthesis.
Nathan Ward [Thu, 29 Oct 2015 01:22:44 +0000 (14:22 +1300)]
Fix clang complaining about extraneous parenthesis.

8 years agoASN_GAUGE (SNMP-SMIv2 Gauge32) is unsigned, not signed.
Nathan Ward [Wed, 28 Oct 2015 12:46:29 +0000 (01:46 +1300)]
ASN_GAUGE (SNMP-SMIv2 Gauge32) is unsigned, not signed.

8 years agoStart write threads after plugin initialization.
Jan Andres [Wed, 21 Oct 2015 11:50:43 +0000 (13:50 +0200)]
Start write threads after plugin initialization.

Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.

If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.

To fix this, delay starting the write threads until after all plugins
have been initialized.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Pierre-Yves Ritschard [Fri, 6 Nov 2015 09:32:55 +0000 (10:32 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agostatsd: provide a gauge for counters, holding the absolute count.
Pierre-Yves Ritschard [Mon, 19 Oct 2015 09:53:26 +0000 (11:53 +0200)]
statsd: provide a gauge for counters, holding the absolute count.

When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Fri, 6 Nov 2015 08:40:56 +0000 (09:40 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agobattery: add missing capacity type to types.db
Marc Fournier [Fri, 6 Nov 2015 08:32:40 +0000 (09:32 +0100)]
battery: add missing capacity type to types.db

For the record, "capacity" was introduced by a2e732f8.

Also fix a bogus example in collectd.conf.

Thanks to @ryan-williams for reporting the problem !

Fix #1338

8 years agovarnish: remove unused variable
Marc Fournier [Thu, 5 Nov 2015 09:23:19 +0000 (10:23 +0100)]
varnish: remove unused variable

This was used in a DEBUG statement I didn't check in.

8 years agovarnish: rework v3 and v4 support
Marc Fournier [Wed, 4 Nov 2015 21:57:00 +0000 (22:57 +0100)]
varnish: rework v3 and v4 support

By using VSC_Iter() to loop over the list of metrics exposed by varnish,
we can pick those we're interested *if they are found*.

Not explicitly referring to metrics in the VSC_C_main struct makes the
plugin more resilient to small differences between minor varnish
versions.

It also opens the possibility to monitor non-MAIN metrics, such as
per-backend or per-storage engine stats.

This patch should be compatible with the previous way of doing, from the
user point of view.

Fix #1302

8 years agovarnish: isolate varnish v2 code
Marc Fournier [Wed, 4 Nov 2015 20:12:36 +0000 (21:12 +0100)]
varnish: isolate varnish v2 code

Segregating v2-specific code will allow reworking the v3 and v4 parts,
while ensuring backwards compatibility with v2.

The downside is that this leads to a large chunk of mostly duplicate
code. That said, my suggestion would be to drop support for varnish v2
in collectd 5.6.

NB: this commit breaks v3 and v4 support.

8 years agoapcups: prefix plugin name in INFO and DEBUG statements
Sergey [Tue, 3 Nov 2015 06:19:50 +0000 (07:19 +0100)]
apcups: prefix plugin name in INFO and DEBUG statements

Fixes #1329

8 years agowrite_redis: fix a few typos in manpage
Ruben Kerkhof [Tue, 28 Jul 2015 09:59:35 +0000 (11:59 +0200)]
write_redis: fix a few typos in manpage

Also correct the maximum length of the node name.
The callback name is "write_redis/%s" so the maximum
length of a node name is DATA_MAX_NAME_LEN - strlen("write_redis") -1.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Tue, 27 Oct 2015 22:39:38 +0000 (23:39 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agowrite_redis: remove unused variable from wr_write()
Marc Fournier [Tue, 27 Oct 2015 22:32:20 +0000 (23:32 +0100)]
write_redis: remove unused variable from wr_write()

8 years agowrite_redis plugin: Remove old zadd command formatting code that should not be there...
Brian Kelly [Wed, 15 Jul 2015 15:40:18 +0000 (11:40 -0400)]
write_redis plugin: Remove old zadd command formatting code that should not be there to fix sorted set key names

8 years agocollectd.conf.pod: correct a small typo
Marc Fournier [Fri, 23 Oct 2015 13:56:58 +0000 (15:56 +0200)]
collectd.conf.pod: correct a small typo

8 years agoFix a few typos in collectd-exec(5)
Douglas Thrift [Tue, 20 Oct 2015 23:19:02 +0000 (16:19 -0700)]
Fix a few typos in collectd-exec(5)

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Wed, 14 Oct 2015 07:10:38 +0000 (09:10 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoprocesses: correctly count processes on FreeBSD
Herve COMMOWICK [Wed, 14 Oct 2015 06:57:05 +0000 (08:57 +0200)]
processes: correctly count processes on FreeBSD

because actually we count threads instead of processes

(partial backport of 85c31a6d66 for collectd-5.4 /mf)

8 years agoFix 'Modification of a read-only value attempted' error
Ciaran Mac An Iomaire [Wed, 7 Oct 2015 15:20:20 +0000 (08:20 -0700)]
Fix 'Modification of a read-only value attempted' error

8 years agoprocesses: correctly count processes on {free,open}BSD
Herve COMMOWICK [Thu, 8 Oct 2015 09:41:45 +0000 (11:41 +0200)]
processes: correctly count processes on {free,open}BSD

because actually we count threads instead of processes

8 years agosystemd.collectd.service: backport changes from master branch
Marc Fournier [Wed, 14 Oct 2015 06:50:28 +0000 (08:50 +0200)]
systemd.collectd.service: backport changes from master branch

8 years agopython: Fix double-free bug.
Sven Trenkel [Sun, 4 Oct 2015 00:05:24 +0000 (00:05 +0000)]
python: Fix double-free bug.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Mon, 14 Sep 2015 08:57:37 +0000 (10:57 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agogmond: fix linking against libganglia at build time
Marc Fournier [Sun, 13 Sep 2015 22:03:44 +0000 (00:03 +0200)]
gmond: fix linking against libganglia at build time

Current versions of libganglia don't ship the ganglia-config utility
anymore. Change the configure script to not expect it to be in $PATH and
provide sensible defaults instead.

Fix #1129

8 years agolog_logstash: fix timestamp field to respect ISO 8601 format
Marc Fournier [Fri, 11 Sep 2015 21:59:10 +0000 (23:59 +0200)]
log_logstash: fix timestamp field to respect ISO 8601 format

Fixes #1132

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Fri, 11 Sep 2015 21:21:49 +0000 (23:21 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoPluginInterfaceFormat supports multiple fields
Ruben Kerkhof [Tue, 30 Jun 2015 12:41:41 +0000 (14:41 +0200)]
PluginInterfaceFormat supports multiple fields

Document this.

8 years agoDon't access freed memory
Ruben Kerkhof [Tue, 30 Jun 2015 12:13:24 +0000 (14:13 +0200)]
Don't access freed memory

The fields array contains pointers into the value_copy string.

8 years agoFix error message
Ruben Kerkhof [Tue, 30 Jun 2015 11:03:13 +0000 (13:03 +0200)]
Fix error message

8 years agomysql: use mysql_config --include for include path
Ruben Kerkhof [Sat, 1 Aug 2015 17:03:34 +0000 (19:03 +0200)]
mysql: use mysql_config --include for include path

According to the mysql_config manpage, --cflags shows the
compiler flags the library was compiled with. We certainly don't
want to use those.

8 years agomysql: just search for mysql_get_server_version
Ruben Kerkhof [Sat, 1 Aug 2015 17:02:15 +0000 (19:02 +0200)]
mysql: just search for mysql_get_server_version

If we found that symbol, assume we also found mysql_init.

8 years agomysql: respect mysql_libs when searching for symbol
Ruben Kerkhof [Sat, 1 Aug 2015 16:59:53 +0000 (18:59 +0200)]
mysql: respect mysql_libs when searching for symbol

We always looked in libmysqlclient, but this doesn't
work for compatible databases such as Percona.

Respect the list return by mysql_config --libs_r instead.

Fixes #1098

8 years agoFix copy-paste error in debug message in snmp plugin
Denys Berkovskyy [Tue, 8 Sep 2015 10:38:18 +0000 (11:38 +0100)]
Fix copy-paste error in debug message in snmp plugin

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Wed, 26 Aug 2015 21:40:18 +0000 (23:40 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoFix harmless build warnings with newer binutils
Ruben Kerkhof [Fri, 14 Aug 2015 20:25:20 +0000 (22:25 +0200)]
Fix harmless build warnings with newer binutils

I see a lot of those on Rawhide:
ar: `u' modifier ignored since `D' is the default (see `U')

It's going to take a while to get this fixed upstream.
Meanwhile, silence the warnings.

Macro copied from libvirt.

8 years agoliboconfig: Fix implicit declaration warning
Ruben Kerkhof [Sun, 16 Aug 2015 10:28:43 +0000 (12:28 +0200)]
liboconfig: Fix implicit declaration warning

strlen declaration is in string.h

8 years agoDon't unlock lock twice
Ruben Kerkhof [Sun, 16 Aug 2015 11:47:24 +0000 (13:47 +0200)]
Don't unlock lock twice

Fixes make check on OpenBSD

8 years agopf: fix compilation on OpenBSD
Ruben Kerkhof [Sun, 16 Aug 2015 12:39:23 +0000 (14:39 +0200)]
pf: fix compilation on OpenBSD

8 years agodns: fix compilation on OpenBSD
Ruben Kerkhof [Sun, 16 Aug 2015 13:07:03 +0000 (15:07 +0200)]
dns: fix compilation on OpenBSD

OpenBSD doesn't have pcap-bpf.h

pcap.h has been including pcap/bpf.h since 2006.
Since we require a pcap which has PCAP_ERROR_IFACE_NOT_UP, introduced in 2008
this shouldn't break anything.

8 years agocoding style fixes over 94e5622
Marc Fournier [Wed, 26 Aug 2015 21:28:50 +0000 (23:28 +0200)]
coding style fixes over 94e5622

8 years agoFix pipe leak in exec plugin
Gautam BT [Mon, 9 Feb 2015 11:01:24 +0000 (16:31 +0530)]
Fix pipe leak in exec plugin

Fixes #762

8 years agoltdl: only compile included libltdl when needed
Ruben Kerkhof [Sun, 9 Aug 2015 17:46:08 +0000 (19:46 +0200)]
ltdl: only compile included libltdl when needed

If configure finds an external libltdl, it's going to
use it, so there's no use in compiling the shipped libltdl.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Fri, 7 Aug 2015 08:14:17 +0000 (10:14 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agorouteros: fix a small build error pointed out by clang
Marc Fournier [Wed, 5 Aug 2015 16:05:02 +0000 (18:05 +0200)]
routeros: fix a small build error pointed out by clang

routeros.c:334:35: error: 'memset' call operates on objects of type 'cr_data_t' (aka 'struct cr_data_s') while the size is based on a different type 'cr_data_t *' (aka 'struct cr_data_s *') [-Werror,-Wsizeof-pointer-memaccess]
  memset (router_data, 0, sizeof (router_data));
          ~~~~~~~~~~~             ^~~~~~~~~~~
routeros.c:334:35: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
  memset (router_data, 0, sizeof (router_data));
                                  ^~~~~~~~~~~

8 years agoipc: enable _GNU_SOURCE to fix build with musl libc
Natanael Copa [Wed, 5 Aug 2015 06:48:08 +0000 (08:48 +0200)]
ipc: enable _GNU_SOURCE to fix build with musl libc

This fixes compile the compile error:

> ipc.c:154:49: error: 'struct shm_info' has no member named 'used_ids'
>    ipc_submit_g("shm", "segments", NULL, shm_info.used_ids);
>                                                   ^

Fixes #1147

8 years agoRevert "amqp: look for librabbitmq in /usr/local as well"
Marc Fournier [Tue, 4 Aug 2015 16:39:33 +0000 (18:39 +0200)]
Revert "amqp: look for librabbitmq in /usr/local as well"

This reverts commit c1c5087fd5d9e66427cee8c98c523519d578bee6.

... as a follow-up to the discussion which took place in #1201

8 years agofhcount: this plugin only works on Linux
Ruben Kerkhof [Tue, 4 Aug 2015 09:21:19 +0000 (11:21 +0200)]
fhcount: this plugin only works on Linux

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Mon, 3 Aug 2015 21:23:37 +0000 (23:23 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agologstash: initialize conf struct to 0
Vincent Bernat [Mon, 3 Aug 2015 08:06:30 +0000 (10:06 +0200)]
logstash: initialize conf struct to 0

With YAJL 1 (at least on Ubuntu Precise), if `conf.indentString` is not
initialized correctly, we would get a segfault even when `conf.beautify`
is set to 0. We avoid this case by initializing the whole structure to
0. `conf.beautify = 0` is kept for explicitness.

8 years agoFix libmodbus detection on FreeBSD
Ruben Kerkhof [Sat, 1 Aug 2015 09:46:45 +0000 (11:46 +0200)]
Fix libmodbus detection on FreeBSD

We look for modbus/modbus.h in /usr/local/include/modbus
but we should look for modbus.h

This is only an issue on FreeBSD since /usr/local/include is not
in the default search path.

8 years agoamqp: look for librabbitmq in /usr/local as well
Ruben Kerkhof [Sat, 1 Aug 2015 11:01:30 +0000 (13:01 +0200)]
amqp: look for librabbitmq in /usr/local as well

This detects it automatically on FreeBSD.
Ideally we should just use pkg-config but that is
left as an exercise for the reader ;)