Andrés J. Díaz [Wed, 2 Mar 2016 18:21:56 +0000 (19:21 +0100)]
Fix memory leak in redis.c
Ruben Kerkhof [Tue, 1 Mar 2016 15:54:06 +0000 (16:54 +0100)]
write_sensu: define _GNU_SOURCE for asprintf
On Linux, asprintf and vasprintf are only available when _GNU_SOURCE is defined.
Ruben Kerkhof [Tue, 1 Mar 2016 13:02:33 +0000 (14:02 +0100)]
write_sensu: remove custom asprintf implementation
This was guarded by HAVE_ASPRINTF, but we never had a configure check
for asprintf (or vasprintf).
This only turned up when I made the function static, since they now
clash with the prototypes in stdio.h on FreeBSD.
As far as I know all the platforms we build on have these functions.
If this turns out to be not the case, we can always add compat functions
to our utilies later.
For now, this fixes the build on FreeBSD.
Ruben Kerkhof [Tue, 1 Mar 2016 12:08:06 +0000 (13:08 +0100)]
write_riemann: add new header to Makefile.am
Fixes 'make distcheck'
Ruben Kerkhof [Tue, 1 Mar 2016 11:11:16 +0000 (12:11 +0100)]
write_sensu: mark asprintf as static
Commit straigh to 5.5. This plugin didn't exist in 5.4.
Ruben Kerkhof [Tue, 1 Mar 2016 11:10:40 +0000 (12:10 +0100)]
write_sensu: mark vasprintf as static
Commit straight to 5.5. This plugin didn't exist in 5.4
Ruben Kerkhof [Tue, 1 Mar 2016 11:09:40 +0000 (12:09 +0100)]
write_riemann: move prototype to header file
Ruben Kerkhof [Tue, 1 Mar 2016 10:58:18 +0000 (11:58 +0100)]
redis: mark redis_handle_query as static
Commit straight to 5.5. This plugin didn't exist in 5.4.
Ruben Kerkhof [Tue, 1 Mar 2016 10:57:39 +0000 (11:57 +0100)]
redis: mark redis_handle_info as static
Commit straight to 5.5. This plugin didn't exist in 5.4.
Ruben Kerkhof [Tue, 1 Mar 2016 10:56:40 +0000 (11:56 +0100)]
barometer: mark Detect_sensor_type as static
Make function start with lowercase 'd' while we're at it.
Commit straight to 5.5.
Ruben Kerkhof [Tue, 1 Mar 2016 10:53:19 +0000 (11:53 +0100)]
collectd.c: mark notify_systemd as static
Commit straight to 5.5. This function didn't exist in 5.4.
Ruben Kerkhof [Tue, 1 Mar 2016 10:52:47 +0000 (11:52 +0100)]
collectd.c: mark notify_upstart as static
Commit straight to 5.5. This function didn't exist in 5.4.
Ruben Kerkhof [Tue, 1 Mar 2016 10:46:54 +0000 (11:46 +0100)]
sensu: mark replace_str as static
Commit straight to 5.5. This plugin doesn't exist in 5.4
Ruben Kerkhof [Tue, 1 Mar 2016 10:45:41 +0000 (11:45 +0100)]
sensu: mark sensu_format_name2 as static
Commit straight to 5.5, this plugin doesn't exist in 5.4
Ruben Kerkhof [Tue, 1 Mar 2016 10:43:13 +0000 (11:43 +0100)]
Fix prototype of uc_get_size
Commit straight to 5.5, this function doesn't exist in 5.4.
Ruben Kerkhof [Tue, 1 Mar 2016 10:41:43 +0000 (11:41 +0100)]
Fix prototype of plugin_log_available_writers
Commit straight to 5.5, this function doesn't exist in 5.4
Ruben Kerkhof [Tue, 1 Mar 2016 10:26:25 +0000 (11:26 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Tue, 1 Mar 2016 10:18:21 +0000 (11:18 +0100)]
Merge pull request #1582 from rubenk/missing-prototypes
Missing prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:43:28 +0000 (23:43 +0100)]
xmms: mark cxmms_read as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:42:17 +0000 (23:42 +0100)]
sensors: mark sensors_free_features as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:41:07 +0000 (23:41 +0100)]
processes: mark ps_read_process as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:37:41 +0000 (23:37 +0100)]
utils_db_query.c: make udb_query_free_one static
Ruben Kerkhof [Mon, 29 Feb 2016 22:37:04 +0000 (23:37 +0100)]
battery: mark dict_get_double as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:32:51 +0000 (23:32 +0100)]
types_list.c: add header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:31:55 +0000 (23:31 +0100)]
utils_subst.c: add header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:30:55 +0000 (23:30 +0100)]
utils_random.c: add header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:29:05 +0000 (23:29 +0100)]
utils_cmd_getval.c: add header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:28:25 +0000 (23:28 +0100)]
utils_cmd_flush.c: add header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:27:36 +0000 (23:27 +0100)]
threshold.c: mark ut_config as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:26:00 +0000 (23:26 +0100)]
latency_counter_create: fix signature
Ruben Kerkhof [Mon, 29 Feb 2016 22:23:47 +0000 (23:23 +0100)]
utils_latency.c: mark change_bin_width as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:22:47 +0000 (23:22 +0100)]
utils_cmd_putval.c: include header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:21:35 +0000 (23:21 +0100)]
Include header for prototype of handle_putnotif
Ruben Kerkhof [Mon, 29 Feb 2016 22:20:00 +0000 (23:20 +0100)]
Add prototype for module_register
Ruben Kerkhof [Mon, 29 Feb 2016 22:17:44 +0000 (23:17 +0100)]
liboconfig: mark oconfig_free_all as static
Marc Fournier [Sun, 28 Feb 2016 07:33:10 +0000 (08:33 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Sun, 28 Feb 2016 07:32:00 +0000 (08:32 +0100)]
processes: fix pid format string
Follow up to
7c495a5.
Marc Fournier [Sun, 28 Feb 2016 00:12:42 +0000 (01:12 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Sat, 27 Feb 2016 23:58:01 +0000 (00:58 +0100)]
redis: change expired_keys type from GAUGE to DERIVE
Thanks for @falzm for pointing this out in #1483 !
Marc Fournier [Sat, 27 Feb 2016 23:49:59 +0000 (00:49 +0100)]
configure.ac: fix path when testing for liboconfig/parser.c presence
Marc Fournier [Tue, 16 Feb 2016 09:28:04 +0000 (10:28 +0100)]
processes: use long for pids on linux and solaris
Up to now, we had a mix of `int`, `long` and `pid_t` to represent the
variable part of `/proc/<PID>/status` and friends. This patch
standardizes on `long` on the Linux and Solaris platforms.
The max size of `int` is smaller than the maximum number of processes
current kernels support. `pid_t` is used to ensure portability of
functions such as `getpid()`, which aren't used in this plugin, and
apparently resolves to an `int` on Solaris.
This is a follow up to
bb978c1, which triggered a format string issue on
solaris 64 bit.
Ruben Kerkhof [Sat, 27 Feb 2016 16:46:05 +0000 (17:46 +0100)]
Move unversioned .so to -devel subpackage
Ruben Kerkhof [Sat, 27 Feb 2016 19:28:34 +0000 (20:28 +0100)]
Replace traffic with interface in man page
The traffic plugin was renamed a long time ago.
Ruben Kerkhof [Fri, 26 Feb 2016 21:53:19 +0000 (22:53 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Fri, 26 Feb 2016 21:51:50 +0000 (22:51 +0100)]
Merge pull request #1570 from rubenk/detect-bison
configure.ac: detect bison
Ruben Kerkhof [Fri, 26 Feb 2016 17:05:18 +0000 (18:05 +0100)]
Merge pull request #1567 from rubenk/fix-typo-in-config
Fix typo in collectd.conf
Ruben Kerkhof [Fri, 26 Feb 2016 17:04:33 +0000 (18:04 +0100)]
Merge pull request #1506 from mfournier/apache-content-type-1170
apache: warn about possible misconfiguration
Ruben Kerkhof [Fri, 26 Feb 2016 16:37:47 +0000 (17:37 +0100)]
Merge pull request #1561 from mfournier/modbus-set-debug
modbus: avoid enabling libmodbus's debug flag by default
Ruben Kerkhof [Sat, 12 Dec 2015 16:07:54 +0000 (17:07 +0100)]
configure.ac: detect bison
We use some bison-specific extensions so we really need bison, not yacc.
This has bitten a few people before, so make it easier for them.
Bison is only needed when compiling from git, since we ship the generated file
in the tarball. We take this into account by checking for the generated file first.
Ruben Kerkhof [Fri, 26 Feb 2016 13:29:59 +0000 (14:29 +0100)]
Fix typo in collectd.conf
Marc Fournier [Thu, 25 Feb 2016 10:22:18 +0000 (11:22 +0100)]
modbus: avoid enabling libmodbus's debug flag by default
Having this enabled makes collectd's stdout and stderr very noisy. From
now on, only activate this flag when collectd is built with
--enable-debug.
Thanks to Eric Sandeen for mentioning this problem on IRC.
Marc Fournier [Tue, 9 Feb 2016 22:27:12 +0000 (23:27 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Tue, 9 Feb 2016 22:13:15 +0000 (23:13 +0100)]
Merge pull request #1540 from mfournier/write_sensu_segfault_fix
write_sensu: avoid calling strlen() on variable set to NULL
Marc Fournier [Mon, 8 Feb 2016 08:46:21 +0000 (09:46 +0100)]
RPM specfile: re-enable varnish plugin on EL7
... as the collectd-5.5 line now supports the varnish 4 API.
Marc Fournier [Fri, 5 Feb 2016 14:16:09 +0000 (15:16 +0100)]
write_sensu: avoid calling strlen() on variable set to NULL
This fixes a segfault when no `Tag` option is set.
Ruben Kerkhof [Sat, 30 Jan 2016 16:44:54 +0000 (17:44 +0100)]
Fix the addres of the Free Software Foundation
Marc Fournier [Tue, 26 Jan 2016 11:19:57 +0000 (12:19 +0100)]
Revert "Revert "openvpn plugin: Fix "Dead assignment" warning.""
This reverts commit
b40a0ef00b49cbc4d828ca2cd928c98dd27834c0.
Marc Fournier [Tue, 26 Jan 2016 11:18:26 +0000 (12:18 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Tue, 26 Jan 2016 06:21:57 +0000 (07:21 +0100)]
turbostat: fix whitespaces in log messages
Corey Kosak [Fri, 22 Jan 2016 21:56:37 +0000 (16:56 -0500)]
Don't divide by 0 when doing percentages (e.g. with the swap plugin).
Prior to this change, if all the values being sent sum to zero, then the
calculated percentage is a division by 0 which is either Inf or NaN
depending on the numerator.
This is not a theoretical concern: it can easily happen if all the input
gauges are 0.
This change forces the output to be zero if the denominator is zero.
Corey Kosak [Sat, 23 Jan 2016 00:10:21 +0000 (19:10 -0500)]
Provide a unified signature for ps_get_cmdline.
Prior to this change, ps_get_cmdline had different signatures for
KERNEL_LINUX vs. KERNEL_SOLARIS. This means that callers who want to
call this function would have to have an #if..#else that controlled which
variant of the function to call.
By giving them the same signature, callers don't have to worry about
that.
Corey Kosak [Fri, 22 Jan 2016 22:22:18 +0000 (17:22 -0500)]
The field 're' only exists if HAVE_REGEX_H is defined (see definition at
line 194). So, consistent with all other usages, this should be protected
with an #if guard.
Marc Fournier [Tue, 26 Jan 2016 05:50:15 +0000 (06:50 +0100)]
Revert "openvpn plugin: Fix "Dead assignment" warning."
I cherry-picked this patch, but overlooked the fact it relates to
another change (
c339d93f) only found in the collectd-5.5 branch.
Reverting, as it results in a compilation error.
This reverts commit
b7f9a3c02d885e0fbe8fb7aac5c9a51b5771a9d3.
Florian Forster [Fri, 22 Jan 2016 09:53:29 +0000 (10:53 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Wed, 20 Jan 2016 21:32:03 +0000 (22:32 +0100)]
drbd plugin: improve header lines identification
Recent DRBD versions display more detailed build information in
`/proc/drbd`, which caused the header identification to fail.
Comparing the first part of each line against all known header prefixes
will hopefully make this more robust.
Fixes #1514
Signed-off-by: Florian Forster <octo@collectd.org>
Marc Fournier [Mon, 18 Jan 2016 15:44:52 +0000 (16:44 +0100)]
df: remove legacy code skipping "rootfs" monitoring
3512bb1 added code to skip duplicate reporting of `rootfs` mounted on `/`.
f9c1c5b and
f0398d0 added generic code to skip any volume mounted twice.
Depending on the order of the entries in `/etc/mtab`, reporting for `/` was
entirely skipped.
This patch basically reverts the first, non-generic patch, as it's
superseded by the 2 others.
Fixes #1402
Signed-off-by: Florian Forster <octo@collectd.org>
Florian Forster [Fri, 22 Jan 2016 09:33:17 +0000 (10:33 +0100)]
ChangeLog: Fix mangled entries.
Florian Forster [Fri, 22 Jan 2016 08:55:02 +0000 (09:55 +0100)]
Bump version to 5.5.1; Update ChangeLog.
Marc Fournier [Fri, 22 Jan 2016 08:47:43 +0000 (09:47 +0100)]
Merge pull request #1517 from mfournier/systemd-upstart-build-issue
systemd.collectd.service: improve systemd & capabilities explanations
Jakub Jankowski [Thu, 21 Jan 2016 20:43:26 +0000 (21:43 +0100)]
docs: Add info about mode7 requirement for ntpd
Since ntpd-4.2.7p230 "mode 7" requests are ignored by default, and
that's what ntpd plugin uses currently. The ntp daemon must be
explicitly configured to enable mode7 requests.
This patch adds short information about that to collectd.conf manpage.
Related to collectd/collectd#932
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Marc Fournier [Thu, 21 Jan 2016 20:26:38 +0000 (21:26 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Jakub Jankowski [Thu, 21 Jan 2016 16:15:20 +0000 (17:15 +0100)]
docs: mention regexps for the interface plugin
It is very useful to collect data (or ignore) from a group of interfaces
that are similarly named - especially if the list is dynamic and it's
not feasible to update configuration each time an interface shows up or
disappears. It's possible to use regexps to specify interfaces to
collect data from (or ignore), but it's not clearly stated anywhere in
the documentation.
This is an attempt to improve documentation in this area.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Marc Fournier [Thu, 21 Jan 2016 17:39:51 +0000 (18:39 +0100)]
systemd.collectd.service: improve systemd & capabilities explanations
Fixes #1444
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.
Marc Fournier [Wed, 20 Jan 2016 08:47:31 +0000 (09:47 +0100)]
virt plugin: make indentation explicit
Fixes this warning raised by gcc-6's new "misleading-indentation"
option:
```
virt.c: In function 'lv_init':
virt.c:331:2: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
return 0;
^~~~~~
virt.c:328:5: note: ...this 'if' clause, but it is not
if (virInitialize () != 0)
^~
```
Marc Fournier [Mon, 18 Jan 2016 16:49:24 +0000 (17:49 +0100)]
df: remove legacy references to ReportReserved
The ReportReserved option was removed in
fcb3cbf. This patch cleans up a
couple of references which got left behind.
Marc Fournier [Fri, 15 Jan 2016 16:00:30 +0000 (17:00 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Sat, 28 Nov 2015 17:37:15 +0000 (18:37 +0100)]
write_redis: don't return with lock held
Florian Forster [Tue, 14 Jul 2015 06:42:15 +0000 (08:42 +0200)]
src/utils_latency.c: Fix format string error.
Florian Forster [Tue, 14 Jul 2015 06:34:52 +0000 (08:34 +0200)]
src/utils_latency.c: Ensure that LLONG_MAX is defined.
EPEL5 doesn't have it in <limits.h> apparently.
Florian Forster [Mon, 13 Jul 2015 09:53:58 +0000 (11:53 +0200)]
src/utils_latency.c: Store "bin_width" as cdtime_t.
This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.
Issue: #1131
Florian Forster [Sun, 12 Jul 2015 10:58:20 +0000 (12:58 +0200)]
src/utils_latency.c: Fix change_bin_width().
A missing cast when calculating "width_change_ratio" caused all metrics to
be moved to bucket #0.
Ruben Kerkhof [Sat, 4 Jul 2015 20:49:49 +0000 (22:49 +0200)]
varnish: fix leak on read
Since VSM_Close doesn't free the object we leak a few bytes
every interval
Florian Forster [Fri, 19 Jun 2015 14:26:12 +0000 (16:26 +0200)]
openvpn plugin: Fix "Dead assignment" warning.
Florian Forster [Thu, 18 Jun 2015 14:45:23 +0000 (16:45 +0200)]
modbus plugin: Make sure variable is initialized.
This was introduced by the merge
(
09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
Florian Forster [Thu, 18 Jun 2015 13:31:11 +0000 (15:31 +0200)]
tail plugin: Make sure variable is initialized.
This was introduced by the merge
(
09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b).
Dagobert Michelsen [Thu, 4 Jun 2015 11:25:48 +0000 (13:25 +0200)]
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.
Claudius Zingerli [Tue, 5 Jan 2016 17:22:22 +0000 (18:22 +0100)]
Fixed rrdtool sigsegv (datadir==NULL ptr dereferencing)
Marc Fournier [Wed, 13 Jan 2016 08:12:23 +0000 (09:12 +0100)]
processes: correct a typo
Marc Fournier [Tue, 12 Jan 2016 12:48:15 +0000 (13:48 +0100)]
apache: warn about possible misconfiguration
When the server doesn't return `Content-Type: text-plain`, it's a strong
hint that we're not querying the right URL.
Fixes #1170
Marc Fournier [Tue, 12 Jan 2016 08:03:09 +0000 (09:03 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Sat, 28 Nov 2015 17:37:15 +0000 (18:37 +0100)]
write_redis: don't return with lock held
Ruben Kerkhof [Sun, 29 Nov 2015 16:52:26 +0000 (17:52 +0100)]
redis plugin: make sure buffer is null-terminated
CID 37938
Ruben Kerkhof [Sun, 29 Nov 2015 17:06:33 +0000 (18:06 +0100)]
perl: unlock mutex on error
CID 37970
Ruben Kerkhof [Sun, 29 Nov 2015 17:27:56 +0000 (18:27 +0100)]
openvpn: free resource on error
Ruben Kerkhof [Sun, 29 Nov 2015 17:23:17 +0000 (18:23 +0100)]
openvpn: fix error message
Ruben Kerkhof [Sun, 29 Nov 2015 17:22:30 +0000 (18:22 +0100)]
openvpn: check return value of malloc
CID 37987
Ruben Kerkhof [Sat, 28 Nov 2015 19:27:22 +0000 (20:27 +0100)]
curl_json: remove dead code
CID 37963
Ruben Kerkhof [Fri, 4 Dec 2015 18:31:16 +0000 (19:31 +0100)]
snmp plugin: don't read from uninitialized pointer
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
Ruben Kerkhof [Fri, 4 Dec 2015 18:02:32 +0000 (19:02 +0100)]
libcollectdclient: don't close socket twice
CID #38039