Zabbix Documentation 4.2

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

manual:appendix:install:timescaledb

4 Migration to TimescaleDB

Overview

Support of a time-series database has been added since Zabbix 4.2 in the form of experimental support of 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.

Configuration

We assume that TimescaleDB extension has been already installed in the database (see installation instructions).

TimescaleDB extension must also be enabled for the specific DB by executing:

echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix

Running this command requires database administrator privileges.

Then run the timescaledb.sql script located in database/postgresql:

cat timescaledb.sql | sudo -u zabbix psql zabbix

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 AdministrationGeneralHousekeeping):

  • Override item history period
  • Override item trend period

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).