summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
authorTimotej Šiškovič <6674623+underhood@users.noreply.github.com>2020-02-14 10:54:26 +0100
committerGitHub <noreply@github.com>2020-02-14 10:54:26 +0100
commitf4e1012f5ffe1231c25e22f7350d2928b443c69f (patch)
tree1df86a02ed77533854e08d3dc78b389e93a225c5 /libnetdata
parentffbfdc44043e5920ee40fc9f2d9b17f8df518cbc (diff)
initial MQTT over Secure Websockets support for ACLK (#7988)
* add aclk_lws_wss_client * shorten the thread name in case more threads are necessary * Draft libmosquitto<->libwebsockets integration * use ringbuffer for recvd data * Some code cleanup * if mqtt connection fails close lws connection and reconect * clear buffers on connection closed * work on better loop integration * move mosquitto read out of loop * remove useless code when using websockets * LWS - make host and port configurable * make default port 9002 as we use MQTT over WSS now * wait for link up before subscribing start query thread after connection has been made * cleanup - remove useless var * if there is anything to write send it immediatelly * cleanup: move buffers into engine instace * allow MQTT IO from multiple threads (although preffered is MQTT IO to be done by single thread) * add warning to future self * add some comments for whoever reviews * add destroy fnc - start work on cleanup * minor - add mosquitto to .gitignore * fix codacy errors * do not reconnect automatically by default * minor - remove outdated comment * tab -> spaces Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> * address thiagoftsm valid comments * add usefull logs in case of trouble * fix -Wall -Wextra -Wformat-signedness warnings * log error when connection fails * update .gitignore to match new installer * Fwd LWS logs to Netdata logs * minor - tabulation fixes * fix comments from thiago * force SSL * move UNUSED to libnetdata.h @thiago correctly pointed out it might be usefull for others * minor - rename function for clarity * minor - remove commented out code Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/libnetdata.h2
-rw-r--r--libnetdata/log/log.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/libnetdata/libnetdata.h b/libnetdata/libnetdata.h
index 27f67eafa1..7b04ca7cef 100644
--- a/libnetdata/libnetdata.h
+++ b/libnetdata/libnetdata.h
@@ -288,6 +288,8 @@ extern void recursive_config_double_dir_load(
#define BITS_IN_A_KILOBIT 1000
+/* misc. */
+#define UNUSED(x) (void)(x)
extern void netdata_cleanup_and_exit(int ret) NORETURN;
extern void send_statistics(const char *action, const char *action_result, const char *action_data);
diff --git a/libnetdata/log/log.h b/libnetdata/log/log.h
index 1522ef9aa8..582ebafe03 100644
--- a/libnetdata/log/log.h
+++ b/libnetdata/log/log.h
@@ -37,6 +37,7 @@
#define D_POLLFD 0x0000000020000000
#define D_STREAM 0x0000000040000000
#define D_RRDENGINE 0x0000000100000000
+#define D_ACLK 0x0000000200000000
#define D_SYSTEM 0x8000000000000000
//#define DEBUG (D_WEB_CLIENT_ACCESS|D_LISTENER|D_RRD_STATS)