Built-in conditions
Condition classes implement specific logic for query check conditions.
Example usage:
checks = [    
    ExecuteDurationCondition(
        name="AnalystDurationCheck",
        notice_duration=60 * 10,  # 10 minutes for notice
        warning_duration=60 * 20,  # 20 minutes for warning
        kill_duration=60 * 30,  # 30 minutes for kill
        query_filter=QueryFilter(
            include_user_name=["ANALYST_*"],
        ),
        enable_kill=True,
        enable_kill_query_filter=QueryFilter(
            exclude_warehouse_name=["ANALYST_SPECIAL_WH"],
        ),
    ),
]Common arguments
name (str) - name, used to distinguish multiple checks of the same type (default: name of condition class)
notice_duration (int) - how long query should run to produce result with level
NOTICEif it matches other condition, in secondswarning_duration (int) - how long query should run to produce result with level
WARNINGif it matches conditions, in secondskill_duration (int) - how long query should run to produce result with level
KILLif it matches other condition, in secondsquery_filter (QueryFilter) - narrow down scope of condition using filter
enable_kill (bool) - should be set to
Truefor queries matching condition and exceedingkill_durationto be actually killedenable_kill_query_filter (QueryFilter) - narrow down scope of query killer using filter
Most condition classes also have specific arguments, which are described on corresponding sub-pages.
Last updated