From 0fba85e2c20add69546cefbf37bb2033d2d1e052 Mon Sep 17 00:00:00 2001 From: Vladimir Kobal Date: Thu, 9 Jan 2020 12:51:41 +0200 Subject: Send host labels via exporting connectors (#7554) * Add labels to the JSON exporting connector * Add labels to the Graphite exporting connector * Add labels to the OpenTSDB telnet exporting connector * Add labels to the OpenTSDB HTTP exporting connector * Replace control characters in JSON strings * Add unit tests --- web/api/web_api_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/api') diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 072daea2ae..afbf88b4d5 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -780,7 +780,7 @@ inline void host_labels2json(RRDHOST *host, BUFFER *wb, size_t indentation) { buffer_strcat(wb, tabs); char value[CONFIG_MAX_VALUE * 2 + 1]; - escape_json_string(value, label->value, CONFIG_MAX_VALUE * 2); + sanitize_json_string(value, label->value, CONFIG_MAX_VALUE * 2); buffer_sprintf(wb, "\"%s\": \"%s\"", label->key, value); count++; -- cgit v1.2.3