Zabbix supports TimescaleDB, a PostgreSQL-based database solution of automatically partitioning data into time-based chunks to support faster performance at scale.
Currently TimescaleDB is not supported by Zabbix proxy.
This section provides the steps necessary for migrating from existing PostgreSQL tables to TimescaleDB.
We assume that TimescaleDB extension has been already installed on the database server (see installation instructions).
TimescaleDB extension must also be enabled for the specific DB by executing:
Running this command requires database administrator privileges.
If you use a database schema other than 'public' you need to add a SCHEMA clause to the command above. E.g.:
echo "CREATE EXTENSION IF NOT EXISTS timescaledb SCHEMA yourschema CASCADE;" | sudo -u postgres psql zabbix
Then run the timescaledb.sql
script located in database/postgresql:
Migration of existing history and trend data may take a lot of time. Zabbix server and frontend must be down for the period of migration.
The timescaledb.sql
script sets the following housekeeping parameters (from Administration → General → Housekeeping):
In order to use partitioned housekeeping for history and trends both these options must be on. It's possible to use TimescaleDB partitioning only for trends (by setting Override item trend period) or only for history (Override item history period).