Skip to content

Rule🔗

Definition🔗

export interface Rule {
    annotations?: Record<string, string>;
    condition: string;
    data: alerting.Query[];
    execErrState: "Alerting" | "Error" | "OK" | "KeepLast";
    folderUID: string;
    // The amount of time, in seconds, for which the rule must be breached for the rule to be considered to be Firing.
    // Before this time has elapsed, the rule is only considered to be Pending.
    for: string;
    id?: number;
    isPaused?: boolean;
    labels?: Record<string, string>;
    noDataState: "OK" | "Alerting" | "NoData" | "KeepLast";
    notification_settings?: alerting.NotificationSettings;
    orgID: number;
    provenance?: alerting.Provenance;
    record?: alerting.RecordRule;
    ruleGroup: string;
    title: string;
    uid?: string;
    updated?: string;
    // You can set a Keep firing for period to avoid repeated firing-resolving-firing notifications caused by flapping conditions.
    // Value is in nanoseconds
    keepFiringFor?: number;
}

See also🔗