Merge pull request #4 from collectd/master
sync with upstream
sync with upstream
virt: Add PluginInstanceFormat none, as default
Fixes #1100
Fixes #1100
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
PluginInterfaceFormat supports multiple fields
Document this.
Document this.
Don't access freed memory
The fields array contains pointers into the value_copy string.
The fields array contains pointers into the value_copy string.
Fix error message
Merge remote-tracking branch 'origin/pr/1135'
Merge remote-tracking branch 'origin/pr/1260'
Merge remote-tracking branch 'origin/pr/1205'
mysql: use mysql_config --include for include path
According to the mysql_config manpage, --cflags shows the
compiler flags the library was compiled with. We certainly don't
want to use those.
According to the mysql_config manpage, --cflags shows the
compiler flags the library was compiled with. We certainly don't
want to use those.
mysql: just search for mysql_get_server_version
If we found that symbol, assume we also found mysql_init.
If we found that symbol, assume we also found mysql_init.
mysql: respect mysql_libs when searching for symbol
We always looked in libmysqlclient, but this doesn't
work for compatible databases such as Percona.
Respect the list return by mysql_config --libs_r instead.
Fixes #1098
We always looked in libmysqlclient, but this doesn't
work for compatible databases such as Percona.
Respect the list return by mysql_config --libs_r instead.
Fixes #1098
added ZFS ARC cache to memory, treating it like Linux cached memory
Merge remote-tracking branch 'origin/pr/1229'
Merge remote-tracking branch 'origin/pr/1254'
Log http error codes other than 200. New config option LogHttpError [true/false].
Fix copy-paste error in debug message in snmp plugin
mqtt plugin: Initialize locks on startup.
D'oh!
Issue: #1262
D'oh!
Issue: #1262
configure: print out build flags and options in summary
configure: move werror flag to features
Make building with -Werror optional.
I noticed various downstream distros patch out -Werror
for one reason or another. This adds an option to make that
easier. It is still on by default.
I noticed various downstream distros patch out -Werror
for one reason or another. This adds an option to make that
easier. It is still on by default.
Merge pull request #3 from collectd/master
merging upstream
merging upstream
plugin.c: emit log message when plugin loading succeeds
Merge pull request #1253 from rubenk/fix-osx-build
gettimeofday() needs <sys/time.h>
gettimeofday() needs <sys/time.h>
dbi plugin interval documentation
Fix compilation for master
gettimeofday() needs <sys/time.h>
Fixes #1247
Fixes #1247
collectd-tg: Fall back to gettimeofday(3) if clock_gettime(3) is not available.
Sometimes Mac OS/X is stupid. clock_gettime() was introduced in 1997, just
sayin'.
Fixes: #1247
Sometimes Mac OS/X is stupid. clock_gettime() was introduced in 1997, just
sayin'.
Fixes: #1247
Merge branch 'collectd-5.5'
src/daemon/utils_time_test.c: add ULL suffix to large literals
This should prevent some 32bit compilers from complaining about:
`integer constant is too large for 'long' type`
This should prevent some 32bit compilers from complaining about:
`integer constant is too large for 'long' type`
Merge branch 'collectd-5.4' into collectd-5.5
Fix harmless build warnings with newer binutils
I see a lot of those on Rawhide:
ar: `u' modifier ignored since `D' is the default (see `U')
It's going to take a while to get this fixed upstream.
Meanwhile, silence the warnings.
Macro copied from libvirt.
I see a lot of those on Rawhide:
ar: `u' modifier ignored since `D' is the default (see `U')
It's going to take a while to get this fixed upstream.
Meanwhile, silence the warnings.
Macro copied from libvirt.
liboconfig: Fix implicit declaration warning
strlen declaration is in string.h
strlen declaration is in string.h
Don't unlock lock twice
Fixes make check on OpenBSD
Fixes make check on OpenBSD
pf: fix compilation on OpenBSD
dns: fix compilation on OpenBSD
OpenBSD doesn't have pcap-bpf.h
pcap.h has been including pcap/bpf.h since 2006.
Since we require a pcap which has PCAP_ERROR_IFACE_NOT_UP, introduced in 2008
this shouldn't break anything.
OpenBSD doesn't have pcap-bpf.h
pcap.h has been including pcap/bpf.h since 2006.
Since we require a pcap which has PCAP_ERROR_IFACE_NOT_UP, introduced in 2008
this shouldn't break anything.
Fix pipe leak in exec plugin
Fixes #762
Fixes #762
src/testing.h: Rename the EXPECT_EQ_{DOUBLE,INT,STR} macros.
Let all equality macros follow a common naming and logging schema.
Let all equality macros follow a common naming and logging schema.
src/testing.h: Rewrite the EXPECT_EQ_UINT64() macro.
Cast the input to uint64_t, so we don't need to do this when calling the
macro. This results in cleaner log messages and prevents macros to be
expanded in the log output.
Cast the input to uint64_t, so we don't need to do this when calling the
macro. This results in cleaner log messages and prevents macros to be
expanded in the log output.
src/daemon/utils_time_test.c: Test ms conversion.
The CDTIME_T_TO_MS() macro is used by all plugins using the cURL library,
so we should properly test this macro, too.
The CDTIME_T_TO_MS() macro is used by all plugins using the cURL library,
so we should properly test this macro, too.
src/daemon/utils_time.h: Don't cast input to time_t.
The CDTIME_T_TO_TIME_T() macro used to cast its input to time_t, which is
a 32bit type on (some?) 32bit architectures.
This is a regression introduced in db1391aaa66b8b8fad82219494f61f3452441f62
and not found in any released version of collectd. Phew!
The CDTIME_T_TO_TIME_T() macro used to cast its input to time_t, which is
a 32bit type on (some?) 32bit architectures.
This is a regression introduced in db1391aaa66b8b8fad82219494f61f3452441f62
and not found in any released version of collectd. Phew!
src/daemon/utils_time.h: Treat nanoseconds as 64bit integer.
The assumed type was "long", because that is what struct timespec is
using. However, struct timespec only stores the fraction of a second in
the approrpiate field and therefore only cares about values up to 10^9.
We, on the other hand, assume a UNIX epoch in ns precision, so we
require the entire 64bits.
This patch changes the [MUN]S_TO_CDTIME_T() macros to assume a uint64_t
input and moves the casting to the appropriate data type for struct
time{val,spec} to the CDTIME_T_TO_TIME{VAL,SPEC}() macros. Appropriate
casts are added to the cURL based plugins which need to pass a "long" to
cURL when specifying timeouts.
It also fixes the unit test, which assigned large (> 32 bit) literals to
a "long" field, which breaks on 32 bit architectures.
The assumed type was "long", because that is what struct timespec is
using. However, struct timespec only stores the fraction of a second in
the approrpiate field and therefore only cares about values up to 10^9.
We, on the other hand, assume a UNIX epoch in ns precision, so we
require the entire 64bits.
This patch changes the [MUN]S_TO_CDTIME_T() macros to assume a uint64_t
input and moves the casting to the appropriate data type for struct
time{val,spec} to the CDTIME_T_TO_TIME{VAL,SPEC}() macros. Appropriate
casts are added to the cURL based plugins which need to pass a "long" to
cURL when specifying timeouts.
It also fixes the unit test, which assigned large (> 32 bit) literals to
a "long" field, which breaks on 32 bit architectures.
src/daemon/utils_time.h: Improve precision of conversion macros.
This patch also adds test cases for most conversions. It is inspired by
collectd/go-collectd#5 and uses some of the same test cases.
This patch also adds test cases for most conversions. It is inspired by
collectd/go-collectd#5 and uses some of the same test cases.
Allow to specify per database interval for fetching stats
ltdl: only compile included libltdl when needed
If configure finds an external libltdl, it's going to
use it, so there's no use in compiling the shipped libltdl.
If configure finds an external libltdl, it's going to
use it, so there's no use in compiling the shipped libltdl.
Merge remote-tracking branch 'origin/pr/1216'
Merge remote-tracking branch 'origin/pr/1188'
Use the devstat struct directly instead of using devstat_compute_statistics().
powerdns: update recursor stats to 3.7.3
Fixes #555
Fixes #555
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Changed the max value of cache_size in types.db to handle boxes with large amounts of memory
Added more data to ZFS stats, c, c_min, and c_max for bettering monitoring arc usage
routeros: fix a small build error pointed out by clang
routeros.c:334:35: error: 'memset' call operates on objects of type 'cr_data_t' (aka 'struct cr_data_s') while the size is based on a different type 'cr_data_t *' (aka 'struct cr_data_s *') [-Werror,-Wsizeof-pointer-memaccess]
memset (router_data, 0, sizeof (router_data));
~~~~~~~~~~~ ^~~~~~~~~~~
routeros.c:334:35: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
memset (router_data, 0, sizeof (router_data));
^~~~~~~~~~~
routeros.c:334:35: error: 'memset' call operates on objects of type 'cr_data_t' (aka 'struct cr_data_s') while the size is based on a different type 'cr_data_t *' (aka 'struct cr_data_s *') [-Werror,-Wsizeof-pointer-memaccess]
memset (router_data, 0, sizeof (router_data));
~~~~~~~~~~~ ^~~~~~~~~~~
routeros.c:334:35: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
memset (router_data, 0, sizeof (router_data));
^~~~~~~~~~~
Merge pull request #1153 from mbethke/fix-unixsock
Fix Unixsock.pm
Fix Unixsock.pm
Merge pull request #1178 from rubenk/fix-libmodbus-compilation-on-freebsd
core: include <sys/socket.h> in collectd.h
core: include <sys/socket.h> in collectd.h
ipc: enable _GNU_SOURCE to fix build with musl libc
This fixes compile the compile error:
> ipc.c:154:49: error: 'struct shm_info' has no member named 'used_ids'
> ipc_submit_g("shm", "segments", NULL, shm_info.used_ids);
> ^
Fixes #1147
This fixes compile the compile error:
> ipc.c:154:49: error: 'struct shm_info' has no member named 'used_ids'
> ipc_submit_g("shm", "segments", NULL, shm_info.used_ids);
> ^
Fixes #1147
Revert "amqp: look for librabbitmq in /usr/local as well"
This reverts commit c1c5087fd5d9e66427cee8c98c523519d578bee6.
... as a follow-up to the discussion which took place in #1201
This reverts commit c1c5087fd5d9e66427cee8c98c523519d578bee6.
... as a follow-up to the discussion which took place in #1201
fhcount: this plugin only works on Linux
Merge pull request #1196 from rubenk/travis
Travis
Travis
Travis: add some whitelisted packages
The list is at https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
The list is at https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
Travis: test with both gcc and clang
Travis does this in parallel so the build doesn't become
twice as long.
Travis does this in parallel so the build doesn't become
twice as long.
Travis: run make distcheck
This way we test if we can successfully build from tarball,
and we didn't leave out any files or forgot to clean something up.
This way we test if we can successfully build from tarball,
and we didn't leave out any files or forgot to clean something up.
disk: no need to link with kvm, bsdxml, sbuf
disk: rename snap_present to snap
There's only one of them now
There's only one of them now
disk: gather statistics since boot on FreeBSD
disk_octets and disk_ops are derives, so we don't want rates
but absolute values.
I tested this with fio with a constant IO rate and confirmed
that the values are correct for disk_octets and disk_ops.
disk_time is a different matter and I need some help with that.
devstat_compute_statistics returns a long double and it didn't
seem to increase much on my system, but that might be because I
tested this with a fast SSD.
disk_octets and disk_ops are derives, so we don't want rates
but absolute values.
I tested this with fio with a constant IO rate and confirmed
that the values are correct for disk_octets and disk_ops.
disk_time is a different matter and I need some help with that.
devstat_compute_statistics returns a long double and it didn't
seem to increase much on my system, but that might be because I
tested this with a fast SSD.
Make disk plugin compatible with FreeBSD.
Merge branch 'collectd-5.5'
systemd.collectd.service: take debian/ubuntu's env file in account too
Merge remote-tracking branch 'origin/pr/1191'
Merge remote-tracking branch 'origin/pr/1181'
Merge remote-tracking branch 'origin/pr/1175'
Merge remote-tracking branch 'origin/pr/1164'
Merge branch 'collectd-5.4' into collectd-5.5
logstash: initialize conf struct to 0
With YAJL 1 (at least on Ubuntu Precise), if `conf.indentString` is not
initialized correctly, we would get a segfault even when `conf.beautify`
is set to 0. We avoid this case by initializing the whole structure to
0. `conf.beautify = 0` is kept for explicitness.
With YAJL 1 (at least on Ubuntu Precise), if `conf.indentString` is not
initialized correctly, we would get a segfault even when `conf.beautify`
is set to 0. We avoid this case by initializing the whole structure to
0. `conf.beautify = 0` is kept for explicitness.
Fix libmodbus detection on FreeBSD
We look for modbus/modbus.h in /usr/local/include/modbus
but we should look for modbus.h
This is only an issue on FreeBSD since /usr/local/include is not
in the default search path.
We look for modbus/modbus.h in /usr/local/include/modbus
but we should look for modbus.h
This is only an issue on FreeBSD since /usr/local/include is not
in the default search path.
amqp: look for librabbitmq in /usr/local as well
This detects it automatically on FreeBSD.
Ideally we should just use pkg-config but that is
left as an exercise for the reader ;)
This detects it automatically on FreeBSD.
Ideally we should just use pkg-config but that is
left as an exercise for the reader ;)
Fix varnish detection on FreeBSD
We look for varnish/vapi/vsc.h in /usr/include/varnish
but we should look for vapi/vsc.h
This is only an issue on FreeBSD since /usr/local/include is not
in the default search path.
We look for varnish/vapi/vsc.h in /usr/include/varnish
but we should look for vapi/vsc.h
This is only an issue on FreeBSD since /usr/local/include is not
in the default search path.
irq: skip FIQ line in /proc/interrupts
/proc/interrupts on my Raspberry PI contains:
FIQ: usb_fiq
This line doesn't contain any per cpu counters
but we try to parse it anyway, resulting in:
parse_value: Failed to parse string as derive: usb_fiq.
Fixes #971
/proc/interrupts on my Raspberry PI contains:
FIQ: usb_fiq
This line doesn't contain any per cpu counters
but we try to parse it anyway, resulting in:
parse_value: Failed to parse string as derive: usb_fiq.
Fixes #971
configure.ac: remove some redundant x'es
configure.ac: fix indentation
Fix a memory leak on shutdown
Use environmental variables from /etc/sysconfig/collectd
Change-Id: I948ce3d7a3071cc1ac26a24b059a5ee4aacba0d9
Change-Id: I948ce3d7a3071cc1ac26a24b059a5ee4aacba0d9
travis: make check as well
Add more test stuff to .gitignore
core: include <sys/socket.h> in collectd.h
Fixes #1127
Fixes #1127
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Add utils_parse_option.c/h to amqp plugin source files list
collectd -T: fix memory leak
Fix some small leaks on error paths
liboconfig: really fix lex warnings
Flex has two options to disable input and unput.
Turn them on.
Flex has two options to disable input and unput.
Turn them on.
Add remark about length of HostnameFormat string in virt plugin
Merge remote-tracking branch 'origin/pr/1168'
Use standard ints in write_kafka plugin for portability
travis: move to new infra
travis: update script
travis: enable ci