Jakub Jankowski [Tue, 14 May 2019 00:16:35 +0000 (02:16 +0200)]
curl_xml plugin: add AddressFamily
In situations when hostnames in URLs resolve to both IPv4 and IPv6
addresses, sometimes it's useful to have separate statistics for both
of these separately.
With this commit, within <URL> block you can set
AddressFamily "ipv6"
or
AddressFamily "ipv4"
to specifically use one or the other.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Jakub Jankowski [Tue, 14 May 2019 00:00:18 +0000 (02:00 +0200)]
curl_json plugin: add AddressFamily
In situations when hostnames in URLs resolve to both IPv4 and IPv6
addresses, sometimes it's useful to have separate statistics for both
of these separately.
With this commit, within <URL> block you can set
AddressFamily "ipv6"
or
AddressFamily "ipv4"
to specifically use one or the other.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Jakub Jankowski [Sat, 3 Nov 2018 01:51:29 +0000 (02:51 +0100)]
curl plugin: add AddressFamily
In situations when hostnames in URLs resolve to both IPv4 and IPv6
addresses, sometimes it's useful to have separate statistics for both
of these separately.
With this commit, within <Page> block you can set
AddressFamily "ipv6"
or
AddressFamily "ipv4"
to specifically use one or the other.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Nikita Kozlov [Tue, 14 Nov 2017 20:48:53 +0000 (21:48 +0100)]
disk: in linux, reset the disk when it disappear from diskstats
If you don't reset the diskstats_t for a given diskname when it
disappear and the disk name is reused later (for exemple an iSCSI disk)
The "disk" plugin detect an int overflow because linux /proc/diskstats are
reseted to 0 for that diskname and the plugin send incorrect stats for
the new disk.
The sum of counters change is 1001, which produces reported value near
to 100.1%. I got calculated ds[0] = 100.100053 and such value produces gap on
charts.
Pablo Llopis [Tue, 13 Mar 2018 10:55:06 +0000 (11:55 +0100)]
turbostat plugin: add new setting `RestoreAffinityPolicy`
This new setting controls how the affinity is restored during
turbostat_read(). Two policies are implemented: AffinityRestore, and
AffinityAllCPUs. The default policy, AffinityRestore, behaves exactly
the same as before, which is to save affinity and to later restore it.
The second policy, RestoreAllCPUs, skips saving the affinity and
sets the affinity to all CPUs after each read. This second policy is
useful for systems where sched_getaffinity() fails and prevents data
collection.
YmrDtnJu [Sat, 10 Dec 2016 00:30:59 +0000 (01:30 +0100)]
zfs_arc: Ignore the first two lines of the statistics file on Linux.
The first two lines of the statistics file on Linux contain information about
the rest of the file. They do not contain any usable statistics.
See module/spl/spl-kstat.c of the spl module of ZFS on Linux for more
information.
Pavel Rochnyack [Thu, 25 Oct 2018 07:53:33 +0000 (14:53 +0700)]
virt plugin: Remove optional virDomainGetCPUStats() from main flow
virDomainGetCPUStats() call is only required when `pcpu' extra statistics is requested.
While not supported in all configurations, this call may fail which causes failure in
reporting of other domain metrics.
Florian Forster [Wed, 24 Oct 2018 08:07:08 +0000 (10:07 +0200)]
src/utils_oauth.c: Renew OAuth tokens 30 seconds before they expire.
This solves sporious errors like this one:
write_stackdriver plugin: POST https://monitoring.googleapis.com/v3/projects/{projectId}/timeSeries:
API error 401: Request had invalid authentication credentials.
Expected OAuth 2 access token, login cookie or other valid authentication credential.
See https://developers.google.com/identity/sign-in/web/devconsole-project.
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.
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
Florian Forster [Tue, 9 Oct 2018 11:54:50 +0000 (13:54 +0200)]
src/utils_format_stackdriver.c: Fix initial value of cumulative metrics.
The start value of cumulative metrics is stored in the cache. The first
value of a cumulative metric is then skipped, since Stackdriver required
the interval to be non-zero.
While looking into this, I realized that "absolute" metrics are not
cumulative and changed them accordingly.
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
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.