summaryrefslogtreecommitdiffstats
path: root/web/api/web_api_v1.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/web_api_v1.c')
-rw-r--r--web/api/web_api_v1.c77
1 files changed, 75 insertions, 2 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index 1d8217bbd..96fcf485a 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -750,6 +750,7 @@ inline int web_client_api_request_v1_registry(RRDHOST *host, struct web_client *
if(unlikely(action == 'H')) {
// HELLO request, dashboard ACL
+ analytics_log_dashboard();
if(unlikely(!web_client_can_access_dashboard(w)))
return web_client_permission_denied(w);
}
@@ -995,10 +996,82 @@ inline int web_client_api_request_v1_info_fill_buffer(RRDHOST *host, BUFFER *wb)
}
#ifdef ENABLE_ACLK
if (aclk_connected)
- buffer_strcat(wb, "\t\"aclk-available\": true\n");
+ buffer_strcat(wb, "\t\"aclk-available\": true,\n");
else
#endif
- buffer_strcat(wb, "\t\"aclk-available\": false\n"); // Intentionally valid with/without #ifdef above
+ buffer_strcat(wb, "\t\"aclk-available\": false,\n"); // Intentionally valid with/without #ifdef above
+
+ buffer_strcat(wb, "\t\"memory-mode\": ");
+ analytics_get_data(analytics_data.netdata_config_memory_mode, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"multidb-disk-quota\": ");
+ analytics_get_data(analytics_data.netdata_config_multidb_disk_quota, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"page-cache-size\": ");
+ analytics_get_data(analytics_data.netdata_config_page_cache_size, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"stream-enabled\": ");
+ analytics_get_data(analytics_data.netdata_config_stream_enabled, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"hosts-available\": ");
+ analytics_get_data(analytics_data.netdata_config_hosts_available, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"https-enabled\": ");
+ analytics_get_data(analytics_data.netdata_config_https_enabled, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"buildinfo\": ");
+ analytics_get_data(analytics_data.netdata_buildinfo, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"release-channel\": ");
+ analytics_get_data(analytics_data.netdata_config_release_channel, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"web-enabled\": ");
+ analytics_get_data(analytics_data.netdata_config_web_enabled, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"notification-methods\": ");
+ analytics_get_data(analytics_data.netdata_notification_methods, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"exporting-enabled\": ");
+ analytics_get_data(analytics_data.netdata_config_exporting_enabled, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"exporting-connectors\": ");
+ analytics_get_data(analytics_data.netdata_exporting_connectors, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"allmetrics-prometheus-used\": ");
+ analytics_get_data(analytics_data.netdata_allmetrics_prometheus_used, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"allmetrics-shell-used\": ");
+ analytics_get_data(analytics_data.netdata_allmetrics_shell_used, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"allmetrics-json-used\": ");
+ analytics_get_data(analytics_data.netdata_allmetrics_json_used, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"dashboard-used\": ");
+ analytics_get_data(analytics_data.netdata_dashboard_used, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"charts-count\": ");
+ analytics_get_data(analytics_data.netdata_charts_count, wb);
+ buffer_strcat(wb, ",\n");
+
+ buffer_strcat(wb, "\t\"metrics-count\": ");
+ analytics_get_data(analytics_data.netdata_metrics_count, wb);
+ buffer_strcat(wb, "\n");
buffer_strcat(wb, "}");
return 0;