3 Housekeeping

Overview

The Administration > Housekeeping section lets you configure Zabbix internal housekeeping that automatically removes outdated or user-deleted data from the database. This prevents the database from growing indefinitely, which would consume unnecessary disk space and degrade database performance.

Housekeeping can be enabled and configured for the following types of data:

Audit log housekeeping is configured separately.

Configuration

The following parameters are available:

Parameter Description
Enable internal housekeeping Enable or disable internal housekeeping (enabled by default).
If enabled, the Zabbix server housekeeper process automatically removes data from the database that exceeds the Data storage period.
Data storage period Specify how long to keep data before it is removed by the housekeeper.
Mandatory if internal housekeeping is enabled.
Range: 1 day (1 hour for history) - 25 years; or "0". Time suffixes (e.g., 1d, 1w) are supported.

For Events and alerts, the data storage period is set separately for triggers, services, internal data, network discovery, and autoregistration.
The housekeeper removes only those events that are not associated with problems. For example, a problem/recovery event older than Data storage period will not be removed if it's associated with an unresolved problem. When the housekeeper removes outdated entities, it first removes problems, then events.
Note that when an item/trigger is deleted, its problems are also deleted; however, the related problem/recovery events remain in the database until the housekeeper removes them.

For History and Trends, the data storage periods also determine how long data remains visible in Monitoring > Latest data, even if internal housekeeping is disabled.
Override item history period If enabled, the history/trend storage period specified in the item configuration is overridden by the Data storage period setting (except for items with the Do not store option enabled).

This option can be used even when internal housekeeping is disabled and an external housekeeper is used.
Override item trend period

If using TimescaleDB, the History, trends and audit log compression section becomes available.

For TimescaleDB, enable Override item history period, Override item trend period, and Enable internal housekeeping for history and trends to fully benefit from automatic partitioning. If these options are disabled, data kept in history and trends tables will still be partitioned, but the housekeeper will not drop outdated partitions, and configuration warnings will appear. When dropping of outdated partitions is enabled, Zabbix server and frontend will no longer track deleted items, and history for those items will be cleared when an outdated partition is deleted.

The Reset defaults button lets you revert any changes made.