summaryrefslogtreecommitdiffstats
path: root/streaming
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2022-02-24 10:57:30 +0200
committerGitHub <noreply@github.com>2022-02-24 10:57:30 +0200
commit69ea17d6ec534e1ed796a92fd042bd76a3ca9215 (patch)
tree4345e3405b2ac1e37a9be1615d6dad799e15327d /streaming
parent8756eb80c77caf411f7fae605d3f1bb03dd60b76 (diff)
Track anomaly rates with DBEngine. (#12083)
* Track anomaly rates with DBEngine. This commit adds support for tracking anomaly rates with DBEngine. We do so by creating a single chart with id "anomaly_detection.anomaly_rates" for each trainable/predictable host, which is responsible for tracking the anomaly rate of each dimension that we train/predict for that host. The rrdset->state->is_ar_chart boolean flag is set to true only for anomaly rates charts. We use this flag to: - Disable exposing the anomaly rates charts through the functionality in backends/, exporting/ and streaming/. - Skip generation of configuration options for the name, algorithm, multiplier, divisor of each dimension in an anomaly rates chart. - Skip the creation of health variables for anomaly rates dimensions. - Skip the chart/dim queue of ACLK. - Post-process the RRDR result of an anomaly rates chart, so that we can return a sorted, trimmed number of anomalous dimensions. In a child/parent configuration where both the child and the parent run ML for the child, we want to be able to stream the rest of the ML-related charts to the parent. To be able to do this without any chart name collisions, the charts are now created on localhost and their IDs and titles have the node's machine_guid and hostname as a suffix, respectively. * Fix exporting_engine tests. * Restore default ML configuration. The reverted changes where meant for local testing only. This commit restores the default values that we want to have when someone runs anomaly detection on their node. * Set context for anomaly_detection.* charts. * Check for anomaly rates chart only with a valid pointer. * Remove duplicate code. * Use a more descriptive name for id/title pair variable
Diffstat (limited to 'streaming')
-rw-r--r--streaming/rrdpush.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c
index ebd8327f09..b688e7e5cb 100644
--- a/streaming/rrdpush.c
+++ b/streaming/rrdpush.c
@@ -129,6 +129,10 @@ unsigned int remote_clock_resync_iterations = 60;
static inline int should_send_chart_matching(RRDSET *st) {
+ // Do not stream anomaly rates charts.
+ if (unlikely(st->state->is_ar_chart))
+ return false;
+
if(unlikely(!rrdset_flag_check(st, RRDSET_FLAG_ENABLED))) {
rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND);
rrdset_flag_set(st, RRDSET_FLAG_UPSTREAM_IGNORE);
@@ -781,4 +785,4 @@ int rrdpush_receiver_thread_spawn(struct web_client *w, char *url) {
buffer_flush(w->response.data);
return 200;
-} \ No newline at end of file
+}