diff options
Diffstat (limited to '')
-rw-r--r-- | ml/Config.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/ml/Config.h b/ml/Config.h new file mode 100644 index 0000000..d876d4a --- /dev/null +++ b/ml/Config.h @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef ML_CONFIG_H +#define ML_CONFIG_H + +#include "ml-private.h" + +namespace ml { + +class Config { +public: + bool EnableAnomalyDetection; + + unsigned MaxTrainSamples; + unsigned MinTrainSamples; + unsigned TrainEvery; + unsigned NumModelsToUse; + + unsigned DBEngineAnomalyRateEvery; + + unsigned DiffN; + unsigned SmoothN; + unsigned LagN; + + double RandomSamplingRatio; + unsigned MaxKMeansIters; + + double DimensionAnomalyScoreThreshold; + + double HostAnomalyRateThreshold; + RRDR_GROUPING AnomalyDetectionGroupingMethod; + time_t AnomalyDetectionQueryDuration; + + bool StreamADCharts; + + std::string HostsToSkip; + SIMPLE_PATTERN *SP_HostsToSkip; + + std::string ChartsToSkip; + SIMPLE_PATTERN *SP_ChartsToSkip; + + std::vector<uint32_t> RandomNums; + + void readMLConfig(); +}; + +extern Config Cfg; + +} // namespace ml + +#endif /* ML_CONFIG_H */ |