mqtt plugin: Rename "TLSprotocol" to "TLSProtocol".
mqtt plugin: Rename "CACertificateFile" to "CACert".
This way the option name is consistent with the name used by the cURL
plugins.
Sorry for previous comments in #1345 that pushed towards copying Apache
HTTPd's naming schema -- being consistent within collectd is more
important.
This way the option name is consistent with the name used by the cURL
plugins.
Sorry for previous comments in #1345 that pushed towards copying Apache
HTTPd's naming schema -- being consistent within collectd is more
important.
Add TLS support
addresses #1265
protect for newer libmosquitto
address octo's comments
addresses #1265
protect for newer libmosquitto
address octo's comments
Merge branch 'collectd-5.5'
Add utils_ignorelist back to daemon (#1323)
commit 216c6246b73645ac093de15b87aedc9abc6ebc80 moves the collectd
daemon files into the src/daemon/ directory, but also silently drops
utils_ignorelist. Dropping utils_ignorelist from the daemon has the
drawback that it cannot be used by plugins any more and that 16 plugins
need to bundle ignorelist.
Thus add utils_ignorelist back to the collectd daemon.
commit 216c6246b73645ac093de15b87aedc9abc6ebc80 moves the collectd
daemon files into the src/daemon/ directory, but also silently drops
utils_ignorelist. Dropping utils_ignorelist from the daemon has the
drawback that it cannot be used by plugins any more and that 16 plugins
need to bundle ignorelist.
Thus add utils_ignorelist back to the collectd daemon.
Merge branch 'collectd-5.4' into collectd-5.5
Fix clang complaining about extraneous parenthesis.
ASN_GAUGE (SNMP-SMIv2 Gauge32) is unsigned, not signed.
Start write threads after plugin initialization.
Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.
If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.
To fix this, delay starting the write threads until after all plugins
have been initialized.
Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.
If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.
To fix this, delay starting the write threads until after all plugins
have been initialized.
Merge branch 'collectd-5.4' into collectd-5.5
statsd: provide a gauge for counters, holding the absolute count.
When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.
When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
battery: add missing capacity type to types.db
For the record, "capacity" was introduced by a2e732f8.
Also fix a bogus example in collectd.conf.
Thanks to @ryan-williams for reporting the problem !
Fix #1338
For the record, "capacity" was introduced by a2e732f8.
Also fix a bogus example in collectd.conf.
Thanks to @ryan-williams for reporting the problem !
Fix #1338
apcups: prefix plugin name in INFO and DEBUG statements
Fixes #1329
Fixes #1329
Merge pull request #1311 from pyr/fix/1282
statsd: provide a gauge for counters, holding the absolute count.
statsd: provide a gauge for counters, holding the absolute count.
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)
statsd: provide a gauge for counters, holding the absolute count.
When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.
When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.
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'