Florian Forster [Fri, 20 Nov 2015 10:01:38 +0000 (11:01 +0100)]
apache plugin: DRY: use macro to determine number of fields.
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.
Tamás Földesi [Wed, 8 Jul 2015 15:02:14 +0000 (17:02 +0200)]
Remove POLLRDNORM (equivalent to POLLIN)
Tamás Földesi [Tue, 30 Jun 2015 17:06:28 +0000 (19:06 +0200)]
Checking for closed peer connection before send
Nathan Ward [Thu, 29 Oct 2015 01:22:44 +0000 (14:22 +1300)]
Fix clang complaining about extraneous parenthesis.
Nathan Ward [Wed, 28 Oct 2015 12:46:29 +0000 (01:46 +1300)]
ASN_GAUGE (SNMP-SMIv2 Gauge32) is unsigned, not signed.
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.
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.
Sergey [Tue, 3 Nov 2015 06:19:50 +0000 (07:19 +0100)]
apcups: prefix plugin name in INFO and DEBUG statements
Fixes #1329
Marc Fournier [Tue, 27 Oct 2015 22:32:20 +0000 (23:32 +0100)]
write_redis: remove unused variable from wr_write()
Marc Fournier [Fri, 23 Oct 2015 13:56:58 +0000 (15:56 +0200)]
collectd.conf.pod: correct a small typo
Douglas Thrift [Tue, 20 Oct 2015 23:19:02 +0000 (16:19 -0700)]
Fix a few typos in collectd-exec(5)
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)
Sven Trenkel [Sun, 4 Oct 2015 00:05:24 +0000 (00:05 +0000)]
python: Fix double-free bug.
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
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.
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.
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
Denys Berkovskyy [Tue, 8 Sep 2015 10:38:18 +0000 (11:38 +0100)]
Fix copy-paste error in debug message in snmp plugin
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.
Ruben Kerkhof [Sun, 16 Aug 2015 10:28:43 +0000 (12:28 +0200)]
liboconfig: Fix implicit declaration warning
strlen declaration is in string.h
Ruben Kerkhof [Sun, 16 Aug 2015 11:47:24 +0000 (13:47 +0200)]
Don't unlock lock twice
Fixes make check on OpenBSD
Ruben Kerkhof [Sun, 16 Aug 2015 12:39:23 +0000 (14:39 +0200)]
pf: 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.
Marc Fournier [Wed, 26 Aug 2015 21:28:50 +0000 (23:28 +0200)]
coding style fixes over
94e5622
Gautam BT [Mon, 9 Feb 2015 11:01:24 +0000 (16:31 +0530)]
Fix pipe leak in exec plugin
Fixes #762
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.
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));
^~~~~~~~~~~
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
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.
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 ;)
Ruben Kerkhof [Sun, 2 Aug 2015 18:54:51 +0000 (20:54 +0200)]
irq: skip FIQ line in /proc/interrupts
/proc/interrupts on my Raspberry PI contains:
FIQ: usb_fiq
This line doesn't contain any per cpu counters
but we try to parse it anyway, resulting in:
parse_value: Failed to parse string as derive: usb_fiq.
Fixes #971
Ruben Kerkhof [Sat, 25 Jul 2015 10:32:06 +0000 (12:32 +0200)]
Fix a memory leak on shutdown
Shahul Hameed [Mon, 20 Jul 2015 17:06:23 +0000 (13:06 -0400)]
Add utils_parse_option.c/h to amqp plugin source files list
Ruben Kerkhof [Sat, 25 Jul 2015 09:57:12 +0000 (11:57 +0200)]
collectd -T: fix memory leak
Ruben Kerkhof [Sat, 25 Jul 2015 17:17:07 +0000 (19:17 +0200)]
Fix some small leaks on error paths
Ruben Kerkhof [Sat, 25 Jul 2015 19:29:50 +0000 (21:29 +0200)]
liboconfig: really fix lex warnings
Flex has two options to disable input and unput.
Turn them on.
Florian Forster [Fri, 10 Jul 2015 09:29:45 +0000 (11:29 +0200)]
Revert "fix leak on exit"
This reverts commit
35e6b9d366016300178a55b163ac0173d7be5874.
Ruben Kerkhof [Sat, 4 Jul 2015 18:02:57 +0000 (20:02 +0200)]
fix leak on exit
Ruben Kerkhof [Sat, 4 Jul 2015 17:56:20 +0000 (19:56 +0200)]
plugin.c: plug leak on error
Ruben Kerkhof [Sat, 4 Jul 2015 17:54:49 +0000 (19:54 +0200)]
memcached: plug leak
Ruben Kerkhof [Sat, 4 Jul 2015 15:35:03 +0000 (17:35 +0200)]
gmond: plug a small leak on exit
Marc Fournier [Wed, 8 Jul 2015 22:07:36 +0000 (00:07 +0200)]
collectd.conf.pod: correct a tiny typo
Ruud van Melick [Tue, 30 Jun 2015 16:08:49 +0000 (16:08 +0000)]
Fix Perl errors
"my" variable $cmd masks earlier declaration in same scope at /tmp/contrib_collectd2html.pl line 223.
syntax error at /tmp/contrib_collectd2html.pl line 219, near "$span qw(1hour 1day 1week 1month)"
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 221.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 224.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 225.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 232.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 237.
syntax error at /tmp/contrib_collectd2html.pl line 245, near "}"
Florian Forster [Sun, 28 Jun 2015 12:05:05 +0000 (14:05 +0200)]
src/daemon/common.c: Fix off-by-one error in escape_slashes().
Partial cherry-pick of
0cba91923be9326224f8434e4aae7691f7b6dad1.
Landry Breuil [Wed, 24 Jun 2015 04:48:16 +0000 (06:48 +0200)]
properly handle error cases when kvm_read fails (#1094)
Marek Becka [Wed, 24 Jun 2015 15:39:55 +0000 (11:39 -0400)]
don't report inodes if fs doesn't provide f_files and f_ffree
Florian Forster [Fri, 19 Jun 2015 11:06:34 +0000 (13:06 +0200)]
src/utils_cmd_flush.c: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
src/utils_rrdcreate.c: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
src/utils_ignorelist.c: Fix memory leak.
Turns out, regfree(3) cleans up the memory allocated by regcomp(3), but
not the pointer itself.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
src/utils_cmd_putval.c: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
utils_cache plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
rrdtool plugin: Add assertion.
This helps the static code analysis to figure out that memory is not
leaking after all.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
powerdns plugin: Fix memory leak.
While at it, replace the powerdns_config_add_string() function.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
memcachec plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
java plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
ipvs plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
gmond plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
curl_xml plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
curl_json plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
curl plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
collectdmon: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)]
apache plugin: Fix memory leak.
Florian Forster [Fri, 19 Jun 2015 05:05:22 +0000 (07:05 +0200)]
src/utils_cache.c: Fix two memory leaks.
* Free "times" pointer if it is not returned to the user.
* Free (re)alloc'ed pointers when strdup() fails.
Florian Forster [Thu, 18 Jun 2015 15:46:03 +0000 (17:46 +0200)]
snmp plugin: Fix "Assigned value is garbage or undefined" warning.
Florian Forster [Thu, 18 Jun 2015 15:45:52 +0000 (17:45 +0200)]
src/utils_latency.c: Fix "Assigned value is garbage or undefined" warning.
Florian Forster [Thu, 18 Jun 2015 15:31:03 +0000 (17:31 +0200)]
threshold plugin: Fix "Dead assignment" warnings.
Florian Forster [Thu, 18 Jun 2015 14:09:10 +0000 (16:09 +0200)]
stats plugin: Link with libm (-lm).
Fixes a bug reported by @Tenzer:
symbol lookup error: /usr/lib/collectd/statsd.so: undefined symbol: log
Florian Forster [Thu, 18 Jun 2015 13:27:54 +0000 (15:27 +0200)]
Fix "Undefined allocation of 0 bytes (CERT MEM04-C; CWE-131)" warnings.
Florian Forster [Thu, 18 Jun 2015 12:45:02 +0000 (14:45 +0200)]
threshold plugin: Fix "Dead increment" warnings.
Florian Forster [Thu, 18 Jun 2015 11:36:02 +0000 (13:36 +0200)]
Fix "Argument with 'nonnull' attribute passed null" warnings.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
threshold plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
ted plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
tail_csv plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 08:27:42 +0000 (10:27 +0200)]
tail plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
snmp plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
powerdns plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
ping plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 08:25:41 +0000 (10:25 +0200)]
onewire plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
openvpn plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
ntpd plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
network plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
modbus plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
src/libcollectdclient/client.c: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
gmond plugin: Fix handling of COUNTER and ABSOLUTE data sources.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
email plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
src/daemon/filter_chain.c: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
curl_json plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)]
amqp plugin: Fix "Dead assignment" warning.
Florian Forster [Wed, 17 Jun 2015 20:08:19 +0000 (22:08 +0200)]
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.
Florian Forster [Wed, 17 Jun 2015 17:12:45 +0000 (19:12 +0200)]
snmp plugin: Fix off-by-one array access.
Florian Forster [Wed, 17 Jun 2015 15:38:41 +0000 (17:38 +0200)]
exec plugin: Don't assign variable that is never read.
Florian Forster [Wed, 17 Jun 2015 15:28:39 +0000 (17:28 +0200)]
src/utils_db_query.c: Fix use-after-free.
"r_area->next" was evaluated after "r_area" was freed.
Florian Forster [Wed, 17 Jun 2015 14:19:25 +0000 (16:19 +0200)]
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.
Florian Forster [Wed, 17 Jun 2015 13:20:41 +0000 (15:20 +0200)]
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.
Florian Forster [Wed, 17 Jun 2015 09:41:55 +0000 (11:41 +0200)]
network plugin: Avoid "status may be used uninitialized" warning.
Florian Forster [Wed, 17 Jun 2015 08:48:27 +0000 (10:48 +0200)]
liboconfig: Declare yylex().
Florian Forster [Wed, 17 Jun 2015 08:37:31 +0000 (10:37 +0200)]
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.
Florian Forster [Wed, 17 Jun 2015 08:26:21 +0000 (10:26 +0200)]
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.
Florian Forster [Wed, 17 Jun 2015 07:12:08 +0000 (09:12 +0200)]
Merge remote-tracking branch 'github/pr/1088' into collectd-5.4