-
Notifications
You must be signed in to change notification settings - Fork 6
/
defaults.yaml
136 lines (129 loc) · 6.78 KB
/
defaults.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# default values to be applied to all batches unless overridden in metric batch specific yaml files.
db: "sqlite" # database type to use.
table_key: "metrics" # table to store metrics in.
############################################
# model params
############################################
model_path: "local://./models" # path to where models are to be stored.
# model_path: "gs://your-bucket/models" # gcs path to where models are to be stored.
# model_path: "s3://your-bucket/models" # s3 path to where models are to be stored.
# model configs to pass to PyOD, model_params are passed to the model constructor.
model_configs:
- model_name: 'PCA'
model_tag: 'pca_default'
model_params:
contamination: 0.01
- model_name: 'KNN'
model_tag: 'knn_default'
model_params:
contamination: 0.01
model_combination_method: 'mean' # method to combine model scores, 'mean', 'min' or 'max'.
train_max_n: 2500 # max number of observations for training a model.
train_min_n: 14 # min number of observations for training a model.
score_max_n: 25 # max n to pull for scoring to avoid pulling more than needed.
preprocess_params:
diff_n: 1 # 1 will use diff, 0 will use raw metric values.
smooth_n: 3 # how much smoothing to apply in preprocessing.
lags_n: 5 # how many lags to include in feature vector.
freq: null # how often to resample for different aggregation levels than ingested at. Default of null means no resampling.
freq_agg: 'mean' # default aggregation function to use for resampling if freq != None.
############################################
# alert params
############################################
alert_methods: "email,slack" # comma separated list of alert methods to use eg "email,slack".
alert_always: False # if True, always send alerts, even if no anomalies.
alert_metric_timestamp_max_days_ago: 45 # don't alert on metrics older than this.
alert_recent_n: 1 # only alert on recent n so as to avoid continually alerting.
alert_max_n: 250 # max n to include and plot in an alert.
alert_smooth_n: 3 # smooth anomaly score over rolling n to avoid being too trigger happy.
alert_snooze_n: 3 # snooze alerts for n periods after an alert.
alert_threshold: 0.8 # threshold for smoothed anomaly score above which to alert on.
############################################
# change detection params
############################################
change_metric_timestamp_max_days_ago: 45 # don't all metrics older than this into change detection.
change_max_n: 250 # max n to include in change detection.
change_smooth_n: 1 # smooth metric values as part of change detection.
change_snooze_n: 3 # snooze change detection for n periods after a change.
change_threshold: 3.5 # threshold for PyOD MAD based change detection above which to alert on.
change_detect_last_n: 1 # number of last n observations to detect changes on.
# optional list of metrics to include in change detection.
# change_include_metrics:
# - 'dummy_include_metric'
# optional list of metrics to exclude from change detection.
# change_exclude_metrics:
# - 'dummy_exclude_metric'
############################################
# llmalert params
############################################
llmalert_recent_n: 5 # only llmalert on recent n so as to avoid continually alerting.
llmalert_smooth_n: 0 # smooth metric value prior to sending to llm.
llmalert_metric_rounding: -1 # round metric values to this number of decimal places.
llmalert_metric_timestamp_max_days_ago: 1 # don't alert on metrics older than this.
############################################
# schedules
############################################
ingest_cron_schedule: "*/3 * * * *" # cron schedule for ingest jobs
ingest_default_schedule_status: 'STOPPED' # default schedule status for ingest jobs (RUNNING or STOPPED)
train_cron_schedule: "*/5 * * * *" # cron schedule for training jobs
train_default_schedule_status: 'STOPPED' # default schedule status for train jobs (RUNNING or STOPPED)
score_cron_schedule: "*/4 * * * *" # cron schedule for scoring jobs
score_default_schedule_status: 'STOPPED' # default schedule status for score jobs (RUNNING or STOPPED)
alert_cron_schedule: "*/5 * * * *" # cron schedule for alerting jobs
alert_default_schedule_status: 'STOPPED' # default schedule status for alert jobs (RUNNING or STOPPED)
change_cron_schedule: "*/5 * * * *" # cron schedule for change detection jobs
change_default_schedule_status: 'STOPPED' # default schedule status for alert jobs (RUNNING or STOPPED)
llmalert_cron_schedule: "*/5 * * * *" # cron schedule for llmalerting jobs
llmalert_default_schedule_status: 'STOPPED' # default schedule status for llmalert jobs (RUNNING or STOPPED)
plot_cron_schedule: "*/5 * * * *" # cron schedule for plot jobs
plot_default_schedule_status: 'STOPPED' # default schedule status for plot jobs (RUNNING or STOPPED)
summary_cron_schedule: "0 9 * * *" # cron schedule for summary job
############################################
# templates
############################################
# default templated train sql
train_sql: >
{% include "./defaults/sql/train.sql" %}
# default templated score sql
score_sql: >
{% include "./defaults/sql/score.sql" %}
# default templated alert sql
alert_sql: >
{% include "./defaults/sql/alerts.sql" %}
change_sql: >
{% include "./defaults/sql/change.sql" %}
# default templated plot sql
plot_sql: >
{% include "./defaults/sql/plot.sql" %}
# default templated llmalert sql
llmalert_sql: >
{% include "./defaults/sql/llmalert.sql" %}
# default templated dashboard sql
dashboard_sql: >
{% include "./defaults/sql/dashboard.sql" %}
# default templated summary sql
summary_sql: >
{% include "./defaults/sql/summary.sql" %}
preprocess_fn: >
{% include "./defaults/python/preprocess.py" %}
prompt_fn: >
{% include "./defaults/python/prompt.py" %}
############################################
# other params
############################################
disable_batch: False # if you want to disable a metric batch for some reason.
ingest_metric_rounding: 4 # round metric values to this number of decimal places.
score_metric_rounding: 4 # round metric scores to this number of decimal places.
summary_metric_timestamp_max_days_ago: 1 # number of days to look over for summary email.
# metric_tags:
# metric_name:
# key1: value1
# key2: value2
disable_ingest: False # if you want to disable ingest job for some reason.
disable_train: False # if you want to disable train job for some reason.
disable_score: False # if you want to disable score job for some reason.
disable_alert: False # if you want to disable alert job for some reason.
disable_change: False # if you want to disable change detection job for some reason.
disable_llmalert: True # if you want to disable llmalert job for some reason.
disable_plot: False # if you want to disable plot job for some reason.
disable_summary: False # if you want to disable summary job for some reason.