Merge remote-tracking branch 'github/pr/2449'
snmp plugin: Use array instead of cycle in res->errstat check
Merge remote-tracking branch 'github/pr/2452'
Merge remote-tracking branch 'github/pr/2437'
Merge remote-tracking branch 'github/pr/2034'
Updating the varnish plugin
src/utils_match.c: Reset UTILS_MATCH_CF_GAUGE_INC matches to zero (was: NaN)
Fixes: #2448
Fixes: #2448
Merge remote-tracking branch 'github/pr/2388'
Proper return value from 'swrite()' when connection has been closed
According to POSIX, errno is set only if 'recv()' returns -1.
When connection has been closed, 'recv()' returns 0 and errno left untouched.
For functions which check errno value after 'swrite()', errno now is set to ECONNRESET,
so they produce correct message 'Connection reset by peer'.
According to POSIX, errno is set only if 'recv()' returns -1.
When connection has been closed, 'recv()' returns 0 and errno left untouched.
For functions which check errno value after 'swrite()', errno now is set to ECONNRESET,
so they produce correct message 'Connection reset by peer'.
memcached: Style fix
snmp plugin: Reworked/fixed res->errstat check
snmp plugin: Added res->errstat check
Collectd does not check for `res->errstat` value after
`snmp_sess_synch_response()` call. In case of error, there is no any data in
`res->variables` actually, but variables are tried to be processed as usual.
Suffix calculation will fail, so all subtrees will be marked as failed, not
only one subtree which caused an error.
The csnmp_instance_list_add() call will fail too, and, as result,
`csnmp_read_table` will finish it's work without any data submission.
The log message like
"snmp plugin: host HOSTNAME: csnmp_instance_list_add failed",
which is put into logs in this case, also has no enough diagnostic data.
Added code to proper check for `res->errstat` and to try to get available data.
Issue: #2291
Collectd does not check for `res->errstat` value after
`snmp_sess_synch_response()` call. In case of error, there is no any data in
`res->variables` actually, but variables are tried to be processed as usual.
Suffix calculation will fail, so all subtrees will be marked as failed, not
only one subtree which caused an error.
The csnmp_instance_list_add() call will fail too, and, as result,
`csnmp_read_table` will finish it's work without any data submission.
The log message like
"snmp plugin: host HOSTNAME: csnmp_instance_list_add failed",
which is put into logs in this case, also has no enough diagnostic data.
Added code to proper check for `res->errstat` and to try to get available data.
Issue: #2291
Merge remote-tracking branch 'github/pr/2446'
msr-index: include GPLv2 header
memcached: Report connections rate
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1979'
turbostat: better support for mutli packages
If multiple packages are defined, support non-logical core enumeration
by prefixing each core id by its package id
If multiple packages are defined, support non-logical core enumeration
by prefixing each core id by its package id
turbostat: import msr-index header from linux
Since Linux 4.12, the kernel does not expose msr-index.h to the userland
anymore. This commit pulls and hardcode the required definitions.
Since Linux 4.12, the kernel does not expose msr-index.h to the userland
anymore. This commit pulls and hardcode the required definitions.
Merge remote-tracking branch 'github/pr/2440'
Add max_set_duration to set duration for value
This change introduces max_set_duration, the duration for the value
as max_set_size. max_set_size can keep the db size, however, sometime
max_set_size allows to contain old data. max_set_duration can keep
the latest data.
This change introduces max_set_duration, the duration for the value
as max_set_size. max_set_size can keep the db size, however, sometime
max_set_size allows to contain old data. max_set_duration can keep
the latest data.
uptime plugin: don't cache boot time and simplify Linux code
Caching boottime on startup yields incorrect uptime values if system
date changes after the daemon is started.
This is almost certain to happen on embedded systems without RTC, where
clock is set from NTP server at some point after boot process.
On Linux, we can retrieve uptime directly by either reading /proc/uptime
(it's sufficient to read a few bytes) or calling sysinfo() function.
Use the latter since it's the most efficient way in speed, memory
requirements and code simplicity terms.
Caching boottime on startup yields incorrect uptime values if system
date changes after the daemon is started.
This is almost certain to happen on embedded systems without RTC, where
clock is set from NTP server at some point after boot process.
On Linux, we can retrieve uptime directly by either reading /proc/uptime
(it's sufficient to read a few bytes) or calling sysinfo() function.
Use the latter since it's the most efficient way in speed, memory
requirements and code simplicity terms.
Merge remote-tracking branch 'github/pr/2442'
zfs_arc plugin: Avoid resetting global variables from init().
Fixes: #973
Fixes: #973
zfs_arc: derive hit/miss stats for ratio calculations
tail plugin: Allow to set "bucket" metrics type
When several distributions needs to be calculated in one 'tail' instance,
all their metrics will be reported as single 'bucket' type with the same plugin instance value.
That is confusing and this patch allows to split these metrics to their own types.
When several distributions needs to be calculated in one 'tail' instance,
all their metrics will be reported as single 'bucket' type with the same plugin instance value.
That is confusing and this patch allows to split these metrics to their own types.
Merge remote-tracking branch 'github/pr/2439'
cpu plugin: add new options to the default configuration file.
cpu plugin: adjust numfields conditions in cpu_read().
cpu plugin: adjust coding style (variable declaration).
cpu plugin: update documentation.
cpu plugin: subtract guest states from user/nice.
Merge pull request #2441 from zerkms/ISSUE-2433
Added `ReportIO` option to the `swap` plugin
Added `ReportIO` option to the `swap` plugin
swap plugin: Added `ReportIO` option
lxc/lxd containers at the moment cannot properly report the swap io (the corresponding /proc/vmstat are not virtualized), so added an option to disable that reporting.
Enabled by default.
Closes: #2433
lxc/lxd containers at the moment cannot properly report the swap io (the corresponding /proc/vmstat are not virtualized), so added an option to disable that reporting.
Enabled by default.
Closes: #2433
Merge remote-tracking branch 'github/pr/2377'
Filecount plugin: Code style changes, clang-format
Filecount plugin: Custom values for reported plugin, type and type instance
* Allow to set plugin name;
* Allow to set empty plugin instance;
* Allow to set metric types: Added 'FilesSizeType' and 'FilesCountType' options;
* Allow to disable metric reporting;
* Allow to set metrics type instance
* Allow to set plugin name;
* Allow to set empty plugin instance;
* Allow to set metric types: Added 'FilesSizeType' and 'FilesCountType' options;
* Allow to disable metric reporting;
* Allow to set metrics type instance
Merge remote-tracking branch 'github/pr/2434'
Merge remote-tracking branch 'github/pr/2435'
Merge branch 'collectd-5.7'
Merge branch 'collectd-5.6' into collectd-5.7
src/daemon/collectd.c: Fix implementation of the -B option.
Also add a manual page entry.
Issue: #2421
Pull-Request: #2422
Also add a manual page entry.
Issue: #2421
Pull-Request: #2422
Merge remote-tracking branch 'github/pr/2422'
Fixes: #2421
Fixes: #2421
table: Allow custom plugin name to be reported
Add daemon option to avoid making BaseDir
One possible implementation of collectd/collectd#2421
One possible implementation of collectd/collectd#2421
openvpn: Changes after review, clang-formatting
openvpn: reworked status file parser
* Added detection of status fields index by parsing 'HEADER' lines.
This allows to support status files from latest OpenVPN-2.4 and possible from future versions;
* Fixed a bug with OpenVPN status file version 3 where delimiter is 'tab' (not space or comma);
* Status file version detection was moved from configuration callback to read callback;
* Now 'plugin_register_complex_read()' is used for registering read callback.
Closes: #2128
* Added detection of status fields index by parsing 'HEADER' lines.
This allows to support status files from latest OpenVPN-2.4 and possible from future versions;
* Fixed a bug with OpenVPN status file version 3 where delimiter is 'tab' (not space or comma);
* Status file version detection was moved from configuration callback to read callback;
* Now 'plugin_register_complex_read()' is used for registering read callback.
Closes: #2128
cpu plugin: add linux-specific "guest" states.
collectd.conf(5): Document dependencies between mqtt's TLS options better.
mqtt plugin: Add support for TLS in Subscriber blocks.
Fixes: #2419
Fixes: #2419
perl plugin: Improve error message.
Merge remote-tracking branch 'github/pr/2391' into collectd-5.6
nfs plugin: Fix typo
Merge remote-tracking branch 'github/pr/2430'
Merge branch 'pr/2431'
uptime plugin: Coding style update.
This is only touching the Linux code, though.
This is only touching the Linux code, though.
nfs plugin: Changes after review
* Avoid negated config options (s/IgnoreV/ReportV/)
* Use _Bool instead of int
* Handle multiple occurences of config option correctly
* Avoid negated config options (s/IgnoreV/ReportV/)
* Use _Bool instead of int
* Handle multiple occurences of config option correctly
Merge branch 'collectd-5.7'
Reimplemented `uptime` plugin to read from `/proc/uptime`
synproxy plugin: Re-run clang-format.
Merge remote-tracking branch 'github/pr/2381'
Merge pull request #2417 from bluca/dpdk_pkgconfig_backport
configure.ac: dpdk: use pkg-config - 5.7
configure.ac: dpdk: use pkg-config - 5.7
Merge remote-tracking branch 'github/pr/2412'
use generic types in synproxy plugin and code refactoring
Fix source path in automake
New plugin: synproxy
nfs: Add config options to ignore versions
collectd.spec: avoid accidentally picking an ancient/unsupported java version
ntpd: Correct loop offset and error calculation
Stop the scaling calculation dropping the sign of the underlying value
Fixes: #2188
Stop the scaling calculation dropping the sign of the underlying value
Fixes: #2188
Merge remote-tracking branch 'github/pr/2258'
Treewide: Don't set value_list_t.host to hostname_g.
plugin_dispatch_values() will automatically fill that value in.
plugin_dispatch_values() will automatically fill that value in.
libcollectdclient: Guard gcrypt code with preprocessor conditionals.
libcollectdclient: Include <stdlib.h> and <string.h>.
For free(3) and memmove(3) respectively.
For free(3) and memmove(3) respectively.
collectd.spec: add new intel_pmu plugin
configure.ac: fix indentation
Merge pull request #2405 from cpaelzer/fix-dpdk-pkg-config-if-not-available
configure.ac: dpdk: tolerate no pkg-config
configure.ac: dpdk: tolerate no pkg-config
configure.ac: follow the 2 space indent style
The rest of configure.ac indents not to the context, but by 2 spaces.
Follow that rule to stay in style.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
The rest of configure.ac indents not to the context, but by 2 spaces.
Follow that rule to stay in style.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
configure.ac: fix indent
Fix tab indents to be space based as they should, but keep the
effective indent at the level of the context it belongs to in
PKG_CHECK_MODULES.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Fix tab indents to be space based as they should, but keep the
effective indent at the level of the context it belongs to in
PKG_CHECK_MODULES.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
configure.ac: dpdk: use pkg-config
To detect cflags and libs use the sometimes provided pkg-config for
libdpdk. That avoids build errors on systems where special flags are
needed and provided by dpdk via pkg-config, but not yet considered by
the collectd build system.
To detect cflags and libs use the sometimes provided pkg-config for
libdpdk. That avoids build errors on systems where special flags are
needed and provided by dpdk via pkg-config, but not yet considered by
the collectd build system.
configure.ac: dpdk: tolerate no pkg-config
Since pull request #2400 pkg-config works great for dpdk, but not if
there is no pkg-config around at all.
To fix that the PKG_CHECK_MODULES macro needs to define a valid fourth
argument, otherwise it will error out.
This closes 2404
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Since pull request #2400 pkg-config works great for dpdk, but not if
there is no pkg-config around at all.
To fix that the PKG_CHECK_MODULES macro needs to define a valid fourth
argument, otherwise it will error out.
This closes 2404
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Merge pull request #2400 from cpaelzer/fix-dpdk-multiarch-pkg-config
configure.ac: dpdk: use pkg-config
configure.ac: dpdk: use pkg-config
configure.ac: dpdk: append DPDK_CFLAGS to LIBDPDK_CPPFLAGS
In some way it is bad naming in pkg-config - it is always some sort of
conflated ldflags + libs and cppflags + cxxflags + cflags.
Due to that to work correctly we append DPDK_CFLAGS (if defined by
pkg-config) to LIBDPDK_CPPFLAGS as well.
This intentionally does not add those CFLAGS specified by a user to
allow full override and fully separated CLFAGS/CPPFLAGS if needed.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
In some way it is bad naming in pkg-config - it is always some sort of
conflated ldflags + libs and cppflags + cxxflags + cflags.
Due to that to work correctly we append DPDK_CFLAGS (if defined by
pkg-config) to LIBDPDK_CPPFLAGS as well.
This intentionally does not add those CFLAGS specified by a user to
allow full override and fully separated CLFAGS/CPPFLAGS if needed.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
configure.ac: dpdk: introduce LIBDPDK_CFLAGS
This restores the former behavior of LIBDPDK_CPPFLAGS and now
correctly carries CFLAGS read from pkg-config in its own variable.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
This restores the former behavior of LIBDPDK_CPPFLAGS and now
correctly carries CFLAGS read from pkg-config in its own variable.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
configure.ac: dpdk: use pkg-config
To detect cflags and libs use the sometimes provided pkg-config for
libdpdk. That avoids build errors on systems where special flags are
needed and provided by dpdk via pkg-config, but not yet considered by
the collectd build system.
This closes #2399
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To detect cflags and libs use the sometimes provided pkg-config for
libdpdk. That avoids build errors on systems where special flags are
needed and provided by dpdk via pkg-config, but not yet considered by
the collectd build system.
This closes #2399
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
perl plugin: Added check of proper interpreter initialization.
Closes: #927
Closes: #927
memcached: Persistent connections with IO timeouts
Merge pull request #2378 from cramertj/grpc-meta
Add metadata support to GRPC plugin
Add metadata support to GRPC plugin
Merge pull request #2380 from maryamtahhan/feat_mcelog_bugfixes
mcelog: fix compilation error caused by migration to snprintf().
mcelog: fix compilation error caused by migration to snprintf().
GRPC metadata review cleanup
openldap: Fix plugin shutdown with connection failed
When plugin failes to connect to LDAP server, the `ldap_unbind_ext_s(st->ld)` is called.
According to `man 3 ldap_unbind_ext_s`, that call is used to free the resources contained in the ld structure.
When plugin shutdown, the `ldap_unbind_ext_s` called again, which causes coredump.
The plugin code was changed to set st->ld to NULL after `ldap_unbind_ext_s()` call.
When plugin failes to connect to LDAP server, the `ldap_unbind_ext_s(st->ld)` is called.
According to `man 3 ldap_unbind_ext_s`, that call is used to free the resources contained in the ld structure.
When plugin shutdown, the `ldap_unbind_ext_s` called again, which causes coredump.
The plugin code was changed to set st->ld to NULL after `ldap_unbind_ext_s()` call.
mcelog: fix compilation error caused by migration to snprintf().
Change-Id: I625254fa60efbb94580ed2eb69d7c7bf7027a6eb
Signed-off-by: Korynkevych, RomanX <romanx.korynkevych@intel.com>
Change-Id: I625254fa60efbb94580ed2eb69d7c7bf7027a6eb
Signed-off-by: Korynkevych, RomanX <romanx.korynkevych@intel.com>
Add metadata support to GRPC plugin
Merge pull request #2246 from maryamtahhan/feat_mcelog_notification_bugfixes
Feat mcelog notification bugfixes
Feat mcelog notification bugfixes
mcelog: updates based on review comments
* modified code to use return without parenthesis
* fixed logic that parses config options
Change-Id: I2c5c5f42f8395306622dee8cdf4f94b46e3e3570
Signed-off-by: Korynkevych, RomanX <romanx.korynkevych@intel.com>
* modified code to use return without parenthesis
* fixed logic that parses config options
Change-Id: I2c5c5f42f8395306622dee8cdf4f94b46e3e3570
Signed-off-by: Korynkevych, RomanX <romanx.korynkevych@intel.com>
Merge pull request #2349 from rpv-tomsk/fix-register-complex-read
Free `userdata` if plugin_register_complex_read() has failed.
Free `userdata` if plugin_register_complex_read() has failed.
openldap: Fixed possible dereference of NULL pointer
If `plugin_register_complex_read()` has failed, then `cldap_free` is called which set pointer to NULL.
That pointer is accessed by `cldap_shutdown()` callback later.
If `plugin_register_complex_read()` has failed, then `cldap_free` is called which set pointer to NULL.
That pointer is accessed by `cldap_shutdown()` callback later.
Change error message when read callback name is duplicated while registering it.
The message `Check for duplicate "LoadPlugin" lines` is obsolete, as there is a special check in `plugin_load()` for this case.
The message `Check for duplicate "LoadPlugin" lines` is obsolete, as there is a special check in `plugin_load()` for this case.
Free `userdata` if plugin_register_complex_read() has failed.
Merge pull request #2375 from rpv-tomsk/small-fix
network: Fix free() before use
network: Fix free() before use
network: Fix free() before use