diff options
author | vkalintiris <vasilis@netdata.cloud> | 2022-05-11 17:31:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-11 17:31:57 +0300 |
commit | d7b33aa2237345e0c3b2c9718bb0bea043665c35 (patch) | |
tree | c8b4559bbffcb10542ffcdd4a1f40069a2256179 | |
parent | 9adf4dd782b8587ca3daffeb46c6c3ea98fb76d8 (diff) |
Expose anomaly-bit option to health. (#12835)
-rw-r--r-- | health/health_config.c | 3 | ||||
-rw-r--r-- | web/server/web_client.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/health/health_config.c b/health/health_config.c index 539c418cef..df6d7b6095 100644 --- a/health/health_config.c +++ b/health/health_config.c @@ -433,6 +433,9 @@ static inline int health_parse_db_lookup( else if(!strcasecmp(key, "unaligned")) { *options |= RRDR_OPTION_NOT_ALIGNED; } + else if(!strcasecmp(key, "anomaly-bit")) { + *options |= RRDR_OPTION_ANOMALY_BIT; + } else if(!strcasecmp(key, "match-ids") || !strcasecmp(key, "match_ids")) { *options |= RRDR_OPTION_MATCH_IDS; } diff --git a/web/server/web_client.c b/web/server/web_client.c index ad941a32c8..d287cec032 100644 --- a/web/server/web_client.c +++ b/web/server/web_client.c @@ -496,6 +496,11 @@ void buffer_data_options2string(BUFFER *wb, uint32_t options) { if(count++) buffer_strcat(wb, " "); buffer_strcat(wb, "unaligned"); } + + if(options & RRDR_OPTION_ANOMALY_BIT) { + if(count++) buffer_strcat(wb, " "); + buffer_strcat(wb, "anomaly-bit"); + } } static inline int check_host_and_call(RRDHOST *host, struct web_client *w, char *url, int (*func)(RRDHOST *, struct web_client *, char *)) { |