summaryrefslogtreecommitdiffstats
path: root/database/rrdvar.c
diff options
context:
space:
mode:
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");
}