Expose anomaly-bit option to health. (#12835)
vkalintiris committed
May 11, 2022 at 17:31 UTC
d7b33aa2237345e0c3b2c9718bb0bea043665c35
2 files changed
+8
health/health_config.c
+3
@@ -433,6 +433,9 @@ static inline int health_parse_db_lookup(
433
else if(!strcasecmp(key, "unaligned")) {
434
*options |= RRDR_OPTION_NOT_ALIGNED;
435
}
436
+ else if(!strcasecmp(key, "anomaly-bit")) {
437
+ *options |= RRDR_OPTION_ANOMALY_BIT;
438
+ }
439
else if(!strcasecmp(key, "match-ids") || !strcasecmp(key, "match_ids")) {
440
*options |= RRDR_OPTION_MATCH_IDS;
441
}
web/server/web_client.c
+5
@@ -496,6 +496,11 @@ void buffer_data_options2string(BUFFER *wb, uint32_t options) {
496
if(count++) buffer_strcat(wb, " ");
497
buffer_strcat(wb, "unaligned");
498
}
499
+
500
+ if(options & RRDR_OPTION_ANOMALY_BIT) {
501
+ if(count++) buffer_strcat(wb, " ");
502
+ buffer_strcat(wb, "anomaly-bit");
503
+ }
504
}
505
506
static inline int check_host_and_call(RRDHOST *host, struct web_client *w, char *url, int (*func)(RRDHOST *, struct web_client *, char *)) {