diff options
-rw-r--r-- | database/rrd.h | 11 | ||||
-rw-r--r-- | database/rrdcontext.c | 7 | ||||
-rw-r--r-- | database/rrdcontext.h | 1 | ||||
-rw-r--r-- | database/rrddim.c | 22 | ||||
-rw-r--r-- | database/rrdset.c | 10 | ||||
-rw-r--r-- | exporting/check_filters.c | 4 | ||||
-rw-r--r-- | exporting/prometheus/prometheus.c | 4 | ||||
-rw-r--r-- | health/health.c | 3 | ||||
-rw-r--r-- | ml/Config.cc | 6 | ||||
-rw-r--r-- | ml/Dimension.cc | 10 | ||||
-rw-r--r-- | ml/Dimension.h | 18 | ||||
-rw-r--r-- | ml/Host.cc | 15 | ||||
-rw-r--r-- | ml/Host.h | 27 | ||||
-rw-r--r-- | ml/ml-dummy.c | 11 | ||||
-rw-r--r-- | ml/ml.cc | 43 | ||||
-rw-r--r-- | ml/ml.h | 4 | ||||
-rw-r--r-- | streaming/rrdpush.c | 6 | ||||
-rw-r--r-- | web/api/formatters/rrd2json.c | 3 | ||||
-rw-r--r-- | web/api/web_api_v1.c | 6 |
19 files changed, 21 insertions, 190 deletions
diff --git a/database/rrd.h b/database/rrd.h index b57df223b1..234fe5fda3 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -529,21 +529,18 @@ typedef enum rrdset_flags { RRDSET_FLAG_INDEXED_ID = (1 << 19), // the rrdset is indexed by its id RRDSET_FLAG_INDEXED_NAME = (1 << 20), // the rrdset is indexed by its name - RRDSET_FLAG_ANOMALY_RATE_CHART = (1 << 21), // the rrdset is for storing anomaly rates for all dimensions - RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION = (1 << 22), + RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION = (1 << 21), - RRDSET_FLAG_SENDER_REPLICATION_FINISHED = (1 << 23), // the sending side has completed replication - RRDSET_FLAG_RECEIVER_REPLICATION_FINISHED = (1 << 24), // the receiving side has completed replication + RRDSET_FLAG_SENDER_REPLICATION_FINISHED = (1 << 22), // the sending side has completed replication + RRDSET_FLAG_RECEIVER_REPLICATION_FINISHED = (1 << 23), // the receiving side has completed replication - RRDSET_FLAG_UPSTREAM_SEND_VARIABLES = (1 << 25), // a custom variable has been updated and needs to be exposed to parent + RRDSET_FLAG_UPSTREAM_SEND_VARIABLES = (1 << 24), // a custom variable has been updated and needs to be exposed to parent } RRDSET_FLAGS; #define rrdset_flag_check(st, flag) (__atomic_load_n(&((st)->flags), __ATOMIC_SEQ_CST) & (flag)) #define rrdset_flag_set(st, flag) __atomic_or_fetch(&((st)->flags), flag, __ATOMIC_SEQ_CST) #define rrdset_flag_clear(st, flag) __atomic_and_fetch(&((st)->flags), ~(flag), __ATOMIC_SEQ_CST) -#define rrdset_is_ar_chart(st) rrdset_flag_check(st, RRDSET_FLAG_ANOMALY_RATE_CHART) - struct rrdset { uuid_t chart_uuid; // the global UUID for this chart diff --git a/database/rrdcontext.c b/database/rrdcontext.c index cc43c9d96e..fb283d93f3 100644 --- a/database/rrdcontext.c +++ b/database/rrdcontext.c @@ -768,7 +768,7 @@ static void rrdinstance_insert_callback(const DICTIONARY_ITEM *item __maybe_unus } if(ri->rrdset) { - if(unlikely((rrdset_flag_check(ri->rrdset, RRDSET_FLAG_HIDDEN)) || rrdset_is_ar_chart(ri->rrdset))) + if(unlikely(rrdset_flag_check(ri->rrdset, RRDSET_FLAG_HIDDEN))) ri->flags |= RRD_FLAG_HIDDEN; // no need of atomics at the constructor else ri->flags &= ~RRD_FLAG_HIDDEN; // no need of atomics at the constructor @@ -876,7 +876,7 @@ static bool rrdinstance_conflict_callback(const DICTIONARY_ITEM *item __maybe_un } if(ri->rrdset) { - if(unlikely((rrdset_flag_check(ri->rrdset, RRDSET_FLAG_HIDDEN)) || rrdset_is_ar_chart(ri->rrdset))) + if(unlikely(rrdset_flag_check(ri->rrdset, RRDSET_FLAG_HIDDEN))) rrd_flag_set(ri, RRD_FLAG_HIDDEN); else rrd_flag_clear(ri, RRD_FLAG_HIDDEN); @@ -2209,9 +2209,6 @@ DICTIONARY *rrdcontext_all_metrics_to_dict(RRDHOST *host, SIMPLE_PATTERN *contex if(rrd_flag_is_deleted(ri)) continue; - if(ri->rrdset && rrdset_is_ar_chart(ri->rrdset)) - continue; - RRDMETRIC *rm; dfe_start_read(ri->rrdmetrics, rm) { if(rrd_flag_is_deleted(rm)) diff --git a/database/rrdcontext.h b/database/rrdcontext.h index 6ddfa2e602..68736d4fdc 100644 --- a/database/rrdcontext.h +++ b/database/rrdcontext.h @@ -164,7 +164,6 @@ typedef struct query_target_request { time_t before; // the requested timeframe size_t points; // the requested number of points time_t timeout; // the timeout of the query in seconds - int max_anomaly_rates; // it only applies to anomaly rates chart - TODO - remove it uint32_t format; // DATASOURCE_FORMAT RRDR_OPTIONS options; RRDR_GROUPING group_method; diff --git a/database/rrddim.c b/database/rrddim.c index ff6c83aefe..17e65991f0 100644 --- a/database/rrddim.c +++ b/database/rrddim.c @@ -147,11 +147,9 @@ static void rrddim_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v } } - if(!rrdset_is_ar_chart(st)) { - rrddim_flag_set(rd, RRDDIM_FLAG_PENDING_HEALTH_INITIALIZATION); - rrdset_flag_set(rd->rrdset, RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION); - rrdhost_flag_set(rd->rrdset->rrdhost, RRDHOST_FLAG_PENDING_HEALTH_INITIALIZATION); - } + rrddim_flag_set(rd, RRDDIM_FLAG_PENDING_HEALTH_INITIALIZATION); + rrdset_flag_set(rd->rrdset, RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION); + rrdhost_flag_set(rd->rrdset->rrdhost, RRDHOST_FLAG_PENDING_HEALTH_INITIALIZATION); // let the chart resync rrdset_flag_set(st, RRDSET_FLAG_SYNC_CLOCK); @@ -251,11 +249,10 @@ static bool rrddim_conflict_callback(const DICTIONARY_ITEM *item __maybe_unused, if(rrddim_flag_check(rd, RRDDIM_FLAG_ARCHIVED)) { rrddim_flag_clear(rd, RRDDIM_FLAG_ARCHIVED); - if(!rrdset_is_ar_chart(st)) { - rrddim_flag_set(rd, RRDDIM_FLAG_PENDING_HEALTH_INITIALIZATION); - rrdset_flag_set(rd->rrdset, RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION); - rrdhost_flag_set(rd->rrdset->rrdhost, RRDHOST_FLAG_PENDING_HEALTH_INITIALIZATION); - } + + rrddim_flag_set(rd, RRDDIM_FLAG_PENDING_HEALTH_INITIALIZATION); + rrdset_flag_set(rd->rrdset, RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION); + rrdhost_flag_set(rd->rrdset->rrdhost, RRDHOST_FLAG_PENDING_HEALTH_INITIALIZATION); } if(unlikely(rc)) @@ -357,14 +354,11 @@ inline int rrddim_reset_name(RRDSET *st, RRDDIM *rd, const char *name) { rd->name = rrd_string_strdupz(name); string_freez(old); - if (!rrdset_is_ar_chart(st)) - rrddimvar_rename_all(rd); + rrddimvar_rename_all(rd); rd->exposed = 0; rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_EXPOSED); - ml_dimension_update_name(st, rd, name); - return 1; } diff --git a/database/rrdset.c b/database/rrdset.c index f17c955adb..53b15d213f 100644 --- a/database/rrdset.c +++ b/database/rrdset.c @@ -100,11 +100,6 @@ struct rrdset_constructor { // the constructor - the dictionary is write locked while this runs static void rrdset_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, void *rrdset, void *constructor_data) { - static STRING *anomaly_rates_chart = NULL; - - if(unlikely(!anomaly_rates_chart)) - anomaly_rates_chart = string_strdupz(ML_ANOMALY_RATES_CHART_ID); - struct rrdset_constructor *ctr = constructor_data; RRDHOST *host = ctr->host; RRDSET *st = rrdset; @@ -145,9 +140,6 @@ static void rrdset_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v if(host == localhost || !host->receiver || !stream_has_capability(host->receiver, STREAM_CAP_REPLICATION)) st->flags |= RRDSET_FLAG_RECEIVER_REPLICATION_FINISHED; - if(unlikely(st->id == anomaly_rates_chart)) - st->flags |= RRDSET_FLAG_ANOMALY_RATE_CHART; - netdata_rwlock_init(&st->alerts.rwlock); if(st->rrd_memory_mode == RRD_MEMORY_MODE_SAVE || st->rrd_memory_mode == RRD_MEMORY_MODE_MAP) { @@ -355,7 +347,7 @@ static void rrdset_react_callback(const DICTIONARY_ITEM *item __maybe_unused, vo st->last_accessed_time = now_realtime_sec(); - if((host->health_enabled && (ctr->react_action & (RRDSET_REACT_NEW | RRDSET_REACT_CHART_ACTIVATED))) && !rrdset_is_ar_chart(st)) { + if(host->health_enabled && (ctr->react_action & (RRDSET_REACT_NEW | RRDSET_REACT_CHART_ACTIVATED))) { rrdset_flag_set(st, RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION); rrdhost_flag_set(st->rrdhost, RRDHOST_FLAG_PENDING_HEALTH_INITIALIZATION); } diff --git a/exporting/check_filters.c b/exporting/check_filters.c index 19614d3253..009a010b34 100644 --- a/exporting/check_filters.c +++ b/exporting/check_filters.c @@ -55,10 +55,6 @@ int rrdset_is_exportable(struct instance *instance, RRDSET *st) RRDHOST *host = st->rrdhost; #endif - // Do not export anomaly rates charts. - if (rrdset_is_ar_chart(st)) - return 0; - if (st->exporting_flags == NULL) st->exporting_flags = callocz(instance->engine->instance_num, sizeof(size_t)); diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c index 5719db4187..294d8ec2c9 100644 --- a/exporting/prometheus/prometheus.c +++ b/exporting/prometheus/prometheus.c @@ -28,10 +28,6 @@ inline int can_send_rrdset(struct instance *instance, RRDSET *st, SIMPLE_PATTERN RRDHOST *host = st->rrdhost; #endif - // Do not send anomaly rates charts. - if (rrdset_is_ar_chart(st)) - return 0; - if (unlikely(rrdset_flag_check(st, RRDSET_FLAG_EXPORTING_IGNORE))) return 0; diff --git a/health/health.c b/health/health.c index 6046a1f1bb..87dddbfb6e 100644 --- a/health/health.c +++ b/health/health.c @@ -795,9 +795,6 @@ static void health_execute_delayed_initializations(RRDHOST *host) { if(!rrdset_flag_check(st, RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION)) continue; rrdset_flag_clear(st, RRDSET_FLAG_PENDING_HEALTH_INITIALIZATION); - if(unlikely(rrdset_is_ar_chart(st))) - continue; - worker_is_busy(WORKER_HEALTH_JOB_DELAYED_INIT_RRDSET); if(!st->rrdfamily) diff --git a/ml/Config.cc b/ml/Config.cc index 63b570156a..eedd8c29fd 100644 --- a/ml/Config.cc +++ b/ml/Config.cc @@ -33,8 +33,6 @@ void Config::readMLConfig(void) { unsigned TrainEvery = config_get_number(ConfigSectionML, "train every", 1 * 3600); unsigned NumModelsToUse = config_get_number(ConfigSectionML, "number of models per dimension", 1 * 24); - unsigned DBEngineAnomalyRateEvery = config_get_number(ConfigSectionML, "dbengine anomaly rate every", 30); - unsigned DiffN = config_get_number(ConfigSectionML, "num samples to diff", 1); unsigned SmoothN = config_get_number(ConfigSectionML, "num samples to smooth", 3); unsigned LagN = config_get_number(ConfigSectionML, "num samples to lag", 5); @@ -57,8 +55,6 @@ void Config::readMLConfig(void) { TrainEvery = clamp<unsigned>(TrainEvery, 1 * 3600, 6 * 3600); NumModelsToUse = clamp<unsigned>(TrainEvery, 1, 7 * 24); - DBEngineAnomalyRateEvery = clamp(DBEngineAnomalyRateEvery, 1 * 30u, 15 * 60u); - DiffN = clamp(DiffN, 0u, 1u); SmoothN = clamp(SmoothN, 0u, 5u); LagN = clamp(LagN, 1u, 5u); @@ -93,8 +89,6 @@ void Config::readMLConfig(void) { Cfg.TrainEvery = TrainEvery; Cfg.NumModelsToUse = NumModelsToUse; - Cfg.DBEngineAnomalyRateEvery = DBEngineAnomalyRateEvery; - Cfg.DiffN = DiffN; Cfg.SmoothN = SmoothN; Cfg.LagN = LagN; diff --git a/ml/Dimension.cc b/ml/Dimension.cc index 39e74a065d..bf34abb72f 100644 --- a/ml/Dimension.cc +++ b/ml/Dimension.cc @@ -167,16 +167,6 @@ bool Dimension::predict(CalculatedNumber Value, bool Exists) { return true; } -void Dimension::updateAnomalyBitCounter(RRDSET *RS, unsigned Elapsed, bool IsAnomalous) { - AnomalyBitCounter += IsAnomalous; - - if (Elapsed == Cfg.DBEngineAnomalyRateEvery) { - double AR = static_cast<double>(AnomalyBitCounter) / Cfg.DBEngineAnomalyRateEvery; - rrddim_set_by_pointer(RS, getAnomalyRateRD(), AR * 1000); - AnomalyBitCounter = 0; - } -} - std::array<KMeans, 1> Dimension::getModels() { std::unique_lock<std::mutex> Lock(Mutex); return Models; diff --git a/ml/Dimension.h b/ml/Dimension.h index eb37f0755a..3ec56e0981 100644 --- a/ml/Dimension.h +++ b/ml/Dimension.h @@ -26,15 +26,13 @@ static inline std::string getMLDimensionID(RRDDIM *RD) { class Dimension { public: - Dimension(RRDDIM *RD, RRDSET *AnomalyRateRS) : + Dimension(RRDDIM *RD) : RD(RD), - AnomalyRateRD(rrddim_add(AnomalyRateRS, ml::getMLDimensionID(RD).c_str(), NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE)), LastTrainedAt(Seconds(0)), Trained(false), ConstantModel(false), AnomalyScore(0.0), - AnomalyBit(0), - AnomalyBitCounter(0) + AnomalyBit(0) { } RRDDIM *getRD() const { @@ -53,14 +51,6 @@ public: return Query(RD).oldestTime(); } - void setAnomalyRateRDName(const char *Name) const { - rrddim_reset_name(AnomalyRateRD->rrdset, AnomalyRateRD, Name); - } - - RRDDIM *getAnomalyRateRD() const { - return AnomalyRateRD; - } - bool isTrained() const { return Trained; } @@ -77,8 +67,6 @@ public: bool predict(CalculatedNumber Value, bool Exists); - void updateAnomalyBitCounter(RRDSET *RS, unsigned Elapsed, bool IsAnomalous); - std::pair<bool, double> detect(size_t WindowLength, bool Reset); std::array<KMeans, 1> getModels(); @@ -88,7 +76,6 @@ private: public: RRDDIM *RD; - RRDDIM *AnomalyRateRD; TimePoint LastTrainedAt; std::atomic<bool> Trained; @@ -96,7 +83,6 @@ public: CalculatedNumber AnomalyScore; std::atomic<bool> AnomalyBit; - unsigned AnomalyBitCounter; std::vector<CalculatedNumber> CNs; std::array<KMeans, 1> Models; diff --git a/ml/Host.cc b/ml/Host.cc index 0eb35fff0b..0261061454 100644 --- a/ml/Host.cc +++ b/ml/Host.cc @@ -161,10 +161,6 @@ void DetectableHost::detectOnce() { size_t NumTrainedDimensions = 0; size_t NumActiveDimensions = 0; - bool CollectAnomalyRates = (++AnomalyRateTimer == Cfg.DBEngineAnomalyRateEvery); - if (CollectAnomalyRates) - rrdset_next(AnomalyRateRS); - { std::lock_guard<std::mutex> Lock(Mutex); @@ -173,10 +169,8 @@ void DetectableHost::detectOnce() { Dimension *D = DP.second; - if (!D->isActive()) { - D->updateAnomalyBitCounter(AnomalyRateRS, AnomalyRateTimer, false); + if (!D->isActive()) continue; - } NumActiveDimensions++; NumTrainedDimensions += D->isTrained(); @@ -184,7 +178,6 @@ void DetectableHost::detectOnce() { bool IsAnomalous = D->isAnomalous(); if (IsAnomalous) NumAnomalousDimensions += 1; - D->updateAnomalyBitCounter(AnomalyRateRS, AnomalyRateTimer, IsAnomalous); } if (NumAnomalousDimensions) @@ -195,12 +188,6 @@ void DetectableHost::detectOnce() { NumNormalDimensions = NumActiveDimensions - NumAnomalousDimensions; } - if (CollectAnomalyRates) { - worker_is_busy(WORKER_JOB_UPDATE_ANOMALY_RATES); - AnomalyRateTimer = 0; - rrdset_done(AnomalyRateRS); - } - this->NumAnomalousDimensions = NumAnomalousDimensions; this->NumNormalDimensions = NumNormalDimensions; this->NumTrainedDimensions = NumTrainedDimensions; @@ -13,25 +13,7 @@ namespace ml { class RrdHost { public: - RrdHost(RRDHOST *RH) : RH(RH) { - AnomalyRateRS = rrdset_create( - RH, - "anomaly_detection", - "anomaly_rates", - NULL, // name - "anomaly_rates", - NULL, // ctx - "Average anomaly rate", - "anomaly rate", - "netdata", - "ml", - 39189, - Cfg.DBEngineAnomalyRateEvery, - RRDSET_TYPE_LINE - ); - - rrdset_flag_set(AnomalyRateRS, RRDSET_FLAG_HIDDEN); - } + RrdHost(RRDHOST *RH) : RH(RH) {}; RRDHOST *getRH() { return RH; } @@ -43,10 +25,6 @@ public: return S; } - RRDSET *getAnomalyRateRS() const { - return AnomalyRateRS; - } - void addDimension(Dimension *D); void removeDimension(Dimension *D); @@ -56,7 +34,6 @@ public: protected: RRDHOST *RH; - RRDSET *AnomalyRateRS; // Protect dimension and lock maps std::mutex Mutex; @@ -114,8 +91,6 @@ private: size_t NumNormalDimensions{0}; size_t NumTrainedDimensions{0}; size_t NumActiveDimensions{0}; - - unsigned AnomalyRateTimer{0}; }; using Host = DetectableHost; diff --git a/ml/ml-dummy.c b/ml/ml-dummy.c index 6c0dce6011..492dfe2fce 100644 --- a/ml/ml-dummy.c +++ b/ml/ml-dummy.c @@ -43,17 +43,6 @@ bool ml_is_anomalous(RRDDIM *RD, double Value, bool Exists) { return false; } -void ml_process_rrdr(RRDR *R, int MaxAnomalyRates) { - (void) R; - (void) MaxAnomalyRates; -} - -void ml_dimension_update_name(RRDSET *RS, RRDDIM *RD, const char *name) { - (void) RS; - (void) RD; - (void) name; -} - bool ml_streaming_enabled() { return false; } @@ -79,10 +79,7 @@ void ml_new_dimension(RRDDIM *RD) { if (simple_pattern_matches(Cfg.SP_ChartsToSkip, rrdset_name(RS))) return; - if (rrdset_is_ar_chart(RS)) - return; - - Dimension *D = new Dimension(RD, H->getAnomalyRateRS()); + Dimension *D = new Dimension(RD); RD->ml_dimension = static_cast<ml_dimension_t>(D); H->addDimension(D); } @@ -147,44 +144,6 @@ bool ml_is_anomalous(RRDDIM *RD, double Value, bool Exists) { return D->predict(Value, Exists); } -void ml_process_rrdr(RRDR *R, int MaxAnomalyRates) { - if (R->rows != 1) - return; - - if (MaxAnomalyRates < 1 || MaxAnomalyRates >= (int)R->d) - return; - - NETDATA_DOUBLE *CNs = R->v; - RRDR_DIMENSION_FLAGS *DimFlags = R->od; - - std::vector<std::pair<NETDATA_DOUBLE, int>> V; - - V.reserve(R->d); - for (int Idx = 0; Idx != (int)R->d; Idx++) - V.emplace_back(CNs[Idx], Idx); - - std::sort(V.rbegin(), V.rend()); - - for (int Idx = MaxAnomalyRates; Idx != (int)R->d; Idx++) { - int UnsortedIdx = V[Idx].second; - - int OldFlags = static_cast<int>(DimFlags[UnsortedIdx]); - int NewFlags = OldFlags | RRDR_DIMENSION_HIDDEN; - - DimFlags[UnsortedIdx] = static_cast<rrdr_dimension_flag>(NewFlags); - } -} - -void ml_dimension_update_name(RRDSET *RS, RRDDIM *RD, const char *Name) { - (void) RS; - - Dimension *D = static_cast<Dimension *>(RD->ml_dimension); - if (!D) - return; - - D->setAnomalyRateRDName(Name); -} - bool ml_streaming_enabled() { return Cfg.StreamADCharts; } @@ -35,10 +35,6 @@ void ml_delete_dimension(RRDDIM *RD); bool ml_is_anomalous(RRDDIM *RD, double value, bool exists); -void ml_process_rrdr(RRDR *R, int MaxAnomalyRates); - -void ml_dimension_update_name(RRDSET *RS, RRDDIM *RD, const char *name); - bool ml_streaming_enabled(); #define ML_ANOMALY_RATES_CHART_ID "anomaly_detection.anomaly_rates" diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c index 5764f64899..0090f5f22f 100644 --- a/streaming/rrdpush.c +++ b/streaming/rrdpush.c @@ -168,11 +168,7 @@ static inline bool should_send_chart_matching(RRDSET *st, RRDSET_FLAGS flags) { if(unlikely(!(flags & (RRDSET_FLAG_UPSTREAM_SEND | RRDSET_FLAG_UPSTREAM_IGNORE)))) { RRDHOST *host = st->rrdhost; - // Do not stream anomaly rates charts. - if (unlikely(flags & RRDSET_FLAG_ANOMALY_RATE_CHART)) - rrdset_flag_set(st, RRDSET_FLAG_UPSTREAM_IGNORE); - - else if (flags & RRDSET_FLAG_ANOMALY_DETECTION) { + if (flags & RRDSET_FLAG_ANOMALY_DETECTION) { if(ml_streaming_enabled()) rrdset_flag_set(st, RRDSET_FLAG_UPSTREAM_SEND); else diff --git a/web/api/formatters/rrd2json.c b/web/api/formatters/rrd2json.c index ad69a81f6d..72994048f8 100644 --- a/web/api/formatters/rrd2json.c +++ b/web/api/formatters/rrd2json.c @@ -153,9 +153,6 @@ int data_query_execute(ONEWAYALLOC *owa, BUFFER *wb, QUERY_TARGET *qt, time_t *l return HTTP_RESP_BACKEND_FETCH_FAILED; } - if (qt->request.st && rrdset_is_ar_chart(qt->request.st)) - ml_process_rrdr(r, qt->request.max_anomaly_rates); - if(r->result_options & RRDR_RESULT_OPTION_RELATIVE) buffer_no_cacheable(wb); else if(r->result_options & RRDR_RESULT_OPTION_ABSOLUTE) diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index fb8c4bf545..2e5aa984c3 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -610,7 +610,6 @@ inline int web_client_api_request_v1_data(RRDHOST *host, struct web_client *w, c char *group_time_str = NULL; char *points_str = NULL; char *timeout_str = NULL; - char *max_anomaly_rates_str = NULL; char *context = NULL; char *chart_label_key = NULL; char *chart_labels_filter = NULL; @@ -695,9 +694,6 @@ inline int web_client_api_request_v1_data(RRDHOST *host, struct web_client *w, c outFileName = tqx_value; } } - else if(!strcmp(name, "max_anomaly_rates")) { - max_anomaly_rates_str = value; - } else if(!strcmp(name, "tier")) { tier = str2ul(value); if(tier < storage_tiers) @@ -734,7 +730,6 @@ inline int web_client_api_request_v1_data(RRDHOST *host, struct web_client *w, c int points = (points_str && *points_str)?str2i(points_str):0; int timeout = (timeout_str && *timeout_str)?str2i(timeout_str): 0; long group_time = (group_time_str && *group_time_str)?str2l(group_time_str):0; - int max_anomaly_rates = (max_anomaly_rates_str && *max_anomaly_rates_str) ? str2i(max_anomaly_rates_str) : 0; QUERY_TARGET_REQUEST qtr = { .after = after, @@ -746,7 +741,6 @@ inline int web_client_api_request_v1_data(RRDHOST *host, struct web_client *w, c .charts = chart, .dimensions = (dimensions)?buffer_tostring(dimensions):NULL, .timeout = timeout, - .max_anomaly_rates = max_anomaly_rates, .points = points, .format = format, .options = options, |