diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
commit | 3c315f0fff93aa072472abc10815963ac0035268 (patch) | |
tree | a95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /daemon/analytics.c | |
parent | Adding upstream version 1.35.1. (diff) | |
download | netdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz netdata-3c315f0fff93aa072472abc10815963ac0035268.zip |
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/analytics.c')
-rw-r--r-- | daemon/analytics.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/daemon/analytics.c b/daemon/analytics.c index 6c02561d..370818b8 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"); |