summaryrefslogtreecommitdiffstats
path: root/ml/Config.h
blob: d876d4aa4102bc45739f5067beed4d86667b8812 (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
// 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 */