diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
commit | cd7ed12292aef11d9062b64f61215174e8cc1860 (patch) | |
tree | 9998ab03d153956743d9319cf3a0279b9593ce36 /web/api/formatters/json_wrapper.c | |
parent | Releasing debian version 1.16.1-6. (diff) | |
download | netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.tar.xz netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.zip |
Merging upstream version 1.17.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api/formatters/json_wrapper.c')
-rw-r--r-- | web/api/formatters/json_wrapper.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/web/api/formatters/json_wrapper.c b/web/api/formatters/json_wrapper.c index 4911d2f0e..5ef2caf10 100644 --- a/web/api/formatters/json_wrapper.c +++ b/web/api/formatters/json_wrapper.c @@ -182,11 +182,14 @@ void rrdr_json_wrapper_begin(RRDR *r, BUFFER *wb, uint32_t format, RRDR_OPTIONS rrdr_buffer_print_format(wb, format); - buffer_sprintf(wb, "%s,\n" - " %sresult%s: " - , sq - , kq, kq - ); + if((options & RRDR_OPTION_CUSTOM_VARS) && (options & RRDR_OPTION_JSON_WRAP)) { + buffer_sprintf(wb, "%s,\n %schart_variables%s: ", sq, kq, kq); + health_api_v1_chart_custom_variables2json(r->st, wb); + } + else + buffer_sprintf(wb, "%s", sq); + + buffer_sprintf(wb, ",\n %sresult%s: ", kq, kq); if(string_value) buffer_strcat(wb, sq); //info("JSONWRAPPER(): %s: END", r->st->id); |