Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RetentionStatements = []retentionStatement{{ RetentionType: RetentionHistory, Category: "acknowledgement", CleanupStmt: icingadb.CleanupStmt{ Table: "acknowledgement_history", PK: "id", Column: "clear_time", }, }, { RetentionType: RetentionHistory, Category: "comment", CleanupStmt: icingadb.CleanupStmt{ Table: "comment_history", PK: "comment_id", Column: "remove_time", }, }, { RetentionType: RetentionHistory, Category: "downtime", CleanupStmt: icingadb.CleanupStmt{ Table: "downtime_history", PK: "downtime_id", Column: "end_time", }, }, { RetentionType: RetentionHistory, Category: "flapping", CleanupStmt: icingadb.CleanupStmt{ Table: "flapping_history", PK: "id", Column: "end_time", }, }, { RetentionType: RetentionHistory, Category: "notification", CleanupStmt: icingadb.CleanupStmt{ Table: "notification_history", PK: "id", Column: "send_time", }, }, { RetentionType: RetentionHistory, Category: "state", CleanupStmt: icingadb.CleanupStmt{ Table: "state_history", PK: "id", Column: "event_time", }, }, { RetentionType: RetentionSla, Category: "sla_downtime", CleanupStmt: icingadb.CleanupStmt{ Table: "sla_history_downtime", PK: "downtime_id", Column: "downtime_end", }, }, { RetentionType: RetentionSla, Category: "sla_state", CleanupStmt: icingadb.CleanupStmt{ Table: "sla_history_state", PK: "id", Column: "event_time", }, }}
RetentionStatements maps history categories with corresponding cleanup statements.
Functions ¶
This section is empty.
Types ¶
type Retention ¶
type Retention struct {
// contains filtered or unexported fields
}
Retention deletes rows from history tables that exceed their configured retention period.
type RetentionOptions ¶
RetentionOptions defines the non-default mapping of history categories with their retention period in days.
func (RetentionOptions) Validate ¶
func (o RetentionOptions) Validate() error
Validate checks constraints in the supplied retention options and returns an error if they are violated.
type RetentionType ¶
type RetentionType int
const ( RetentionHistory RetentionType = iota RetentionSla )
Click to show internal directories.
Click to hide internal directories.