summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-10-09 21:58:21 +0300
committerGitHub <noreply@github.com>2022-10-09 21:58:21 +0300
commit758d9c405d2d768a3c125052a02c7a1503b01bd8 (patch)
treede24c46008c9c7bf95270ebb8f3b117229c43db9 /web
parent067305602f373d12286e492143bf6cb2a32ffe31 (diff)
full memory tracking and profiling of Netdata Agent (#13789)
* full memory tracking and profiling of Netdata Agent * initialize dbengine only when it is needed * handling of dbengine compiled but not available * restore unittest * restore unittest again * more improvements about ifdef dbengine * fix compilation when dbengine is not enabled * check if dbengine is enabled on exit * call freez() not free() * aral unittest * internal checks activate trace allocations; dev mode activates internal checks
Diffstat (limited to 'web')
-rw-r--r--web/api/web_api_v1.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index ce4f196be9..9b1b10c3ca 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -1621,9 +1621,14 @@ int web_client_api_request_v1_dbengine_stats(RRDHOST *host __maybe_unused, struc
BUFFER *wb = w->response.data;
buffer_flush(wb);
+
+ if(!dbengine_enabled) {
+ buffer_strcat(wb, "dbengine is not enabled");
+ return HTTP_RESP_NOT_FOUND;
+ }
+
wb->contenttype = CT_APPLICATION_JSON;
buffer_no_cacheable(wb);
-
buffer_strcat(wb, "{");
for(int tier = 0; tier < storage_tiers ;tier++) {
buffer_sprintf(wb, "%s\n\t\"tier%d\": {", tier?",":"", tier);