summaryrefslogtreecommitdiffstats
path: root/database/rrdvar.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
commita8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch)
tree77f0a30f016c0925cf7ee9292e644bba183c2774 /database/rrdvar.c
parentAdding upstream version 1.19.0. (diff)
downloadnetdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz
netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--database/rrdvar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/database/rrdvar.c b/database/rrdvar.c
index 0858d0bdc..6b824d0d3 100644
--- a/database/rrdvar.c
+++ b/database/rrdvar.c
@@ -291,12 +291,15 @@ void health_api_v1_chart_variables2json(RRDSET *st, BUFFER *buf) {
buffer_sprintf(buf, "{\n\t\"chart\": \"%s\",\n\t\"chart_name\": \"%s\",\n\t\"chart_context\": \"%s\",\n\t\"chart_variables\": {", st->id, st->name, st->context);
avl_traverse_lock(&st->rrdvar_root_index, single_variable2json, (void *)&helper);
+
buffer_sprintf(buf, "\n\t},\n\t\"family\": \"%s\",\n\t\"family_variables\": {", st->family);
helper.counter = 0;
avl_traverse_lock(&st->rrdfamily->rrdvar_root_index, single_variable2json, (void *)&helper);
+
buffer_sprintf(buf, "\n\t},\n\t\"host\": \"%s\",\n\t\"host_variables\": {", host->hostname);
helper.counter = 0;
avl_traverse_lock(&host->rrdvar_root_index, single_variable2json, (void *)&helper);
+
buffer_strcat(buf, "\n\t}\n}\n");
}