diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:10 +0000 |
commit | b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc (patch) | |
tree | 36c41e35994786456154f9d3bf88c324763aeea4 /ml/Config.cc | |
parent | Adding upstream version 1.33.1. (diff) | |
download | netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.tar.xz netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.zip |
Adding upstream version 1.34.0.upstream/1.34.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/Config.cc')
-rw-r--r-- | ml/Config.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/ml/Config.cc b/ml/Config.cc index df0a2825e..99109e05f 100644 --- a/ml/Config.cc +++ b/ml/Config.cc @@ -32,10 +32,13 @@ void Config::readMLConfig(void) { unsigned MinTrainSamples = config_get_number(ConfigSectionML, "minimum num samples to train", 1 * 3600); unsigned TrainEvery = config_get_number(ConfigSectionML, "train every", 1 * 3600); + unsigned DBEngineAnomalyRateEvery = config_get_number(ConfigSectionML, "dbengine anomaly rate every", 60); + 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); + double RandomSamplingRatio = config_get_float(ConfigSectionML, "random sampling ratio", 1.0 / LagN); unsigned MaxKMeansIters = config_get_number(ConfigSectionML, "maximum number of k-means iterations", 1000); double DimensionAnomalyScoreThreshold = config_get_float(ConfigSectionML, "dimension anomaly score threshold", 0.99); @@ -59,10 +62,13 @@ void Config::readMLConfig(void) { MinTrainSamples = clamp(MinTrainSamples, 1 * 3600u, 6 * 3600u); TrainEvery = clamp(TrainEvery, 1 * 3600u, 6 * 3600u); + DBEngineAnomalyRateEvery = clamp(DBEngineAnomalyRateEvery, 1 * 30u, 15 * 60u); + DiffN = clamp(DiffN, 0u, 1u); SmoothN = clamp(SmoothN, 0u, 5u); - LagN = clamp(LagN, 0u, 5u); + LagN = clamp(LagN, 1u, 5u); + RandomSamplingRatio = clamp(RandomSamplingRatio, 0.2, 1.0); MaxKMeansIters = clamp(MaxKMeansIters, 500u, 1000u); DimensionAnomalyScoreThreshold = clamp(DimensionAnomalyScoreThreshold, 0.01, 5.00); @@ -102,10 +108,13 @@ void Config::readMLConfig(void) { Cfg.MinTrainSamples = MinTrainSamples; Cfg.TrainEvery = TrainEvery; + Cfg.DBEngineAnomalyRateEvery = DBEngineAnomalyRateEvery; + Cfg.DiffN = DiffN; Cfg.SmoothN = SmoothN; Cfg.LagN = LagN; + Cfg.RandomSamplingRatio = RandomSamplingRatio; Cfg.MaxKMeansIters = MaxKMeansIters; Cfg.DimensionAnomalyScoreThreshold = DimensionAnomalyScoreThreshold; @@ -120,9 +129,10 @@ void Config::readMLConfig(void) { Cfg.HostsToSkip = config_get(ConfigSectionML, "hosts to skip from training", "!*"); Cfg.SP_HostsToSkip = simple_pattern_create(Cfg.HostsToSkip.c_str(), NULL, SIMPLE_PATTERN_EXACT); - Cfg.ChartsToSkip = config_get(ConfigSectionML, "charts to skip from training", - "!system.* !cpu.* !mem.* !disk.* !disk_* " - "!ip.* !ipv4.* !ipv6.* !net.* !net_* !netfilter.* " - "!services.* !apps.* !groups.* !user.* !ebpf.* !netdata.* *"); + // Always exclude anomaly_detection charts from training. + Cfg.ChartsToSkip = "anomaly_detection.* "; + Cfg.ChartsToSkip += config_get(ConfigSectionML, "charts to skip from training", "netdata.*"); Cfg.SP_ChartsToSkip = simple_pattern_create(ChartsToSkip.c_str(), NULL, SIMPLE_PATTERN_EXACT); + + Cfg.StreamADCharts = config_get_boolean(ConfigSectionML, "stream anomaly detection charts", true); } |