collectd.git
8 years agoMerge pull request #1153 from mbethke/fix-unixsock
Pierre-Yves Ritschard [Wed, 5 Aug 2015 09:08:22 +0000 (11:08 +0200)]
Merge pull request #1153 from mbethke/fix-unixsock

Fix Unixsock.pm

8 years agoMerge pull request #1178 from rubenk/fix-libmodbus-compilation-on-freebsd
Pierre-Yves Ritschard [Wed, 5 Aug 2015 09:07:27 +0000 (11:07 +0200)]
Merge pull request #1178 from rubenk/fix-libmodbus-compilation-on-freebsd

core: include <sys/socket.h> in collectd.h

8 years agoMerge pull request #1196 from rubenk/travis
Pierre-Yves Ritschard [Tue, 4 Aug 2015 10:39:45 +0000 (12:39 +0200)]
Merge pull request #1196 from rubenk/travis

Travis

8 years agoTravis: add some whitelisted packages
Ruben Kerkhof [Tue, 4 Aug 2015 08:33:39 +0000 (10:33 +0200)]
Travis: add some whitelisted packages

The list is at https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise

8 years agoTravis: test with both gcc and clang
Ruben Kerkhof [Tue, 4 Aug 2015 08:20:50 +0000 (10:20 +0200)]
Travis: test with both gcc and clang

Travis does this in parallel so the build doesn't become
twice as long.

8 years agoTravis: run make distcheck
Ruben Kerkhof [Tue, 4 Aug 2015 08:18:36 +0000 (10:18 +0200)]
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.

8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Mon, 3 Aug 2015 21:29:16 +0000 (23:29 +0200)]
Merge branch 'collectd-5.5'

8 years agosystemd.collectd.service: take debian/ubuntu's env file in account too
Marc Fournier [Mon, 3 Aug 2015 21:28:39 +0000 (23:28 +0200)]
systemd.collectd.service: take debian/ubuntu's env file in account too

8 years agoMerge remote-tracking branch 'origin/pr/1191'
Marc Fournier [Mon, 3 Aug 2015 21:27:10 +0000 (23:27 +0200)]
Merge remote-tracking branch 'origin/pr/1191'

8 years agoMerge remote-tracking branch 'origin/pr/1181'
Marc Fournier [Mon, 3 Aug 2015 21:26:55 +0000 (23:26 +0200)]
Merge remote-tracking branch 'origin/pr/1181'

8 years agoMerge remote-tracking branch 'origin/pr/1175'
Marc Fournier [Mon, 3 Aug 2015 21:26:21 +0000 (23:26 +0200)]
Merge remote-tracking branch 'origin/pr/1175'

8 years agoMerge remote-tracking branch 'origin/pr/1164'
Marc Fournier [Mon, 3 Aug 2015 21:26:05 +0000 (23:26 +0200)]
Merge remote-tracking branch 'origin/pr/1164'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Mon, 3 Aug 2015 21:23:37 +0000 (23:23 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agologstash: initialize conf struct to 0
Vincent Bernat [Mon, 3 Aug 2015 08:06:30 +0000 (10:06 +0200)]
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.

8 years agoFix libmodbus detection on FreeBSD
Ruben Kerkhof [Sat, 1 Aug 2015 09:46:45 +0000 (11:46 +0200)]
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.

8 years agoamqp: look for librabbitmq in /usr/local as well
Ruben Kerkhof [Sat, 1 Aug 2015 11:01:30 +0000 (13:01 +0200)]
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 ;)

8 years agoFix varnish detection on FreeBSD
Ruben Kerkhof [Sat, 1 Aug 2015 11:22:07 +0000 (13:22 +0200)]
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.

8 years agoirq: skip FIQ line in /proc/interrupts
Ruben Kerkhof [Sun, 2 Aug 2015 18:54:51 +0000 (20:54 +0200)]
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

8 years agoconfigure.ac: remove some redundant x'es
Ruben Kerkhof [Sat, 1 Aug 2015 18:18:51 +0000 (20:18 +0200)]
configure.ac: remove some redundant x'es

8 years agoconfigure.ac: fix indentation
Ruben Kerkhof [Sat, 1 Aug 2015 18:21:41 +0000 (20:21 +0200)]
configure.ac: fix indentation

8 years agoFix a memory leak on shutdown
Ruben Kerkhof [Sat, 25 Jul 2015 10:32:06 +0000 (12:32 +0200)]
Fix a memory leak on shutdown

8 years agoUse environmental variables from /etc/sysconfig/collectd
Fabien Wernli [Mon, 3 Aug 2015 08:15:56 +0000 (10:15 +0200)]
Use environmental variables from /etc/sysconfig/collectd

Change-Id: I948ce3d7a3071cc1ac26a24b059a5ee4aacba0d9

8 years agotravis: make check as well
Pierre-Yves Ritschard [Sun, 2 Aug 2015 08:40:07 +0000 (10:40 +0200)]
travis: make check as well

8 years agoAdd more test stuff to .gitignore
Ruben Kerkhof [Sat, 1 Aug 2015 11:13:40 +0000 (13:13 +0200)]
Add more test stuff to .gitignore

8 years agocore: include <sys/socket.h> in collectd.h
Ruben Kerkhof [Sat, 1 Aug 2015 10:19:58 +0000 (12:19 +0200)]
core: include <sys/socket.h> in collectd.h

Fixes #1127

8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Sat, 1 Aug 2015 07:34:28 +0000 (09:34 +0200)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Sat, 1 Aug 2015 07:30:22 +0000 (09:30 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agoAdd utils_parse_option.c/h to amqp plugin source files list
Shahul Hameed [Mon, 20 Jul 2015 17:06:23 +0000 (13:06 -0400)]
Add utils_parse_option.c/h to amqp plugin source files list

8 years agocollectd -T: fix memory leak
Ruben Kerkhof [Sat, 25 Jul 2015 09:57:12 +0000 (11:57 +0200)]
collectd -T: fix memory leak

8 years agoFix some small leaks on error paths
Ruben Kerkhof [Sat, 25 Jul 2015 17:17:07 +0000 (19:17 +0200)]
Fix some small leaks on error paths

8 years agoliboconfig: really fix lex warnings
Ruben Kerkhof [Sat, 25 Jul 2015 19:29:50 +0000 (21:29 +0200)]
liboconfig: really fix lex warnings

Flex has two options to disable input and unput.
Turn them on.

8 years agoAdd remark about length of HostnameFormat string in virt plugin
Wojtek Bocer [Mon, 27 Jul 2015 08:16:46 +0000 (09:16 +0100)]
Add remark about length of HostnameFormat string in virt plugin

8 years agoMerge remote-tracking branch 'origin/pr/1168'
Marc Fournier [Sat, 1 Aug 2015 07:09:03 +0000 (09:09 +0200)]
Merge remote-tracking branch 'origin/pr/1168'

8 years agoUse standard ints in write_kafka plugin for portability
Shahul Hameed [Wed, 29 Jul 2015 15:06:50 +0000 (11:06 -0400)]
Use standard ints in write_kafka plugin for portability

8 years agotravis: move to new infra
Pierre-Yves Ritschard [Fri, 31 Jul 2015 15:02:03 +0000 (17:02 +0200)]
travis: move to new infra

8 years agotravis: update script
Pierre-Yves Ritschard [Fri, 31 Jul 2015 15:01:19 +0000 (17:01 +0200)]
travis: update script

8 years agotravis: enable ci
Pierre-Yves Ritschard [Fri, 31 Jul 2015 14:59:11 +0000 (16:59 +0200)]
travis: enable ci

8 years agosrc/utils_latency.c: Fix format string error.
Florian Forster [Tue, 14 Jul 2015 06:42:15 +0000 (08:42 +0200)]
src/utils_latency.c: Fix format string error.

8 years agosrc/utils_latency.c: Ensure that LLONG_MAX is defined.
Florian Forster [Tue, 14 Jul 2015 06:34:52 +0000 (08:34 +0200)]
src/utils_latency.c: Ensure that LLONG_MAX is defined.

EPEL5 doesn't have it in <limits.h> apparently.

8 years agoRPM specfile: take mqtt plugin in account
Marc Fournier [Wed, 29 Jul 2015 09:29:42 +0000 (11:29 +0200)]
RPM specfile: take mqtt plugin in account

8 years agowrite_redis: fix a few typos in manpage
Ruben Kerkhof [Tue, 28 Jul 2015 09:59:35 +0000 (11:59 +0200)]
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.

8 years agowrite_graphite: set service at config time
Ruben Kerkhof [Fri, 24 Jul 2015 20:57:19 +0000 (22:57 +0200)]
write_graphite: set service at config time

8 years agowrite_graphite: set service at config time
Ruben Kerkhof [Fri, 24 Jul 2015 20:40:11 +0000 (22:40 +0200)]
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)

8 years agowrite_graphite: set default node at config time
Ruben Kerkhof [Fri, 24 Jul 2015 20:37:36 +0000 (22:37 +0200)]
write_graphite: set default node at config time

8 years agowrite_graphite: remove #ifndefs
Ruben Kerkhof [Fri, 24 Jul 2015 20:02:24 +0000 (22:02 +0200)]
write_graphite: remove #ifndefs

If these are defined somewhere else to a different value,
we'd like to know about it.

8 years agomake _escape_argument() readonly-safe on older Perls
Matthias Bethke [Tue, 21 Jul 2015 08:02:16 +0000 (15:02 +0700)]
make _escape_argument() readonly-safe on older Perls

8 years agofix evil autoderef
Matthias Bethke [Tue, 21 Jul 2015 08:00:49 +0000 (15:00 +0700)]
fix evil autoderef

8 years agosrc/utils_latency_test.c: Disable the "-1" test for now.
Florian Forster [Thu, 16 Jul 2015 07:17:55 +0000 (09:17 +0200)]
src/utils_latency_test.c: Disable the "-1" test for now.

Issue: #1139

8 years agosrc/utils_latency_test.c: Assure that large latency values also work.
Florian Forster [Wed, 15 Jul 2015 08:30:25 +0000 (10:30 +0200)]
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

8 years agosrc/utils_latency_test.c: Log result of DOUBLE_TO_CDTIME_T() conversion.
Florian Forster [Wed, 15 Jul 2015 07:57:41 +0000 (09:57 +0200)]
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.

8 years agosrc/daemon/utils_time_mock.c: Mark static return value as "ULL".
Florian Forster [Tue, 14 Jul 2015 07:15:51 +0000 (09:15 +0200)]
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

8 years agoLink libcommon.la with $(COMMON_LIBS).
Florian Forster [Tue, 14 Jul 2015 07:00:49 +0000 (09:00 +0200)]
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

8 years agosrc/utils_latency.c: Fix format string error.
Florian Forster [Tue, 14 Jul 2015 06:42:15 +0000 (08:42 +0200)]
src/utils_latency.c: Fix format string error.

8 years agosrc/utils_latency.c: Ensure that LLONG_MAX is defined.
Florian Forster [Tue, 14 Jul 2015 06:34:52 +0000 (08:34 +0200)]
src/utils_latency.c: Ensure that LLONG_MAX is defined.

EPEL5 doesn't have it in <limits.h> apparently.

8 years agoplugin_mock.c: Declare "kc".
Florian Forster [Tue, 14 Jul 2015 06:22:18 +0000 (08:22 +0200)]
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

8 years agoMerge remote-tracking branch 'github/pr/1124'
Florian Forster [Tue, 14 Jul 2015 06:19:38 +0000 (08:19 +0200)]
Merge remote-tracking branch 'github/pr/1124'

8 years agoMerge remote-tracking branch 'github/pr/1130'
Florian Forster [Mon, 13 Jul 2015 10:20:54 +0000 (12:20 +0200)]
Merge remote-tracking branch 'github/pr/1130'

8 years agosrc/utils_latency.c: Add unit test.
Florian Forster [Mon, 13 Jul 2015 09:30:16 +0000 (11:30 +0200)]
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));

8 years agoMerge branch 'collectd-5.5'
Florian Forster [Mon, 13 Jul 2015 10:09:55 +0000 (12:09 +0200)]
Merge branch 'collectd-5.5'

8 years agosrc/utils_latency.c: Store "bin_width" as cdtime_t.
Florian Forster [Mon, 13 Jul 2015 09:53:58 +0000 (11:53 +0200)]
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

8 years agosrc/utils_latency.c: Fix change_bin_width().
Florian Forster [Sun, 12 Jul 2015 10:58:20 +0000 (12:58 +0200)]
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.

8 years agoAdded option to choose redis database to use
Sebastian Pfahl [Fri, 10 Jul 2015 11:33:11 +0000 (11:33 +0000)]
Added option to choose redis database to use

8 years agoTesting: Return failure from OK1() and other fixes.
Florian Forster [Fri, 10 Jul 2015 11:14:43 +0000 (13:14 +0200)]
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.

8 years agovarnish: fix leak on read
Ruben Kerkhof [Sat, 4 Jul 2015 20:49:49 +0000 (22:49 +0200)]
varnish: fix leak on read

Since VSM_Close doesn't free the object we leak a few bytes
every interval

8 years agoRevert "fix leak on exit"
Florian Forster [Fri, 10 Jul 2015 09:29:45 +0000 (11:29 +0200)]
Revert "fix leak on exit"

This reverts commit 35e6b9d366016300178a55b163ac0173d7be5874.

8 years agovarnish: fix some leaks in error paths
Ruben Kerkhof [Sat, 4 Jul 2015 21:04:30 +0000 (23:04 +0200)]
varnish: fix some leaks in error paths

8 years agofix leak on exit
Ruben Kerkhof [Sat, 4 Jul 2015 18:02:57 +0000 (20:02 +0200)]
fix leak on exit

8 years agoplugin.c: plug leak on error
Ruben Kerkhof [Sat, 4 Jul 2015 17:56:20 +0000 (19:56 +0200)]
plugin.c: plug leak on error

8 years agomemcached: plug leak
Ruben Kerkhof [Sat, 4 Jul 2015 17:54:49 +0000 (19:54 +0200)]
memcached: plug leak

8 years agogmond: plug a small leak on exit
Ruben Kerkhof [Sat, 4 Jul 2015 15:35:03 +0000 (17:35 +0200)]
gmond: plug a small leak on exit

8 years agosrc/daemon/meta_data.[ch]: Add unit test.
Florian Forster [Fri, 10 Jul 2015 08:56:58 +0000 (10:56 +0200)]
src/daemon/meta_data.[ch]: Add unit test.

8 years agosrc/Makefile.am: Remove BUILD_WITH_LIBMOSQUITTO_CFLAGS.
Florian Forster [Thu, 9 Jul 2015 07:37:41 +0000 (09:37 +0200)]
src/Makefile.am: Remove BUILD_WITH_LIBMOSQUITTO_CFLAGS.

This substitution is undefined.

8 years agoMerge branch 'pr/36' into mqtt
Florian Forster [Thu, 9 Jul 2015 07:35:08 +0000 (09:35 +0200)]
Merge branch 'pr/36' into mqtt

8 years agomqtt plugin: properly set CPPFLAGS in Makefile
Marc Fournier [Wed, 8 Jul 2015 22:24:21 +0000 (00:24 +0200)]
mqtt plugin: properly set CPPFLAGS in Makefile

This fixes the build when the --with-libmosquitto option is used.

8 years agocollectd.conf.pod: correct a tiny typo
Marc Fournier [Wed, 8 Jul 2015 22:07:36 +0000 (00:07 +0200)]
collectd.conf.pod: correct a tiny typo

8 years agomqtt plugin: Add support for libmosquitto, major version >0.
Florian Forster [Wed, 8 Jul 2015 11:09:26 +0000 (13:09 +0200)]
mqtt plugin: Add support for libmosquitto, major version >0.

8 years agonetwork plugin: Fix function name in error output.
Florian Forster [Wed, 8 Jul 2015 10:41:04 +0000 (12:41 +0200)]
network plugin: Fix function name in error output.

8 years agodaemon: Fix -Wunused-parameter warnings.
Florian Forster [Wed, 8 Jul 2015 10:40:48 +0000 (12:40 +0200)]
daemon: Fix -Wunused-parameter warnings.

8 years agooconfig: Fix -Wshadow and -Wsign-compare warnings.
Florian Forster [Wed, 8 Jul 2015 10:39:56 +0000 (12:39 +0200)]
oconfig: Fix -Wshadow and -Wsign-compare warnings.

Also re-indent oconfig_clone().

8 years agoFix -Wshorten-64-to-32 warnings.
Florian Forster [Wed, 8 Jul 2015 10:39:03 +0000 (12:39 +0200)]
Fix -Wshorten-64-to-32 warnings.

8 years agoFix -Wsign-conversion warnings.
Florian Forster [Wed, 8 Jul 2015 10:36:35 +0000 (12:36 +0200)]
Fix -Wsign-conversion warnings.

8 years agodaemon: Clean up the Upstart and Systemd notification code.
Florian Forster [Wed, 8 Jul 2015 09:57:35 +0000 (11:57 +0200)]
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.

8 years agoMerge branch 'collectd-5.5'
Marc Fournier [Tue, 7 Jul 2015 22:35:27 +0000 (00:35 +0200)]
Merge branch 'collectd-5.5'

8 years agoMerge branch 'collectd-5.4' into collectd-5.5
Marc Fournier [Tue, 7 Jul 2015 22:29:58 +0000 (00:29 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5

8 years agobuild: add libavltree, libcommon & libheap dependencies
Gustavo Zacarias [Mon, 6 Jul 2015 12:59:30 +0000 (09:59 -0300)]
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>
8 years agoAdd test-suite logs to .gitignore
Ruben Kerkhof [Sat, 4 Jul 2015 11:25:23 +0000 (13:25 +0200)]
Add test-suite logs to .gitignore

8 years agocollectd.conf: order plugins alphabetically again
Ruben Kerkhof [Sat, 4 Jul 2015 17:52:52 +0000 (19:52 +0200)]
collectd.conf: order plugins alphabetically again

8 years agoFix Perl errors
Ruud van Melick [Tue, 30 Jun 2015 16:08:49 +0000 (16:08 +0000)]
Fix Perl errors

"my" variable $cmd masks earlier declaration in same scope at /tmp/contrib_collectd2html.pl line 223.
syntax error at /tmp/contrib_collectd2html.pl line 219, near "$span qw(1hour 1day 1week 1month)"
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 221.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 224.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 225.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 232.
Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 237.
syntax error at /tmp/contrib_collectd2html.pl line 245, near "}"

8 years agobind: fix zone count check
Michal Humpula [Mon, 6 Jul 2015 11:43:43 +0000 (13:43 +0200)]
bind: fix zone count check

8 years agocollectd.conf(5): Add documentation.
Florian Forster [Fri, 3 Jul 2015 08:46:14 +0000 (10:46 +0200)]
collectd.conf(5): Add documentation.

Also add example config to src/collectd.conf.in

8 years agomqtt plugin: Change some default values.
Florian Forster [Fri, 3 Jul 2015 08:45:37 +0000 (10:45 +0200)]
mqtt plugin: Change some default values.

* qos: 0 for publishers, 2 for subscribers
* store_rates: true
* clean_session: true

8 years agomqtt plugin: Use the "name" argument for the callback name.
Florian Forster [Fri, 3 Jul 2015 08:44:35 +0000 (10:44 +0200)]
mqtt plugin: Use the "name" argument for the callback name.

8 years agomqtt plugin: Increase keepalive interval to 60s.
Florian Forster [Fri, 3 Jul 2015 08:43:38 +0000 (10:43 +0200)]
mqtt plugin: Increase keepalive interval to 60s.

This is the default used by the Mosquitto tools. The new define makes
it possible to easily override this at compile time.

8 years agomqtt plugin: Add myself to list of authors, copyright holders.
Florian Forster [Fri, 3 Jul 2015 08:42:44 +0000 (10:42 +0200)]
mqtt plugin: Add myself to list of authors, copyright holders.

8 years agomqtt plugin: Add proof-of-concept subscriber code.
Florian Forster [Fri, 21 Nov 2014 16:41:17 +0000 (17:41 +0100)]
mqtt plugin: Add proof-of-concept subscriber code.

Publisher and subscriber should now be able to send metrics to one another.

8 years agomqtt plugin: Send only the acutally used part of the payload buffer.
Florian Forster [Fri, 21 Nov 2014 15:03:22 +0000 (16:03 +0100)]
mqtt plugin: Send only the acutally used part of the payload buffer.

8 years agomqtt plugin: Let "client ID" default to the hostname.
Florian Forster [Fri, 21 Nov 2014 12:17:54 +0000 (13:17 +0100)]
mqtt plugin: Let "client ID" default to the hostname.

The MQTT documentation says that this needs to be unique and stable, so
I think the hostname is the best match for this.

8 years agomqtt plugin: Add support for multiple brokers.
Florian Forster [Fri, 21 Nov 2014 11:05:39 +0000 (12:05 +0100)]
mqtt plugin: Add support for multiple brokers.

Also adds support for authentication and configuring a couple of settings
(QoS, rates, retention).

8 years agomqtt plugin: Correctly check the return value of format_topic().
Florian Forster [Fri, 21 Nov 2014 10:23:01 +0000 (11:23 +0100)]
mqtt plugin: Correctly check the return value of format_topic().

8 years agomqtt plugin: Use the thread-safe sstrerror().
Florian Forster [Fri, 21 Nov 2014 09:39:50 +0000 (10:39 +0100)]
mqtt plugin: Use the thread-safe sstrerror().