From 412fb90f5888df13fdeafb5705b9ea6eef1a4df1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 15 Feb 2022 04:25:26 +0100 Subject: Merging upstream version 1.33.1. Signed-off-by: Daniel Baumann --- aclk/README.md | 32 +------------------------------- aclk/aclk.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 31 deletions(-) (limited to 'aclk') diff --git a/aclk/README.md b/aclk/README.md index 414cca41b..870314be4 100644 --- a/aclk/README.md +++ b/aclk/README.md @@ -50,39 +50,10 @@ You can configure following keys in the `netdata.conf` section `[cloud]`: [cloud] statistics = yes query thread count = 2 - aclk implementation = ng ``` - `statistics` enables/disables ACLK related statistics and their charts. You can disable this to save some space in the database and slightly reduce memory usage of Netdata Agent. - `query thread count` specifies the number of threads to process cloud queries. Increasing this setting is useful for nodes with many children (streaming), which can expect to handle more queries (and/or more complicated queries). -- `aclk implementation` - see [ACLK implementation](#aclk-implementation) section - -## ACLK implementation - -Currently we are in process of switching ACLK to brand new technical stack called ACLK-NG. To choose your implementation, change the `aclk implementation` setting in your `netdata.conf` (accepted values `ng` or `legacy`). - -Before changing this value, check the desired implementation is available (determined at build time) by running `netdata -W buildinfo`. Following lines indicate which ACLK implementations are available: - -``` -Features: - ACLK Next Generation: YES - ACLK Legacy: YES -``` - -To verify which ACLK implementation Netdata uses, visit the `/api/v1/info` endpoint on your local dashboard and check the `aclk-implementation` key. - -New Netdata Cloud features will be implemented on top of ACLK-NG only. ACLK Legacy is therefore kept as a fallback in case some users have issues. - - -> Note: ACLK Legacy will be removed in following releases! -> Update your ACLK configuration to ACLK-NG to prevent any disruptions. - - -### Improvements of ACLK-NG over Legacy are: -- No dependency on custom patched `libmosquitto` (no bundling of libraries). Which should remove obstacles many GNU/Linux distribution package maintainers had trying to provide Netdata with Cloud support -- No dependency on libwebsockets -- Lower latency and higher throughput -- More up to date, new features for Netdata Cloud are currently developed on top of ACLK-NG first ## Disable the ACLK @@ -91,8 +62,7 @@ You have two options if you prefer to disable the ACLK and not use Netdata Cloud ### Disable at installation You can pass the `--disable-cloud` parameter to the Agent installation when using a kickstart script -([kickstart.sh](/packaging/installer/methods/kickstart.md) or -[kickstart-static64.sh](/packaging/installer/methods/kickstart-64.md)), or a [manual installation from +([kickstart.sh](/packaging/installer/methods/kickstart.md), or a [manual installation from Git](/packaging/installer/methods/manual.md). When you pass this parameter, the installer does not download or compile any extra libraries. Once running, the Agent diff --git a/aclk/aclk.c b/aclk/aclk.c index 936f431b6..c25b7df68 100644 --- a/aclk/aclk.c +++ b/aclk/aclk.c @@ -321,7 +321,11 @@ static int handle_connection(mqtt_wss_client client) } if (disconnect_req || aclk_kill_link) { + info("Going to restart connection due to disconnect_req=%s (cloud req), aclk_kill_link=%s (reclaim)", + disconnect_req ? "true" : "false", + aclk_kill_link ? "true" : "false"); disconnect_req = 0; + aclk_kill_link = 0; aclk_graceful_disconnect(client); aclk_queue_unlock(); aclk_shared_state.mqtt_shutdown_msg_id = -1; @@ -815,6 +819,16 @@ void *aclk_main(void *ptr) if (aclk_attempt_to_connect(mqttwss_client)) goto exit_full; +#if defined(ENABLE_ACLK) && !defined(ENABLE_NEW_CLOUD_PROTOCOL) + error_report("############################ WARNING ###############################"); + error_report("# Your agent is configured to connect to cloud but has #"); + error_report("# no protobuf protocol support (uses legacy JSON protocol) #"); + error_report("# Legacy protocol will be deprecated soon (planned 1st March 2022) #"); + error_report("# Visit following link for more info and instructions how to solve #"); + error_report("# https://www.netdata.cloud/blog/netdata-clouds-new-architecture #"); + error_report("######################################################################"); +#endif + // warning this assumes the popcorning is relative short (3s) // if that changes call mqtt_wss_service from within // to keep OpenSSL, WSS and MQTT connection alive -- cgit v1.2.3