|
@@ -6,7 +6,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;
|
|
|
+extern int aclk_connected, aclk_use_new_cloud_arch;
|
|
|
|
|
|
struct collector {
|
|
|
char *plugin;
|
|
@@ -52,6 +52,7 @@ void analytics_log_data(void)
|
|
|
debug(D_ANALYTICS, "NETDATA_CONFIG_HOSTS_AVAILABLE : [%s]", analytics_data.netdata_config_hosts_available);
|
|
|
debug(D_ANALYTICS, "NETDATA_HOST_CLOUD_AVAILABLE : [%s]", analytics_data.netdata_host_cloud_available);
|
|
|
debug(D_ANALYTICS, "NETDATA_HOST_ACLK_AVAILABLE : [%s]", analytics_data.netdata_host_aclk_available);
|
|
|
+ debug(D_ANALYTICS, "NETDATA_HOST_ACLK_PROTOCOL : [%s]", analytics_data.netdata_host_aclk_protocol);
|
|
|
debug(D_ANALYTICS, "NETDATA_HOST_ACLK_IMPLEMENTATION : [%s]", analytics_data.netdata_host_aclk_implementation);
|
|
|
debug(D_ANALYTICS, "NETDATA_HOST_AGENT_CLAIMED : [%s]", analytics_data.netdata_host_agent_claimed);
|
|
|
debug(D_ANALYTICS, "NETDATA_HOST_CLOUD_ENABLED : [%s]", analytics_data.netdata_host_cloud_enabled);
|
|
@@ -97,6 +98,7 @@ void analytics_free_data(void)
|
|
|
freez(analytics_data.netdata_config_hosts_available);
|
|
|
freez(analytics_data.netdata_host_cloud_available);
|
|
|
freez(analytics_data.netdata_host_aclk_available);
|
|
|
+ freez(analytics_data.netdata_host_aclk_protocol);
|
|
|
freez(analytics_data.netdata_host_aclk_implementation);
|
|
|
freez(analytics_data.netdata_host_agent_claimed);
|
|
|
freez(analytics_data.netdata_host_cloud_enabled);
|
|
@@ -488,7 +490,7 @@ void analytics_alarms(void)
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
- * Misc attributes to get (run from meta)
|
|
|
+ * Misc attributes to get (run from start)
|
|
|
*/
|
|
|
void analytics_misc(void)
|
|
|
{
|
|
@@ -500,13 +502,6 @@ void analytics_misc(void)
|
|
|
analytics_set_data_str(&analytics_data.netdata_host_aclk_implementation, "");
|
|
|
#endif
|
|
|
|
|
|
-#ifdef ENABLE_ACLK
|
|
|
- if (aclk_connected)
|
|
|
- analytics_set_data(&analytics_data.netdata_host_aclk_available, "true");
|
|
|
- else
|
|
|
-#endif
|
|
|
- analytics_set_data(&analytics_data.netdata_host_aclk_available, "false");
|
|
|
-
|
|
|
analytics_set_data(&analytics_data.netdata_config_exporting_enabled, appconfig_get_boolean(&exporting_config, CONFIG_SECTION_EXPORTING, "enabled", CONFIG_BOOLEAN_NO) ? "true" : "false");
|
|
|
|
|
|
analytics_set_data(&analytics_data.netdata_config_is_private_registry, "false");
|
|
@@ -523,6 +518,23 @@ void analytics_misc(void)
|
|
|
analytics_set_data(&analytics_data.netdata_config_is_private_registry, "true");
|
|
|
}
|
|
|
|
|
|
+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");
|
|
|
+ }
|
|
|
+ else
|
|
|
+#endif
|
|
|
+ analytics_set_data(&analytics_data.netdata_host_aclk_available, "false");
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Get the meta data, called from the thread once after the original delay
|
|
|
* These are values that won't change during agent runtime, and therefore
|
|
@@ -548,6 +560,7 @@ void analytics_gather_mutable_meta_data(void)
|
|
|
analytics_alarms();
|
|
|
analytics_charts();
|
|
|
analytics_metrics();
|
|
|
+ analytics_aclk();
|
|
|
|
|
|
rrdhost_unlock(localhost);
|
|
|
|
|
@@ -889,6 +902,7 @@ void set_global_environment()
|
|
|
analytics_set_data(&analytics_data.netdata_host_cloud_available, "null");
|
|
|
analytics_set_data(&analytics_data.netdata_host_aclk_implementation, "null");
|
|
|
analytics_set_data(&analytics_data.netdata_host_aclk_available, "null");
|
|
|
+ analytics_set_data(&analytics_data.netdata_host_aclk_protocol, "null");
|
|
|
analytics_set_data(&analytics_data.netdata_host_agent_claimed, "null");
|
|
|
analytics_set_data(&analytics_data.netdata_host_cloud_enabled, "null");
|
|
|
analytics_set_data(&analytics_data.netdata_config_https_available, "null");
|
|
@@ -976,7 +990,7 @@ void send_statistics(const char *action, const char *action_result, const char *
|
|
|
|
|
|
sprintf(
|
|
|
command_to_run,
|
|
|
- "%s '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' ",
|
|
|
+ "%s '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' '%s' ",
|
|
|
as_script,
|
|
|
action,
|
|
|
action_result,
|
|
@@ -1010,6 +1024,7 @@ void send_statistics(const char *action, const char *action_result, const char *
|
|
|
analytics_data.netdata_config_hosts_available,
|
|
|
analytics_data.netdata_host_cloud_available,
|
|
|
analytics_data.netdata_host_aclk_available,
|
|
|
+ analytics_data.netdata_host_aclk_protocol,
|
|
|
analytics_data.netdata_host_aclk_implementation,
|
|
|
analytics_data.netdata_host_agent_claimed,
|
|
|
analytics_data.netdata_host_cloud_enabled,
|