summaryrefslogtreecommitdiffstats
path: root/daemon/analytics.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:17 +0000
commit7877a98bd9c00db5e81dd2f8c734cba2bab20be7 (patch)
treed18b767250f7c7ced9b8abe2ece784ac1fe24d3e /daemon/analytics.c
parentReleasing debian version 1.35.1-2. (diff)
downloadnetdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.tar.xz
netdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.zip
Merging upstream version 1.36.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/analytics.c')
-rw-r--r--daemon/analytics.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/daemon/analytics.c b/daemon/analytics.c
index 6c02561d0..370818b8a 100644
--- a/daemon/analytics.c
+++ b/daemon/analytics.c
@@ -7,7 +7,7 @@ struct analytics_data analytics_data;
extern void analytics_exporting_connectors (BUFFER *b);
extern void analytics_exporting_connectors_ssl (BUFFER *b);
extern void analytics_build_info (BUFFER *b);
-extern int aclk_connected, aclk_use_new_cloud_arch;
+extern int aclk_connected;
struct collector {
char *plugin;
@@ -382,7 +382,7 @@ void analytics_https(void)
BUFFER *b = buffer_create(30);
#ifdef ENABLE_HTTPS
analytics_exporting_connectors_ssl(b);
- buffer_strcat(b, netdata_client_ctx && localhost->ssl.flags == NETDATA_SSL_HANDSHAKE_COMPLETE && localhost->rrdpush_sender_connected == 1 ? "streaming|" : "|");
+ buffer_strcat(b, netdata_client_ctx && localhost->ssl.flags == NETDATA_SSL_HANDSHAKE_COMPLETE && __atomic_load_n(&localhost->rrdpush_sender_connected, __ATOMIC_SEQ_CST) ? "streaming|" : "|");
buffer_strcat(b, netdata_srv_ctx ? "web" : "");
#else
buffer_strcat(b, "||");
@@ -499,12 +499,7 @@ void analytics_aclk(void)
#ifdef ENABLE_ACLK
if (aclk_connected) {
analytics_set_data(&analytics_data.netdata_host_aclk_available, "true");
-#ifdef ENABLE_NEW_CLOUD_PROTOCOL
- if (aclk_use_new_cloud_arch)
- analytics_set_data_str(&analytics_data.netdata_host_aclk_protocol, "New");
- else
-#endif
- analytics_set_data_str(&analytics_data.netdata_host_aclk_protocol, "Legacy");
+ analytics_set_data_str(&analytics_data.netdata_host_aclk_protocol, "New");
}
else
#endif
@@ -546,7 +541,7 @@ void analytics_gather_mutable_meta_data(void)
analytics_set_data(
&analytics_data.netdata_config_is_parent, (localhost->next || configured_as_parent()) ? "true" : "false");
- char *claim_id = is_agent_claimed();
+ char *claim_id = get_agent_claimid();
analytics_set_data(&analytics_data.netdata_host_agent_claimed, claim_id ? "true" : "false");
freez(claim_id);
@@ -847,6 +842,20 @@ void set_global_environment()
setenv("HOME", verify_required_directory(netdata_configured_home_dir), 1);
setenv("NETDATA_HOST_PREFIX", netdata_configured_host_prefix, 1);
+ {
+ BUFFER *user_plugins_dirs = buffer_create(FILENAME_MAX);
+
+ for (size_t i = 1; i < PLUGINSD_MAX_DIRECTORIES && plugin_directories[i]; i++) {
+ if (i > 1)
+ buffer_strcat(user_plugins_dirs, " ");
+ buffer_strcat(user_plugins_dirs, plugin_directories[i]);
+ }
+
+ setenv("NETDATA_USER_PLUGINS_DIRS", buffer_tostring(user_plugins_dirs), 1);
+
+ buffer_free(user_plugins_dirs);
+ }
+
analytics_data.data_length = 0;
analytics_set_data(&analytics_data.netdata_config_stream_enabled, "null");
analytics_set_data(&analytics_data.netdata_config_memory_mode, "null");