when building from dirty working dir, show it.
This adds a + when the working dir is dirty, i.e.:
5.5.0.355.gfba3b8da7b64+
This adds a + when the working dir is dirty, i.e.:
5.5.0.355.gfba3b8da7b64+
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
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
src/utils_latency.c: Fix format string error.
src/utils_latency.c: Ensure that LLONG_MAX is defined.
EPEL5 doesn't have it in <limits.h> apparently.
EPEL5 doesn't have it in <limits.h> apparently.
RPM specfile: take mqtt plugin in account
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.
write_graphite: set service at config time
write_graphite: set service at config time
This fixes the (null) I saw in an error message:
write_graphite plugin: send to localhost:(null) (udp) failed with status -1 (Connection refused)
This fixes the (null) I saw in an error message:
write_graphite plugin: send to localhost:(null) (udp) failed with status -1 (Connection refused)
write_graphite: set default node at config time
write_graphite: remove #ifndefs
If these are defined somewhere else to a different value,
we'd like to know about it.
If these are defined somewhere else to a different value,
we'd like to know about it.
make _escape_argument() readonly-safe on older Perls
fix evil autoderef
src/utils_latency_test.c: Disable the "-1" test for now.
Issue: #1139
Issue: #1139
src/utils_latency_test.c: Assure that large latency values also work.
The cdtime_t representation of 99s doesn't fit into 32bit anymore, thereby
assuring that cdtime_t is actually 64bit on platforms that currently
don't pass the test, i.e. EPEL {5,6} on i386.
Issue: #1139
The cdtime_t representation of 99s doesn't fit into 32bit anymore, thereby
assuring that cdtime_t is actually 64bit on platforms that currently
don't pass the test, i.e. EPEL {5,6} on i386.
Issue: #1139
src/utils_latency_test.c: Log result of DOUBLE_TO_CDTIME_T() conversion.
The test fails on some i386 architectures. Time for some printf debugging.
The test fails on some i386 architectures. Time for some printf debugging.
src/daemon/utils_time_mock.c: Mark static return value as "ULL".
Build on i386 squeeze fails with:
utils_time_mock.c:31: error: integer constant is too large for 'long' type
Build on i386 squeeze fails with:
utils_time_mock.c:31: error: integer constant is too large for 'long' type
Link libcommon.la with $(COMMON_LIBS).
This hopefully fixes link errors on Solaris:
CCLD test_utils_vl_lookup
Undefined first referenced
symbol in file
kstat_data_lookup daemon/.libs/libcommon.a(common.o)
kstat_lookup daemon/.libs/libcommon.a(common.o)
kstat_read daemon/.libs/libcommon.a(common.o)
getaddrinfo daemon/.libs/libcommon.a(common.o)
freeaddrinfo daemon/.libs/libcommon.a(common.o)
gai_strerror daemon/.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_utils_vl_lookup
collect2: error: ld returned 1 exit status
This hopefully fixes link errors on Solaris:
CCLD test_utils_vl_lookup
Undefined first referenced
symbol in file
kstat_data_lookup daemon/.libs/libcommon.a(common.o)
kstat_lookup daemon/.libs/libcommon.a(common.o)
kstat_read daemon/.libs/libcommon.a(common.o)
getaddrinfo daemon/.libs/libcommon.a(common.o)
freeaddrinfo daemon/.libs/libcommon.a(common.o)
gai_strerror daemon/.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_utils_vl_lookup
collect2: error: ld returned 1 exit status
src/utils_latency.c: Fix format string error.
src/utils_latency.c: Ensure that LLONG_MAX is defined.
EPEL5 doesn't have it in <limits.h> apparently.
EPEL5 doesn't have it in <limits.h> apparently.
plugin_mock.c: Declare "kc".
This hopefully fixes "make check" on Solaris, which currently fails
with:
CC common_test.o
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
This hopefully fixes "make check" on Solaris, which currently fails
with:
CC common_test.o
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
Merge remote-tracking branch 'github/pr/1124'
Merge remote-tracking branch 'github/pr/1130'
src/utils_latency.c: Add unit test.
This test successfully reproduces the crash reported in #1131 by calling
latency_counter_add (l, DOUBLE_TO_CDTIME_T (-1.0));
This test successfully reproduces the crash reported in #1131 by calling
latency_counter_add (l, DOUBLE_TO_CDTIME_T (-1.0));
Merge branch 'collectd-5.5'
src/utils_latency.c: Store "bin_width" as cdtime_t.
This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.
Issue: #1131
This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.
Issue: #1131
src/utils_latency.c: Fix change_bin_width().
A missing cast when calculating "width_change_ratio" caused all metrics to
be moved to bucket #0.
A missing cast when calculating "width_change_ratio" caused all metrics to
be moved to bucket #0.
Added option to choose redis database to use
Testing: Return failure from OK1() and other fixes.
* The tests for common and meta_data logged "not ok" but didn't signal
failure because OK1() didn't include a return(-1) line. Adding this line
caused some restructuring of the utils_vl_lookup test, because it used
that macro in non-int functions.
* Fix DBLEQ() to work correctly with an expected NaN. Previously, the
if condition would fall through to the "expect != actual" part, which
is true for "NaN != NaN".
* Let the mock cdtime() return a non-zero value, as the (invalid) zero
value is used in parse_values() to detect whether the time has been
parsed already. This lead to the "N:..." tests failing.
* Correct the expected behavior of meta_data_add_*() when keys already
exist: they're replaced rather than causing an error.
* The tests for common and meta_data logged "not ok" but didn't signal
failure because OK1() didn't include a return(-1) line. Adding this line
caused some restructuring of the utils_vl_lookup test, because it used
that macro in non-int functions.
* Fix DBLEQ() to work correctly with an expected NaN. Previously, the
if condition would fall through to the "expect != actual" part, which
is true for "NaN != NaN".
* Let the mock cdtime() return a non-zero value, as the (invalid) zero
value is used in parse_values() to detect whether the time has been
parsed already. This lead to the "N:..." tests failing.
* Correct the expected behavior of meta_data_add_*() when keys already
exist: they're replaced rather than causing an error.
varnish: fix leak on read
Since VSM_Close doesn't free the object we leak a few bytes
every interval
Since VSM_Close doesn't free the object we leak a few bytes
every interval
varnish: fix some leaks in error paths
fix leak on exit
plugin.c: plug leak on error
memcached: plug leak
gmond: plug a small leak on exit
src/daemon/meta_data.[ch]: Add unit test.
src/Makefile.am: Remove BUILD_WITH_LIBMOSQUITTO_CFLAGS.
This substitution is undefined.
This substitution is undefined.
Merge branch 'pr/36' into mqtt
mqtt plugin: properly set CPPFLAGS in Makefile
This fixes the build when the --with-libmosquitto option is used.
This fixes the build when the --with-libmosquitto option is used.
collectd.conf.pod: correct a tiny typo
mqtt plugin: Add support for libmosquitto, major version >0.
network plugin: Fix function name in error output.
daemon: Fix -Wunused-parameter warnings.
oconfig: Fix -Wshadow and -Wsign-compare warnings.
Also re-indent oconfig_clone().
Also re-indent oconfig_clone().
Fix -Wshorten-64-to-32 warnings.
Fix -Wsign-conversion warnings.
daemon: Clean up the Upstart and Systemd notification code.
Document the use of "Linux abstract namespace sockets" and use sendto(2)
instead of sendmsg(2) to avoid having to initialize struct msghdr
and struct iovec. Removes the non-portable bzero() calls.
Document the use of "Linux abstract namespace sockets" and use sendto(2)
instead of sendmsg(2) to avoid having to initialize struct msghdr
and struct iovec. Removes the non-portable bzero() calls.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
build: add libavltree, libcommon & libheap dependencies
Otherwise it can break on very parallel builds since collectd link time
arrives before one or more of these were built.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Otherwise it can break on very parallel builds since collectd link time
arrives before one or more of these were built.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>