Config.h 931 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #ifndef ML_CONFIG_H
  3. #define ML_CONFIG_H
  4. #include "ml-private.h"
  5. namespace ml {
  6. class Config {
  7. public:
  8. bool EnableAnomalyDetection;
  9. unsigned MaxTrainSamples;
  10. unsigned MinTrainSamples;
  11. unsigned TrainEvery;
  12. unsigned NumModelsToUse;
  13. unsigned DBEngineAnomalyRateEvery;
  14. unsigned DiffN;
  15. unsigned SmoothN;
  16. unsigned LagN;
  17. double RandomSamplingRatio;
  18. unsigned MaxKMeansIters;
  19. double DimensionAnomalyScoreThreshold;
  20. double HostAnomalyRateThreshold;
  21. RRDR_GROUPING AnomalyDetectionGroupingMethod;
  22. time_t AnomalyDetectionQueryDuration;
  23. bool StreamADCharts;
  24. std::string HostsToSkip;
  25. SIMPLE_PATTERN *SP_HostsToSkip;
  26. std::string ChartsToSkip;
  27. SIMPLE_PATTERN *SP_ChartsToSkip;
  28. std::vector<uint32_t> RandomNums;
  29. void readMLConfig();
  30. };
  31. extern Config Cfg;
  32. } // namespace ml
  33. #endif /* ML_CONFIG_H */