summaryrefslogtreecommitdiffstats
path: root/health/health_json.c
diff options
context:
space:
mode:
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 8cabaa0b..ba18bddb 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);