summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2022-05-11 17:31:57 +0300
committerGitHub <noreply@github.com>2022-05-11 17:31:57 +0300
commitd7b33aa2237345e0c3b2c9718bb0bea043665c35 (patch)
treec8b4559bbffcb10542ffcdd4a1f40069a2256179
parent9adf4dd782b8587ca3daffeb46c6c3ea98fb76d8 (diff)
Expose anomaly-bit option to health. (#12835)
-rw-r--r--health/health_config.c3
-rw-r--r--web/server/web_client.c5
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 *)) {