collectd.git
6 years agoMerge branch 'collectd-5.7' into collectd-5.8
Florian Forster [Thu, 18 Oct 2018 06:18:25 +0000 (08:18 +0200)]
Merge branch 'collectd-5.7' into collectd-5.8

6 years agoAuto-Merge pull request #2957 from niuxu18/collectd-5.8
collectd bot [Wed, 17 Oct 2018 06:17:17 +0000 (08:17 +0200)]
Auto-Merge pull request #2957 from niuxu18/collectd-5.8

Automatically merged due to "Automerge" label

6 years agoUpdate virt.c
sarah [Wed, 17 Oct 2018 01:59:21 +0000 (09:59 +0800)]
Update virt.c

6 years agoAuto-Merge pull request #2953 from rpv-tomsk/collectd-collectd-5.8
collectd bot [Sun, 14 Oct 2018 09:13:10 +0000 (11:13 +0200)]
Auto-Merge pull request #2953 from rpv-tomsk/collectd-collectd-5.8

Automatically merged due to "Automerge" label

6 years agontpd: plug potential leak on error
Pavel Rochnyack [Sun, 14 Oct 2018 08:45:56 +0000 (15:45 +0700)]
ntpd: plug potential leak on error

Issue: #2942

6 years agoAuto-Merge pull request #2952 from octo/issue/2951
collectd bot [Fri, 12 Oct 2018 12:18:14 +0000 (14:18 +0200)]
Auto-Merge pull request #2952 from octo/issue/2951

Automatically merged due to "Automerge" label

6 years agodisk plugin: Support Linux kernels with additional fields.
Florian Forster [Fri, 12 Oct 2018 11:18:42 +0000 (13:18 +0200)]
disk plugin: Support Linux kernels with additional fields.

Linux 4.19 will add additional counters, which caused this plugin to
bail out because it checked the number of fields exactly instead of
ensuring that there are *at least* the number of fields expected.

Fixes: #2951

6 years agoAuto-Merge pull request #2949 from rubenk/fix-detection-of-xmms
collectd bot [Thu, 11 Oct 2018 12:14:19 +0000 (14:14 +0200)]
Auto-Merge pull request #2949 from rubenk/fix-detection-of-xmms

Automatically merged due to "Automerge" label

6 years agoFix detection of xmmsctrl.h
Ruben Kerkhof [Thu, 11 Oct 2018 11:00:35 +0000 (13:00 +0200)]
Fix detection of xmmsctrl.h

checking xmmsctrl.h usability... yes
checking xmmsctrl.h presence... no
configure: WARNING: xmmsctrl.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: xmmsctrl.h: proceeding with the compiler's result
checking for xmmsctrl.h... yes
checking for xmms_remote_get_info in -lxmms... yes

AC_CHECK_HEADER uses the preprocessor, which doesn't look at CFLAGS.
Use CPPFLAGS so it uses the right include path to look for xmmsctrl.h

6 years agoAuto-Merge pull request #2948 from rubenk/turbostat-free-the-right-vars
collectd bot [Thu, 11 Oct 2018 06:02:46 +0000 (08:02 +0200)]
Auto-Merge pull request #2948 from rubenk/turbostat-free-the-right-vars

Automatically merged due to "Automerge" label

6 years agoturbostat plugin: free the right variable
Ruben Kerkhof [Tue, 29 May 2018 08:37:18 +0000 (10:37 +0200)]
turbostat plugin: free the right variable

scan-build: Using '/usr/bin/clang-6.0' for static analysis
make  all-am
make[1]: Entering directory '/home/ruben/src/collectd'
  CC       src/turbostat.lo
src/turbostat.c:1292:5: warning: Argument to free() is the address of the global variable 'thread_delta', which is not memory allocated by malloc()
    sfree(threads);
    ^~~~~~~~~~~~~~
./src/daemon/common.h:41:5: note: expanded from macro 'sfree'
    free(ptr);                                                                 \
    ^~~~~~~~~
src/turbostat.c:1299:5: warning: Argument to free() is the address of the global variable 'core_delta', which is not memory allocated by malloc()
    sfree(cores);
    ^~~~~~~~~~~~
./src/daemon/common.h:41:5: note: expanded from macro 'sfree'
    free(ptr);                                                                 \
    ^~~~~~~~~
2 warnings generated.
  CCLD     turbostat.la

(cherry picked from commit 74eda959ddf653b7d20779d84f0a140e85376726)

6 years agoexec: fix potential deadlock after fork()
Daniel Vrátil [Wed, 12 Sep 2018 15:05:31 +0000 (17:05 +0200)]
exec: fix potential deadlock after fork()

POSIX forbids calling functions which are not thread-safe like
setenv() after fork() in multi-threaded programs. It happens to
work just fine with some libc implementations, but it causes a
deadlock in the child process with uClibc for example.

The proper way to pass new environment variables to the child
process is to update parent's environment before the fork(), so
that the child inherits the updated environment and then undo the
changes in the parent process again.

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoexec: Call putenv() with a global buffer
Daniel Vrátil [Wed, 12 Sep 2018 15:20:00 +0000 (17:20 +0200)]
exec: Call putenv() with a global buffer

putenv() adds the string pointer to the environment so it should
not be called with an automatic variable.

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoAuto-Merge pull request #2942 from rubenk/ntpd-plug-leak
collectd bot [Tue, 9 Oct 2018 11:38:05 +0000 (13:38 +0200)]
Auto-Merge pull request #2942 from rubenk/ntpd-plug-leak

Automatically merged due to "Automerge" label

6 years agontpd: plug potential leak on error
Ruben Kerkhof [Tue, 9 Oct 2018 08:36:48 +0000 (10:36 +0200)]
ntpd: plug potential leak on error

Found by scan-build:

src/ntpd.c:833:5: warning: Potential memory leak
    ERROR("ntpd plugin: ntpd_do_query (REQ_GET_KERNEL) failed with status %i",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/daemon/plugin.h:391:20: note: expanded from macro 'ERROR'
                   ^~~~~~~~~~
1 warning generated.

6 years agopowerdns plugin: no-packet-error counts number of erroneous packets; it should be...
Mariusz Gronczewski [Fri, 17 Aug 2018 14:35:11 +0000 (16:35 +0200)]
powerdns plugin: no-packet-error counts number of erroneous packets; it should be returned as counter (like other query/hit/miss counters), not gauge

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoAuto-Merge pull request #2941 from octo/backport/01cf776
collectd bot [Tue, 9 Oct 2018 06:08:03 +0000 (08:08 +0200)]
Auto-Merge pull request #2941 from octo/backport/01cf776

Automatically merged due to "Automerge" label

6 years agoceph plugin: fix scan-build warnings
Ruben Kerkhof [Wed, 30 May 2018 13:08:15 +0000 (15:08 +0200)]
ceph plugin: fix scan-build warnings

src/ceph.c:284:8: warning: Null pointer argument in call to string comparison function
  (strcmp("filestore", state->stack[state->depth - 2]) == 0) &&
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/string2.h:817:8: note: expanded from macro 'strcmp'
: __builtin_strcmp (s1, s2)))); })
  ^~~~~~~~~~~~~~~~~~~~~~~~~
src/ceph.c:285:8: warning: Null pointer argument in call to string comparison function
  (strcmp("journal_wr_bytes", state->stack[state->depth - 1]) == 0) &&
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/string2.h:817:8: note: expanded from macro 'strcmp'
: __builtin_strcmp (s1, s2)))); })
  ^~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Cherry-pick for collectd-5.8.

6 years agoMerge branch 'collectd-5.7' into collectd-5.8
Florian Forster [Mon, 8 Oct 2018 09:48:54 +0000 (11:48 +0200)]
Merge branch 'collectd-5.7' into collectd-5.8

6 years agoAuto-Merge pull request #2939 from octo/pr2937-backport
collectd bot [Mon, 8 Oct 2018 09:33:29 +0000 (11:33 +0200)]
Auto-Merge pull request #2939 from octo/pr2937-backport

Automatically merged due to "Automerge" label

6 years agoexec plugin: dynamically allocate grname buffer.
smallem [Thu, 4 Oct 2018 17:54:44 +0000 (13:54 -0400)]
exec plugin: dynamically allocate grname buffer.

Backport of a fix in master.

Fixes: #2696

6 years agoMerge pull request #2919 from rubenk/virt-fix-segfault
Ruben Kerkhof [Wed, 5 Sep 2018 06:38:09 +0000 (08:38 +0200)]
Merge pull request #2919 from rubenk/virt-fix-segfault

Fix segfault in libvirt plugin

6 years agovirt plugin: fix segfault on error path
Ruben Kerkhof [Tue, 4 Sep 2018 10:48:12 +0000 (12:48 +0200)]
virt plugin: fix segfault on error path

The libvirt plugin refreshes its list of domains every RefreshInterval
seconds. If a domain crashes after getting the list, getting the stats
for its block devices returns an error. We then try to call
virDomainGetName on an invalid pointer. Fix this.

6 years agoAuto-Merge pull request #2916 from rpv-tomsk/collectd-collectd-5.8
collectd bot [Thu, 30 Aug 2018 06:48:03 +0000 (08:48 +0200)]
Auto-Merge pull request #2916 from rpv-tomsk/collectd-collectd-5.8

Automatically merged due to "Automerge" label

6 years agonfs: Fix number of fields for NFSv4
Jan-Philipp Litza [Wed, 29 Aug 2018 20:46:49 +0000 (22:46 +0200)]
nfs: Fix number of fields for NFSv4

The previous buffer of 64 fields was too short for the current number of
72+2 fields in NFS 4.2, causing the message

  nfs plugin: Unexpected number of fields for NFSv4 server statistics: 62.

This change, originally proposed in [1], fixes that issue in a
forward-compatible manner by reusing the already known number of fields
from the static arrays.

[1]: https://github.com/collectd/collectd/issues/2076#issuecomment-350466628

6 years agoFix parsing option for avoiding making BaseDir
Mariusz Bialonczyk [Tue, 10 Jul 2018 09:47:53 +0000 (11:47 +0200)]
Fix parsing option for avoiding making BaseDir

Parsing is broken since:
386ecab4 Reading configuration file is now done outside main().
So after mentioned commit we've got:

collectd: invalid option -- 'B'

This commit fixes this.

6 years agoAuto-Merge pull request #2850 from rpv-tomsk/collectd-collectd-5.8
collectd bot [Sat, 7 Jul 2018 15:31:54 +0000 (17:31 +0200)]
Auto-Merge pull request #2850 from rpv-tomsk/collectd-collectd-5.8

Automatically merged due to "Automerge" label

6 years agowrite_prometheus: Added MHD_USE_INTERNAL_POLLING_THREAD flag
Pavel Rochnyack [Sat, 7 Jul 2018 14:38:07 +0000 (21:38 +0700)]
write_prometheus: Added MHD_USE_INTERNAL_POLLING_THREAD flag

Since 0.9.53, libmicrohttpd requires explicit setting of this flag.

Closes: #2849

6 years agoAuto-Merge pull request #2793 from rpv-tomsk/fix-5.8
collectd bot [Wed, 23 May 2018 11:10:03 +0000 (13:10 +0200)]
Auto-Merge pull request #2793 from rpv-tomsk/fix-5.8

Automatically merged due to "Automerge" label

6 years agoInclude kstat.h when available
Dagobert Michelsen [Wed, 21 Mar 2018 20:22:45 +0000 (21:22 +0100)]
Include kstat.h when available

6 years agoFix make distcheck on Mac OS
Ruben Kerkhof [Wed, 16 May 2018 11:24:55 +0000 (13:24 +0200)]
Fix make distcheck on Mac OS

  CC       src/libcollectdclient/libcollectdclient_la-network_parse.lo
../../src/libcollectdclient/network_parse.c:49:10: fatal error: 'stdendian.h' file not found
         ^~~~~~~~~~~~~
1 error generated.

Fixes #2608

6 years agoAuto-Merge pull request #2792 from rpv-tomsk/fix-5.8
collectd bot [Wed, 23 May 2018 09:15:47 +0000 (11:15 +0200)]
Auto-Merge pull request #2792 from rpv-tomsk/fix-5.8

Automatically merged due to "Automerge" label

6 years agoAdded missing include of "collectd.h"
Pavel Rochnyack [Sun, 20 May 2018 16:24:25 +0000 (23:24 +0700)]
Added missing include of "collectd.h"

This adressed to solve compilation issue on Solaris platform:

./src/config.h:1526:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]

6 years agoAdd endianness checks for AIX
Dagobert Michelsen [Thu, 3 May 2018 10:42:28 +0000 (12:42 +0200)]
Add endianness checks for AIX

6 years agoAuto-Merge pull request #2788 from rpv-tomsk/fix-5.8
collectd bot [Mon, 21 May 2018 06:32:58 +0000 (08:32 +0200)]
Auto-Merge pull request #2788 from rpv-tomsk/fix-5.8

Automatically merged due to "Automerge" label

6 years agoFix gcc issue on Mac byteorder
Dagobert Michelsen [Thu, 5 Apr 2018 08:49:30 +0000 (10:49 +0200)]
Fix gcc issue on Mac byteorder

6 years agoFix conditional on byteorder to work on Solaris
Dagobert Michelsen [Wed, 4 Apr 2018 12:34:15 +0000 (14:34 +0200)]
Fix conditional on byteorder to work on Solaris

6 years agoKeep clang-format happy
Dagobert Michelsen [Wed, 21 Mar 2018 21:23:07 +0000 (22:23 +0100)]
Keep clang-format happy

6 years agoAdd fallback for endianess conversion
Dagobert Michelsen [Wed, 21 Mar 2018 21:09:15 +0000 (22:09 +0100)]
Add fallback for endianess conversion

6 years agoAuto-Merge pull request #2787 from rpv-tomsk/fix-5.8
collectd bot [Mon, 21 May 2018 04:18:17 +0000 (06:18 +0200)]
Auto-Merge pull request #2787 from rpv-tomsk/fix-5.8

Automatically merged due to "Automerge" label

6 years agoAdded missing include of 'config.h'
Pavel Rochnyack [Mon, 21 May 2018 03:38:51 +0000 (10:38 +0700)]
Added missing include of 'config.h'

This adressed to solve compilation issue on Solaris platform:

In file included from src/libcollectdclient/network_parse.c:26:0,
                 from src/libcollectdclient/network_parse_test.c:32:
                 ./src/config.h:1517:0: error: "_FILE_OFFSET_BITS" redefined

6 years agoAuto-Merge pull request #2786 from rpv-tomsk/fix-5.8
collectd bot [Sun, 20 May 2018 20:22:12 +0000 (22:22 +0200)]
Auto-Merge pull request #2786 from rpv-tomsk/fix-5.8

Automatically merged due to "Automerge" label

6 years agoAdded missing include of 'kstat.h' and variable declaration
Pavel Rochnyack [Sun, 20 May 2018 19:35:44 +0000 (02:35 +0700)]
Added missing include of 'kstat.h' and variable declaration

This adressed to solve compilation issue on Solaris platform:

src/daemon/collectd.c:212: error: 'kc' undeclared (first use in this function)
src/daemon/collectd.c:213: error: implicit declaration of function 'kstat_open'

6 years agoAuto-Merge pull request #2785 from rpv-tomsk/fix-5.8
collectd bot [Sun, 20 May 2018 19:21:30 +0000 (21:21 +0200)]
Auto-Merge pull request #2785 from rpv-tomsk/fix-5.8

Automatically merged due to "Automerge" label

6 years agoTry to make clang-format happy
Pavel Rochnyack [Sun, 20 May 2018 17:57:27 +0000 (00:57 +0700)]
Try to make clang-format happy

6 years agoAdded missing include of 'kstat.h'
Pavel Rochnyack [Sun, 20 May 2018 17:52:33 +0000 (00:52 +0700)]
Added missing include of 'kstat.h'

This adressed to solve compilation issue on Solaris platform:

src/utils_vl_lookup.c:37:1: error: unknown type name 'kstat_ctl_t'
 kstat_ctl_t *kc;

6 years agoAuto-Merge pull request #2784 from rpv-tomsk/fix-5.8
collectd bot [Sun, 20 May 2018 17:21:04 +0000 (19:21 +0200)]
Auto-Merge pull request #2784 from rpv-tomsk/fix-5.8

Automatically merged due to "Automerge" label

6 years agoAdded missing include of 'kstat.h'
Pavel Rochnyack [Sun, 20 May 2018 16:48:00 +0000 (23:48 +0700)]
Added missing include of 'kstat.h'

This adressed to solve compilation issue on Solaris platform:

src/daemon/common.c:64:8: error: unknown type name 'kstat_ctl_t'
  extern kstat_ctl_t *kc;

6 years agoMerge pull request #2681 from elfiesmelfie/feat_pmu_cores
Ruben Kerkhof [Fri, 18 May 2018 16:43:47 +0000 (18:43 +0200)]
Merge pull request #2681 from elfiesmelfie/feat_pmu_cores

intel_pmu: core groups feature

6 years agointel_pmu plugin: fix for PR comments
Kamil Wiatrowski [Thu, 17 May 2018 14:15:24 +0000 (15:15 +0100)]
intel_pmu plugin: fix for PR comments

Check for failure from snprintf.
Make cgroup and event const in pmu_submit_counter.

Change-Id: I5547375da26c3a63b76588b733e844e3199e9bb8
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agoMerge pull request #2742 from elfiesmelfie/ipmi_bugfix_sensor_option
Pavel Rochnyak [Wed, 16 May 2018 12:25:13 +0000 (19:25 +0700)]
Merge pull request #2742 from elfiesmelfie/ipmi_bugfix_sensor_option

ipmi plugin: Fix for segmentation fault for wrong data type in Sensor section.

6 years agoipmi plugin: Fix for segmentation fault for wrong data type in Sensor section.
Mariusz Szafranski [Thu, 29 Mar 2018 08:45:46 +0000 (09:45 +0100)]
ipmi plugin: Fix for segmentation fault for wrong data type in Sensor section.

Incorrect, malicious data in the Sensor section can cause a segmentation fault.
Error message is generated instead of crash after applying this patch.

Change-Id: Ibc387b5594f9453f1fc957ed37ceb09cfa34ded5
Signed-off-by: Mariusz Szafranski <mariuszx.szafranski@intel.com>
6 years agoMerge pull request #2776 from mfournier/unblock_pr_2737
Marc Fournier [Tue, 15 May 2018 13:37:45 +0000 (14:37 +0100)]
Merge pull request #2776 from mfournier/unblock_pr_2737

Unblock #2737

6 years agoTrigger Jenkins
Marc Fournier [Tue, 15 May 2018 12:06:02 +0000 (14:06 +0200)]
Trigger Jenkins

6 years agoAuto-Merge pull request #2760 from rpv-tomsk/tmpfix
collectd bot [Tue, 1 May 2018 09:12:01 +0000 (11:12 +0200)]
Auto-Merge pull request #2760 from rpv-tomsk/tmpfix

Automatically merged due to "Automerge" label

6 years agodocs: Fix typo in collectd.conf.pod
Pavel Rochnyack [Tue, 1 May 2018 08:30:43 +0000 (15:30 +0700)]
docs: Fix typo in collectd.conf.pod

6 years agoAuto-Merge pull request #2736 from rpv-tomsk/collectd-collectd-5.8
collectd bot [Thu, 29 Mar 2018 19:17:13 +0000 (21:17 +0200)]
Auto-Merge pull request #2736 from rpv-tomsk/collectd-collectd-5.8

Automatically merged due to "Automerge" label

6 years agouuid plugin: Fixed hostname setting
Pavel Rochnyack [Thu, 29 Mar 2018 18:27:14 +0000 (01:27 +0700)]
uuid plugin: Fixed hostname setting

Closes: #2723
References: #2467

6 years agoMerge pull request #2703 from elfiesmelfie/fix_ipmi_bugfix_0.2
Pavel Rochnyak [Wed, 28 Mar 2018 15:26:21 +0000 (22:26 +0700)]
Merge pull request #2703 from elfiesmelfie/fix_ipmi_bugfix_0.2

Fixes for ipmi plugin

6 years agoAuto-Merge pull request #2734 from rpv-tomsk/fix-2732
collectd bot [Wed, 28 Mar 2018 14:12:50 +0000 (16:12 +0200)]
Auto-Merge pull request #2734 from rpv-tomsk/fix-2732

Automatically merged due to "Automerge" label

6 years agoperl plugin: Fix compile fail with message "void function cannot return value"
Pavel Rochnyack [Wed, 28 Mar 2018 13:23:32 +0000 (20:23 +0700)]
perl plugin: Fix compile fail with message "void function cannot return value"

Closes: #2732

6 years agoRevert "ipmi plugin: Ignore events from ignored sensors"
Mariusz Szafranski [Wed, 7 Mar 2018 09:58:43 +0000 (09:58 +0000)]
Revert "ipmi plugin: Ignore events from ignored sensors"

This reverts commit cd660c5b07b6f09d165435f240ca17d118a1e452.

6 years agoRevert "ipmi plugin: Remove duplicate/unused code and unneeded brackets."
Mariusz Szafranski [Wed, 7 Mar 2018 09:57:50 +0000 (09:57 +0000)]
Revert "ipmi plugin: Remove duplicate/unused code and unneeded brackets."

This reverts commit 8c9d64bf7615875b5030127b4df68a620e084f0d.

6 years agoipmi plugin: Remove duplicate/unused code and unneeded brackets.
Mariusz Szafranski [Mon, 5 Mar 2018 15:04:10 +0000 (15:04 +0000)]
ipmi plugin: Remove duplicate/unused code and unneeded brackets.

Change-Id: Ia4298f75f59e697df25d05091adbb556b64869e1
Signed-off-by: Mariusz Szafranski <mariuszx.szafranski@intel.com>
6 years agoipmi plugin: Threshold event handler registration fix
Mariusz Szafranski [Thu, 1 Mar 2018 12:09:19 +0000 (12:09 +0000)]
ipmi plugin: Threshold event handler registration fix

This patch fixes registration of threshold event handler for
specific sensor types (e.g. 'System Airflow')

Change-Id: I437f3fe68fecf264adb32a4e2ef4ac214a7e87a4
Signed-off-by: Mariusz Szafranski <mariuszx.szafranski@intel.com>
6 years agoipmi plugin: Ignore events from ignored sensors
Mariusz Szafranski [Thu, 1 Mar 2018 12:08:47 +0000 (12:08 +0000)]
ipmi plugin: Ignore events from ignored sensors

Reading is disabled for ignored sensors. This fix it to also
ignore events from s4ensors on ignore list.

Change-Id: I705593c79274a00456a786698452cd3c1bae9872
Signed-off-by: Mariusz Szafranski <mariuszx.szafranski@intel.com>
6 years agoipmi plugin: Fix crash in ipmi.so (interval < 0.5)
Mariusz Szafranski [Thu, 1 Mar 2018 12:07:56 +0000 (12:07 +0000)]
ipmi plugin: Fix crash in ipmi.so (interval < 0.5)

Fixes crash (divide by 0) in ipmi.so when plugin related interval
set to 0.45 or less.

Change-Id: I3ac2282efdc005edefe92f870ac30417451c202c
Signed-off-by: Mariusz Szafranski <mariuszx.szafranski@intel.com>
6 years agointel_pmu plugin: fix for minor issues
Kamil Wiatrowski [Thu, 22 Feb 2018 15:18:54 +0000 (15:18 +0000)]
intel_pmu plugin: fix for minor issues

Fix minor issues found during review.
Update year to 2018,
add include in utils_config_cores.h to avoid forward
declaration.

Change-Id: I7d657bab7c97d7193d7977ef129181cad13d73d5
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agointel_pmu plugin: fix for compatibility issue with collectd 5.8
Kamil Wiatrowski [Mon, 19 Feb 2018 13:24:10 +0000 (13:24 +0000)]
intel_pmu plugin: fix for compatibility issue with collectd 5.8

Add definition for PRIsz macro to make code backward compatible with
collectd-5.8 branch.

Change-Id: I880340af5ae883a444563422b3e9975b3693683c
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agointel_pmu: fix epel6 compilation issue
Kamil Wiatrowski [Mon, 12 Feb 2018 11:12:44 +0000 (11:12 +0000)]
intel_pmu: fix epel6 compilation issue

To avoid compilation error on some versions of gcc the
saveptr for strtok_r needs to be initilised to NULL.

Change-Id: I7b30e51ecae33a6994ba7ea181cac0f33eef023f
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agointel_pmu,intel_rdt plugins: apply formatting rules
Kamil Wiatrowski [Fri, 2 Feb 2018 14:25:56 +0000 (14:25 +0000)]
intel_pmu,intel_rdt plugins: apply formatting rules

Run script contrib/format.sh to format the code.
Replace zu with new collectd macro PRIsz.

Change-Id: I167b1065461e924d7ab260a35f85f5ab162c4165
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agointel_rdt: remove redundant code with utils_config_cores
Kamil Wiatrowski [Thu, 2 Nov 2017 13:12:45 +0000 (13:12 +0000)]
intel_rdt: remove redundant code with utils_config_cores

Use utils_config_cores for core groups configuration so it is
in line with intel_pmu and reduce amount of redundant code.

Change-Id: If02e2eeea8bcf3e0df705ebcd9a6310b549b5ebe
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agointel_pmu plugin: implement core groups option
Kamil Wiatrowski [Tue, 8 Aug 2017 14:04:46 +0000 (15:04 +0100)]
intel_pmu plugin: implement core groups option

Having this option will allow to configure monitoring of PMU
events only on specific CPUs thus decrease number of opened
descriptors significantly and avoid 'Too many open files' errors.
New "Cores" option is similar to that available in intel_rdt plugin.
New tool utils_config_cores is added to parse "Cores" option.

Change-Id: I8f792e1f2560c4cf19aee101fdb07c925d682778
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agoMerge pull request #2676 from elfiesmelfie/fix_intel_pmu_crash
Pavel Rochnyak [Mon, 12 Feb 2018 08:20:10 +0000 (15:20 +0700)]
Merge pull request #2676 from elfiesmelfie/fix_intel_pmu_crash

intel_pmu: fix for possible null pointer dereference

6 years agointel_pmu: fix for possible null pointer dereference
Kamil Wiatrowski [Mon, 5 Feb 2018 13:57:13 +0000 (13:57 +0000)]
intel_pmu: fix for possible null pointer dereference

Null pointer dereference could occur for invalid first hardware event.
In pmu_add_hw_events if the first event was not resolved, on the second
iteration the eventlist_last could be dereferenced to mark previous
event as group leader.

Change-Id: Ic2a2a3572d6835ca892d71f3e66812f356592d9e
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
6 years agoMerge pull request #2684 from rpv-tomsk/fix-2673
Pavel Rochnyak [Sat, 10 Feb 2018 11:23:08 +0000 (18:23 +0700)]
Merge pull request #2684 from rpv-tomsk/fix-2673

write_prometheus: Set SO_REUSEADDR on listening socket

6 years agoMerge pull request #2613 from elfiesmelfie/update_dpdk_note
Pavel Rochnyak [Sat, 10 Feb 2018 11:19:02 +0000 (18:19 +0700)]
Merge pull request #2613 from elfiesmelfie/update_dpdk_note

docs: update dpdkstats documentation

6 years agowrite_prometheus: Set SO_REUSEADDR on listening socket
Pavel Rochnyack [Sat, 10 Feb 2018 10:46:30 +0000 (17:46 +0700)]
write_prometheus: Set SO_REUSEADDR on listening socket

Otherwise Collectd fails to bind the socket after restart.

Thanks to Richard Weinberger and Brandon Hume for reporting.

Closes: #2570
Closes: #2673

6 years agoAuto-Merge pull request #2683 from rpv-tomsk/fix-2607
collectd bot [Sat, 10 Feb 2018 10:12:50 +0000 (11:12 +0100)]
Auto-Merge pull request #2683 from rpv-tomsk/fix-2607

Automatically merged due to "Automerge" label

6 years agowrite_kafka: 'rd_kafka_errno2err' is deprecated, fix failed builds
Pavel Rochnyack [Sat, 10 Feb 2018 09:20:41 +0000 (09:20 +0000)]
write_kafka: 'rd_kafka_errno2err' is deprecated, fix failed builds

Since librdkafka-0.11.0 applications should use rd_kafka_last_error()
to retrieve the error code from the legacy APIs.

Thanks to hikdo.

Closes: #2607
Closes: #2628
Closes: #2640

6 years agoUpdate BUILD.dpdkstat.md
Maryam Tahhan [Fri, 26 Jan 2018 11:41:57 +0000 (11:41 +0000)]
Update BUILD.dpdkstat.md

fixed trailing word "Version"

6 years agoAuto-Merge pull request #2629 from rpv-tomsk/fix-2626
collectd bot [Tue, 19 Dec 2017 14:09:45 +0000 (15:09 +0100)]
Auto-Merge pull request #2629 from rpv-tomsk/fix-2626

Automatically merged due to "Automerge" label

6 years agoipmi plugin: Fix broken 'Sensor' configuration option
Pavel Rochnyack [Tue, 19 Dec 2017 13:30:12 +0000 (20:30 +0700)]
ipmi plugin: Fix broken 'Sensor' configuration option

6 years agoAuto-Merge pull request #2611 from rpv-tomsk/fix-2587
collectd bot [Thu, 14 Dec 2017 15:05:23 +0000 (16:05 +0100)]
Auto-Merge pull request #2611 from rpv-tomsk/fix-2587

Automatically merged due to "Automerge" label

6 years agotail plugin, latency: Fix regressions after #2535
Pavel Rochnyack [Sun, 10 Dec 2017 17:14:01 +0000 (17:14 +0000)]
tail plugin, latency: Fix regressions after #2535

 - Remove two fixed decimal places from type instance of percentiles
 - Recover accuracy of bounds in type instance of buckets
 + Allow (compared to state before #2535) to report percentiles with fractional values
 * Changed maximum length of reported type and type instance to 50 chars

References: #2535
Closes: #2587

6 years agodocs: dpdk extended the initial note
Maryam Tahhan [Tue, 12 Dec 2017 16:36:52 +0000 (16:36 +0000)]
docs: dpdk extended the initial note

6 years agodocs: update dpdkstats documentation
Maryam Tahhan [Mon, 11 Dec 2017 16:14:20 +0000 (16:14 +0000)]
docs: update dpdkstats documentation

Update the dpdkstats documentation to state that it shouldn't be used with
OVS-with-DPDK. The Open vSwitch plugins is what should be used.

Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
6 years agoAuto-Merge pull request #2612 from rpv-tomsk/collectd-5.8-memcached
collectd bot [Sun, 10 Dec 2017 21:10:59 +0000 (22:10 +0100)]
Auto-Merge pull request #2612 from rpv-tomsk/collectd-5.8-memcached

Automatically merged due to "Automerge" label

6 years agomemcached: Check for closed connection to avoid deadloop
Pavel Rochnyack [Sun, 10 Dec 2017 20:24:33 +0000 (03:24 +0700)]
memcached: Check for closed connection to avoid deadloop

Check for 'recv(...) == 0' condition was missing.

6 years agodf: fix memory leak in error case
Toshiaki Takahashi [Wed, 6 Dec 2017 12:19:41 +0000 (12:19 +0000)]
df: fix memory leak in error case

Because the memory of the STATANYFS list is not released
when the read callback function error occurs,
a memory leak may occur.
With this change, the memory is always released
by not returning in the loop.

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoMerge branch 'collectd-5.7' into collectd-5.8
Florian Forster [Thu, 7 Dec 2017 16:10:05 +0000 (17:10 +0100)]
Merge branch 'collectd-5.7' into collectd-5.8

6 years agoMakefile.am: Fix out-of-tree builds.
Florian Forster [Thu, 7 Dec 2017 16:06:49 +0000 (17:06 +0100)]
Makefile.am: Fix out-of-tree builds.

Fixes: #2602

6 years agoliboconfig: Coding style changes.
Florian Forster [Tue, 5 Dec 2017 15:58:29 +0000 (16:58 +0100)]
liboconfig: Coding style changes.

Mostly whitespace.

6 years agoliboconfig: Improve error handling.
Florian Forster [Tue, 5 Dec 2017 15:56:53 +0000 (16:56 +0100)]
liboconfig: Improve error handling.

  * Use the YYERROR macro instead of exit(3).
  * Remove newlines from strings passed to yyerror().
  * Change return valud or yyerror() from int to void.

6 years agoliboconfig: Check return values of calloc() and realloc().
Florian Forster [Tue, 5 Dec 2017 15:53:34 +0000 (16:53 +0100)]
liboconfig: Check return values of calloc() and realloc().

CID: 38123

6 years agoemail plugin: Avoid strtok_r to tokenize input.
Florian Forster [Tue, 5 Dec 2017 15:50:33 +0000 (16:50 +0100)]
email plugin: Avoid strtok_r to tokenize input.

Coverity (wrongly) thinks that "type" might have been NULL (since its
first argument is non-NULL, this cannot happen). It has a point about
insufficient NULL-ness checks, though, as "tmp" may very well be NULL and
we're passing it to atoi() which will likely not take this well.

CID: 37988

6 years agoMerge pull request #2590 from maryamtahhan/fix_collectd_ovs_deadlock
Florian Forster [Mon, 4 Dec 2017 08:53:48 +0000 (09:53 +0100)]
Merge pull request #2590 from maryamtahhan/fix_collectd_ovs_deadlock

Fix collectd ovs deadlock

6 years agoceph plugin: Fix #2572
Aleksei Zakharov [Fri, 1 Dec 2017 16:07:04 +0000 (19:07 +0300)]
ceph plugin: Fix #2572

Signed-off-by: Florian Forster <octo@collectd.org>
6 years agoMerge branch 'collectd-5.7' into collectd-5.8
Florian Forster [Mon, 4 Dec 2017 07:23:26 +0000 (08:23 +0100)]
Merge branch 'collectd-5.7' into collectd-5.8

6 years agotable plugin: Add explicit NULL checks to clear functions.
Florian Forster [Mon, 4 Dec 2017 07:18:33 +0000 (08:18 +0100)]
table plugin: Add explicit NULL checks to clear functions.

CID: 37966