Merge pull request #1309 from baryonix/time_fix
Fix TIMESPEC_TO_CDTIME_T() on 32-bit arch.
Fix TIMESPEC_TO_CDTIME_T() on 32-bit arch.
write_redis plugin: Add support for StoreRates option
write_redis plugin: Improve ZREMRANGEBYRANK command debug message
write_redis plugin: Fix ZREMBYRANK command debug message
write_redis plugin: Add option to limit sorted set size
Merge branch 'collectd-5.5'
write_redis: fix a few typos in manpage
Also correct the maximum length of the node name.
The callback name is "write_redis/%s" so the maximum
length of a node name is DATA_MAX_NAME_LEN - strlen("write_redis") -1.
Also correct the maximum length of the node name.
The callback name is "write_redis/%s" so the maximum
length of a node name is DATA_MAX_NAME_LEN - strlen("write_redis") -1.
Merge branch 'collectd-5.4' into collectd-5.5
write_redis: remove unused variable from wr_write()
write_redis plugin: Remove old zadd command formatting code that should not be there to fix sorted set key names
collectd.conf.pod: correct a small typo
Fix a few typos in collectd-exec(5)
Fix TIMESPEC_TO_CDTIME_T() on 32-bit arch.
Add ULL prefix to constant to ensure we get a 64-bit unsigned multiply.
Add ULL prefix to constant to ensure we get a 64-bit unsigned multiply.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
processes: correctly count processes on FreeBSD
because actually we count threads instead of processes
(partial backport of 85c31a6d66 for collectd-5.4 /mf)
because actually we count threads instead of processes
(partial backport of 85c31a6d66 for collectd-5.4 /mf)
Fix 'Modification of a read-only value attempted' error
processes: correctly count processes on {free,open}BSD
because actually we count threads instead of processes
because actually we count threads instead of processes
systemd.collectd.service: backport changes from master branch
Merge remote-tracking branch 'origin/pr/1264'
python: Fix double-free bug.
Merge pull request #1289 from trenkel/master
python: Fix double-free bug.
python: Fix double-free bug.
python: Fix double-free bug.
systemd: drop all capabilities by default
dns and ping need CAP_NET_RAW, iptables needs CAP_NET_ADMIN
so leave those commented out in the .service file.
dns and ping need CAP_NET_RAW, iptables needs CAP_NET_ADMIN
so leave those commented out in the .service file.
Make /home, /root and /run/user inaccessible
Mount /usr, /boot and /etc readonly
No need to wait 10 seconds before restarting
Systemd makes sure the process is gone before starting a new one
Systemd makes sure the process is gone before starting a new one
Only restart collectd on failure
Do what the comment says ;)
Do what the comment says ;)
NotifyAccess is the default
Let systemd handle logging
notify_systemd: unset NOTIFY_SOCKET later
getenv returns a pointer, possibly to a static buffer.
If I understand the specs correctly, unsetenv is basically free
to do what it wants with this, so don't keep using the pointer
after we do unsetenv.
getenv returns a pointer, possibly to a static buffer.
If I understand the specs correctly, unsetenv is basically free
to do what it wants with this, so don't keep using the pointer
after we do unsetenv.
notify_systemd: remove dead code
The whole function is already wrapped in #ifdef KERNEL_LINUX
The whole function is already wrapped in #ifdef KERNEL_LINUX
notify_systemd: use close-on-exit on socket
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
gmond: fix linking against libganglia at build time
Current versions of libganglia don't ship the ganglia-config utility
anymore. Change the configure script to not expect it to be in $PATH and
provide sensible defaults instead.
Fix #1129
Current versions of libganglia don't ship the ganglia-config utility
anymore. Change the configure script to not expect it to be in $PATH and
provide sensible defaults instead.
Fix #1129
log_logstash: fix timestamp field to respect ISO 8601 format
Fixes #1132
Fixes #1132
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.
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.