summaryrefslogtreecommitdiffstats
path: root/health/health_json.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
commita836a244a3d2bdd4da1ee2641e3e957850668cea (patch)
treecb87c75b3677fab7144f868435243f864048a1e6 /health/health_json.c
parentAdding upstream version 1.38.1. (diff)
downloadnetdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.tar.xz
netdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.zip
Adding upstream version 1.39.0.upstream/1.39.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'health/health_json.c')
-rw-r--r--health/health_json.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/health/health_json.c b/health/health_json.c
index 8cabaa0bf..ba18bddba 100644
--- a/health/health_json.c
+++ b/health/health_json.c
@@ -103,11 +103,11 @@ void health_alarm_entry2json_nolock(BUFFER *wb, ALARM_ENTRY *ae, RRDHOST *host)
}
buffer_strcat(wb, "\t\t\"value\":");
- buffer_rrd_value(wb, ae->new_value);
+ buffer_print_netdata_double(wb, ae->new_value);
buffer_strcat(wb, ",\n");
buffer_strcat(wb, "\t\t\"old_value\":");
- buffer_rrd_value(wb, ae->old_value);
+ buffer_print_netdata_double(wb, ae->old_value);
buffer_strcat(wb, "\n");
buffer_strcat(wb, "\t}");
@@ -152,7 +152,7 @@ static inline void health_rrdcalc_values2json_nolock(RRDHOST *host, BUFFER *wb,
, (unsigned long)rc->id);
buffer_strcat(wb, "\t\t\t\"value\":");
- buffer_rrd_value(wb, rc->value);
+ buffer_print_netdata_double(wb, rc->value);
buffer_strcat(wb, ",\n");
buffer_strcat(wb, "\t\t\t\"last_updated\":");
@@ -257,11 +257,11 @@ static inline void health_rrdcalc2json_nolock(RRDHOST *host, BUFFER *wb, RRDCALC
"\t\t\t\"lookup_after\": %d,\n"
"\t\t\t\"lookup_before\": %d,\n"
"\t\t\t\"lookup_options\": \"",
- (unsigned long) rc->db_after,
- (unsigned long) rc->db_before,
- group_method2string(rc->group),
- rc->after,
- rc->before
+ (unsigned long) rc->db_after,
+ (unsigned long) rc->db_before,
+ time_grouping_method2string(rc->group),
+ rc->after,
+ rc->before
);
buffer_data_options2string(wb, rc->options);
buffer_strcat(wb, "\",\n");
@@ -283,15 +283,15 @@ static inline void health_rrdcalc2json_nolock(RRDHOST *host, BUFFER *wb, RRDCALC
}
buffer_strcat(wb, "\t\t\t\"green\":");
- buffer_rrd_value(wb, rc->green);
+ buffer_print_netdata_double(wb, rc->green);
buffer_strcat(wb, ",\n");
buffer_strcat(wb, "\t\t\t\"red\":");
- buffer_rrd_value(wb, rc->red);
+ buffer_print_netdata_double(wb, rc->red);
buffer_strcat(wb, ",\n");
buffer_strcat(wb, "\t\t\t\"value\":");
- buffer_rrd_value(wb, rc->value);
+ buffer_print_netdata_double(wb, rc->value);
buffer_strcat(wb, "\n");
buffer_strcat(wb, "\t\t}");
@@ -309,7 +309,7 @@ void health_aggregate_alarms(RRDHOST *host, BUFFER *wb, BUFFER* contexts, RRDCAL
if (contexts) {
p = (char*)buffer_tostring(contexts);
- while(p && *p && (tok = mystrsep(&p, ", |"))) {
+ while(p && *p && (tok = strsep_skip_consecutive_separators(&p, ", |"))) {
if(!*tok) continue;
STRING *tok_string = string_strdupz(tok);