diff options
author | vkalintiris <vasilis@netdata.cloud> | 2022-02-24 10:57:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-24 10:57:30 +0200 |
commit | 69ea17d6ec534e1ed796a92fd042bd76a3ca9215 (patch) | |
tree | 4345e3405b2ac1e37a9be1615d6dad799e15327d /exporting/prometheus | |
parent | 8756eb80c77caf411f7fae605d3f1bb03dd60b76 (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 'exporting/prometheus')
-rw-r--r-- | exporting/prometheus/prometheus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c index 0a3190074b..87fa8cd5e8 100644 --- a/exporting/prometheus/prometheus.c +++ b/exporting/prometheus/prometheus.c @@ -20,6 +20,10 @@ inline int can_send_rrdset(struct instance *instance, RRDSET *st) RRDHOST *host = st->rrdhost; #endif + // Do not send anomaly rates charts. + if (st->state && st->state->is_ar_chart) + return 0; + if (unlikely(rrdset_flag_check(st, RRDSET_FLAG_EXPORTING_IGNORE))) return 0; |