summaryrefslogtreecommitdiffstats
path: root/ml/Config.h
blob: f10e1149266e4eb8ba4038fcc0cce96e982373d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// 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 */