collectd.git
8 years agoFix memory leak in redis.c
Andrés J. Díaz [Wed, 2 Mar 2016 18:21:56 +0000 (19:21 +0100)]
Fix memory leak in redis.c

8 years agoFix a few issues found by -Wshadow
Ruben Kerkhof [Tue, 1 Mar 2016 18:57:21 +0000 (19:57 +0100)]
Fix a few issues found by -Wshadow

8 years agoutils_avltree.c: fix compiler warning
Ruben Kerkhof [Tue, 1 Mar 2016 17:36:52 +0000 (18:36 +0100)]
utils_avltree.c: fix compiler warning

make[3]: Entering directory '/home/ruben/src/collectd/src/daemon'
  CC       utils_avltree.lo
utils_avltree.c: In function ‘rebalance’:
utils_avltree.c:248:20: warning: logical ‘or’ of collectively exhaustive
tests is always true [-Wlogical-op]
    assert ((b_bottom >= -1) || (b_bottom <= 1));
                    ^~
utils_avltree.c:258:20: warning: logical ‘or’ of collectively exhaustive
tests is always true [-Wlogical-op]
    assert ((b_bottom >= -1) || (b_bottom <= 1));
                    ^~

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Tue, 1 Mar 2016 16:07:01 +0000 (17:07 +0100)]
Merge branch 'collectd-5.5'

8 years agowrite_sensu: define _GNU_SOURCE for asprintf
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.

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Tue, 1 Mar 2016 14:01:25 +0000 (15:01 +0100)]
Merge branch 'collectd-5.5'

8 years agowrite_sensu: remove custom asprintf implementation
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.

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Tue, 1 Mar 2016 12:18:54 +0000 (13:18 +0100)]
Merge branch 'collectd-5.5'

8 years agowrite_riemann: add new header to Makefile.am
Ruben Kerkhof [Tue, 1 Mar 2016 12:08:06 +0000 (13:08 +0100)]
write_riemann: add new header to Makefile.am

Fixes 'make distcheck'

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Tue, 1 Mar 2016 11:47:25 +0000 (12:47 +0100)]
Merge branch 'collectd-5.5'

8 years agoFix prototype of subst()
Ruben Kerkhof [Tue, 1 Mar 2016 11:18:14 +0000 (12:18 +0100)]
Fix prototype of subst()

Commit e1b93f5 changed the signature of this function, but not the
prototype.

8 years agowrite_sensu: mark asprintf as static
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.

8 years agowrite_sensu: mark vasprintf as static
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

8 years agowrite_riemann: move prototype to header file
Ruben Kerkhof [Tue, 1 Mar 2016 11:09:40 +0000 (12:09 +0100)]
write_riemann: move prototype to header file

8 years agoredis: mark redis_handle_query as static
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.

8 years agoredis: mark redis_handle_info as static
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.

8 years agobarometer: mark Detect_sensor_type as static
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.

8 years agocollectd.c: mark notify_systemd as static
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.

8 years agocollectd.c: mark notify_upstart as static
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.

8 years agosensu: mark replace_str as static
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

8 years agosensu: mark sensu_format_name2 as static
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

8 years agoFix prototype of uc_get_size
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.

8 years agoFix prototype of plugin_log_available_writers
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

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Tue, 1 Mar 2016 10:28:16 +0000 (11:28 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Tue, 1 Mar 2016 10:26:25 +0000 (11:26 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoMerge pull request #1582 from rubenk/missing-prototypes
Ruben Kerkhof [Tue, 1 Mar 2016 10:18:21 +0000 (11:18 +0100)]
Merge pull request #1582 from rubenk/missing-prototypes

Missing prototypes

8 years agoxmms: mark cxmms_read as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:43:28 +0000 (23:43 +0100)]
xmms: mark cxmms_read as static

8 years agosensors: mark sensors_free_features as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:42:17 +0000 (23:42 +0100)]
sensors: mark sensors_free_features as static

8 years agoprocesses: mark ps_read_process as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:41:07 +0000 (23:41 +0100)]
processes: mark ps_read_process as static

8 years agoutils_db_query.c: make udb_query_free_one static
Ruben Kerkhof [Mon, 29 Feb 2016 22:37:41 +0000 (23:37 +0100)]
utils_db_query.c: make udb_query_free_one static

8 years agobattery: mark dict_get_double as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:37:04 +0000 (23:37 +0100)]
battery: mark dict_get_double as static

8 years agotypes_list.c: add header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:32:51 +0000 (23:32 +0100)]
types_list.c: add header for prototypes

8 years agoutils_subst.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

8 years agoutils_random.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

8 years agoutils_cmd_getval.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

8 years agoutils_cmd_flush.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

8 years agothreshold.c: mark ut_config as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:27:36 +0000 (23:27 +0100)]
threshold.c: mark ut_config as static

8 years agolatency_counter_create: fix signature
Ruben Kerkhof [Mon, 29 Feb 2016 22:26:00 +0000 (23:26 +0100)]
latency_counter_create: fix signature

8 years agoutils_latency.c: mark change_bin_width as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:23:47 +0000 (23:23 +0100)]
utils_latency.c: mark change_bin_width as static

8 years agoutils_cmd_putval.c: include header for prototypes
Ruben Kerkhof [Mon, 29 Feb 2016 22:22:47 +0000 (23:22 +0100)]
utils_cmd_putval.c: include header for prototypes

8 years agoInclude header for prototype of handle_putnotif
Ruben Kerkhof [Mon, 29 Feb 2016 22:21:35 +0000 (23:21 +0100)]
Include header for prototype of handle_putnotif

8 years agoAdd prototype for module_register
Ruben Kerkhof [Mon, 29 Feb 2016 22:20:00 +0000 (23:20 +0100)]
Add prototype for module_register

8 years agoliboconfig: mark oconfig_free_all as static
Ruben Kerkhof [Mon, 29 Feb 2016 22:17:44 +0000 (23:17 +0100)]
liboconfig: mark oconfig_free_all as static

8 years agozfs_arc: 'stolen' was removed after FreeBSD 10.2
Ruben Kerkhof [Mon, 29 Feb 2016 21:16:49 +0000 (22:16 +0100)]
zfs_arc: 'stolen' was removed after FreeBSD 10.2

Patch taken from FreeBSD port

8 years agoFix a typo in a comment
Ruben Kerkhof [Mon, 29 Feb 2016 21:09:30 +0000 (22:09 +0100)]
Fix a typo in a comment

8 years agoFix build on DragonFlyBSD
Ruben Kerkhof [Sun, 28 Feb 2016 17:29:41 +0000 (18:29 +0100)]
Fix build on DragonFlyBSD

DragonFlyBSD has both vfsstat and fsstat apis.
It lacks ST_NOWAIT however.

The easiest fix is to swap the checks and use getfsstat first.

8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Sun, 28 Feb 2016 07:34:07 +0000 (08:34 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Sun, 28 Feb 2016 07:33:10 +0000 (08:33 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoprocesses: fix pid format string
Marc Fournier [Sun, 28 Feb 2016 07:32:00 +0000 (08:32 +0100)]
processes: fix pid format string

Follow up to 7c495a5.

8 years agoCONTRIBUTING.md: improve wording
Marc Fournier [Sun, 28 Feb 2016 00:20:11 +0000 (01:20 +0100)]
CONTRIBUTING.md: improve wording

8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Sun, 28 Feb 2016 00:19:31 +0000 (01:19 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Sun, 28 Feb 2016 00:12:42 +0000 (01:12 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Sun, 28 Feb 2016 00:08:16 +0000 (01:08 +0100)]
Merge branch 'collectd-5.5'

8 years agoExtend collected metrics in redis plugin
Marc Falzon [Tue, 22 Dec 2015 22:07:25 +0000 (23:07 +0100)]
Extend collected metrics in redis plugin

This change adds support for other interesting Redis metrics:

* expired_keys
* keyspace_hits, keyspace_misses
* total_net_input_bytes, total_net_output_bytes

It also fixes the DS type for expired_keys, which was incorrectly
expressed as gauge instead of derive.

8 years agoredis: change expired_keys type from GAUGE to DERIVE
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 !

8 years agoconfigure.ac: fix path when testing for liboconfig/parser.c presence
Marc Fournier [Sat, 27 Feb 2016 23:49:59 +0000 (00:49 +0100)]
configure.ac: fix path when testing for liboconfig/parser.c presence

8 years agoprocesses: use long for pids on linux and solaris
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.

8 years agoMerge pull request #1550 from mfournier/processes-longpid
Marc Fournier [Sat, 27 Feb 2016 22:50:07 +0000 (23:50 +0100)]
Merge pull request #1550 from mfournier/processes-longpid

processes: use long for pids on linux and solaris

8 years agoMove unversioned .so to -devel subpackage
Ruben Kerkhof [Sat, 27 Feb 2016 16:46:05 +0000 (17:46 +0100)]
Move unversioned .so to -devel subpackage

8 years agoReplace traffic with interface in man page
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.

8 years agoMerge pull request #1555 from falzm/extend-interface
Marc Fournier [Sat, 27 Feb 2016 22:10:11 +0000 (23:10 +0100)]
Merge pull request #1555 from falzm/extend-interface

Report packets dropped in interface plugin

8 years agoMerge branch 'pr/1480'
Ruben Kerkhof [Sat, 27 Feb 2016 18:19:54 +0000 (19:19 +0100)]
Merge branch 'pr/1480'

8 years agoProvide the configuration tests for NetBSD.
Havard Eidnes [Sat, 19 Dec 2015 16:06:44 +0000 (17:06 +0100)]
Provide the configuration tests for NetBSD.

Absent guidance to the contrary, getting this applied is a
precondition for the individual plugin updates I'll subsequently
submit pull requests for.

8 years ago * mysql plugin: Change Sort_* types
Pavel Rochnyack [Sat, 27 Feb 2016 07:51:47 +0000 (14:51 +0700)]
 * mysql plugin: Change Sort_* types

8 years agoMerge branch 'collectd-5.5'
Ruben Kerkhof [Fri, 26 Feb 2016 21:58:15 +0000 (22:58 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Fri, 26 Feb 2016 21:53:19 +0000 (22:53 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoMerge pull request #1570 from rubenk/detect-bison
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

8 years agoMerge pull request #1545 from mfournier/contributing
Ruben Kerkhof [Fri, 26 Feb 2016 17:07:09 +0000 (18:07 +0100)]
Merge pull request #1545 from mfournier/contributing

add CONTRIBUTING.md

8 years agoMerge pull request #1567 from rubenk/fix-typo-in-config
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

8 years agoMerge pull request #1506 from mfournier/apache-content-type-1170
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

8 years agoMerge pull request #1561 from mfournier/modbus-set-debug
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

8 years agoconfigure.ac: detect bison
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.

8 years agoFix typo in collectd.conf
Ruben Kerkhof [Fri, 26 Feb 2016 13:29:59 +0000 (14:29 +0100)]
Fix typo in collectd.conf

8 years agodisk plugin: send disk_merged,disk_io_time,pending_operations only when data exists...
Pavel Rochnyack [Thu, 25 Feb 2016 14:18:15 +0000 (21:18 +0700)]
disk plugin: send disk_merged,disk_io_time,pending_operations only when data exists for device

8 years agomodbus: avoid enabling libmodbus's debug flag by default
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.

8 years ago* Collectd::Unixsock: Split messages sent by flush() to 1024 byte chunks to not overf...
Pavel Rochnyack [Wed, 24 Feb 2016 11:46:38 +0000 (18:46 +0700)]
* Collectd::Unixsock: Split messages sent by flush() to 1024 byte chunks to not overflow buffer in unixsock.c us_handle_client().

8 years agoReport packets dropped in interface plugin
Marc Falzon [Fri, 19 Feb 2016 11:07:07 +0000 (12:07 +0100)]
Report packets dropped in interface plugin

Add `if_dropped` to the metrics reported by the interface plugin.

8 years agoSuppress successful putval responses to exec plugin
Antonio Russo [Tue, 16 Feb 2016 19:22:48 +0000 (11:22 -0800)]
Suppress successful putval responses to exec plugin

exec plugins are never supposed to receive responses
to putval commands. These responses are instead sent
to STDOUT, which is often attached to /dev/null.
Newer init systems, such as systemd, instead log
these responses.

This patch preserves the expected behavior by suppressing
the response if and only if the destination is STDOUT.

8 years agoprocesses: use long for pids on linux and solaris
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.

8 years agoMerge branch 'master' of github.com:bbczeuz/collectd
Claudius Zingerli [Fri, 12 Feb 2016 10:48:19 +0000 (11:48 +0100)]
Merge branch 'master' of github.com:bbczeuz/collectd

8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Tue, 9 Feb 2016 22:27:29 +0000 (23:27 +0100)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Tue, 9 Feb 2016 22:27:12 +0000 (23:27 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoMerge pull request #1521 from coreykosak/factor-out-common-code
Marc Fournier [Tue, 9 Feb 2016 22:15:49 +0000 (23:15 +0100)]
Merge pull request #1521 from coreykosak/factor-out-common-code

Factor out some common functionality

8 years agoMerge pull request #1540 from mfournier/write_sensu_segfault_fix
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

8 years agoMerge pull request #1529 from jamtur01/patch-1
Marc Fournier [Tue, 9 Feb 2016 22:12:38 +0000 (23:12 +0100)]
Merge pull request #1529 from jamtur01/patch-1

Fixed typo in CounterSum documentation

8 years agoprocesses: warn about long process names on FreeBSD too
Marc Fournier [Tue, 9 Feb 2016 20:03:41 +0000 (21:03 +0100)]
processes: warn about long process names on FreeBSD too

8 years agoprocesses: also warn about long process names on Solaris
Marc Fournier [Thu, 21 Jan 2016 14:45:51 +0000 (15:45 +0100)]
processes: also warn about long process names on Solaris

8 years agoprocesses: use portable format string
Marc Fournier [Wed, 13 Jan 2016 08:10:33 +0000 (09:10 +0100)]
processes: use portable format string

8 years agoprocesses: warn about process names above OS limit
Marc Fournier [Tue, 12 Jan 2016 21:21:39 +0000 (22:21 +0100)]
processes: warn about process names above OS limit

Fixes #1284

8 years agoadd CONTRIBUTING.md
Marc Fournier [Tue, 9 Feb 2016 19:46:13 +0000 (20:46 +0100)]
add CONTRIBUTING.md

Mostly a summarized version of, or pointers to, information found in the
wiki.

These guidelines are supposed to show up when users open new issues or
pull requests on github.
See https://github.com/blog/1184-contributing-guidelines

8 years agoRPM specfile: re-enable varnish plugin on EL7
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.

8 years agowrite_sensu: avoid calling strlen() on variable set to NULL
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.

8 years agoFix the addres of the Free Software Foundation
Ruben Kerkhof [Sat, 30 Jan 2016 16:44:54 +0000 (17:44 +0100)]
Fix the addres of the Free Software Foundation

8 years agoFixed typo in CounterSum documentation
James Turnbull [Tue, 26 Jan 2016 16:39:50 +0000 (11:39 -0500)]
Fixed typo in CounterSum documentation

8 years agoRevert "Revert "openvpn plugin: Fix "Dead assignment" warning.""
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.

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Tue, 26 Jan 2016 11:18:26 +0000 (12:18 +0100)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoturbostat: fix whitespaces in log messages
Marc Fournier [Tue, 26 Jan 2016 06:21:57 +0000 (07:21 +0100)]
turbostat: fix whitespaces in log messages

8 years agoDon't divide by 0 when doing percentages (e.g. with the swap plugin).
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.

8 years agoProvide a unified signature for ps_get_cmdline.
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.

8 years agoThe field 're' only exists if HAVE_REGEX_H is defined (see definition at
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.