How to Deploy Zabbix 4.4 with TimescaleDB on CentOS 7 – Step‑by‑Step Guide
This guide walks through installing Zabbix 4.4.0 on CentOS 7, configuring PostgreSQL, adding the TimescaleDB time‑series extension, setting up the Zabbix database, and tuning Linux, Nginx, and PHP so the monitoring platform runs smoothly with high‑performance time‑series storage.
2019.10 Zabbix 4.4.0 was officially released, introducing a new Go‑based agent2 and many features. One of the most important new features is official support for TimescaleDB, a PostgreSQL‑based time‑series database.
TimescaleDB Overview
TimescaleDB is a PostgreSQL plug‑in that inherits all PostgreSQL capabilities and adds rich support for time‑series data, including GIS, JSON, key‑value, image feature values, range, arrays, composite types, custom types, etc. It is well suited for industrial time‑series scenarios and offers the following characteristics:
Time‑optimized storage
Automatic sharding by time and space (chunks)
Full SQL interface
Support for vertical and horizontal scaling
Automatic partitioning on time and space dimensions
Parallel query across multiple servers and chunks
Automatic chunk size adjustment
Internal write optimizations (batch commit, in‑memory index, transaction support, back‑filling)
Complex query optimizations (chunk selection, recent‑value fetch, limit push‑down, parallel aggregation)
Leverages PostgreSQL features such as GIS and JOIN, and supports PITR and streaming replication
Automatic retention policies that delete old data
Linux System Preparation
Check the OS version and install required packages:
cat /etc/redhat-release yum install epel-release yum -y install sysstat traceroute net-tools telnet tree net-snmp-utils htop vim lrzsz tcpdump wget gitDisable SELinux permanently and temporarily:
# Edit /etc/selinux/config and set SELINUX=disabled setenforce 0Stop and disable the firewall:
systemctl stop firewalld && systemctl disable firewalldAdjust ulimit for all users:
* soft nofile 65536
* hard nofile 65536
* soft nproc 65536
* hard nproc 65536Optimize kernel parameters:
vim /etc/sysctl.conf vm.swappiness = 0
vm.max_map_count = 262144
net.core.somaxconn = 65535
net.ipv4.ip_forward = 1 sysctl -pPostgreSQL Installation
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm yum install postgresql11 yum install postgresql11-server /usr/pgsql-11/bin/postgresql-11-setup initdb systemctl enable postgresql-11 && systemctl start postgresql-11TimescaleDB Deployment
Add the TimescaleDB YUM repository:
vim /etc/yum.repos.d/timescale_timescaledb.repo [timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/7/$basearch
gpgcheck=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
enabled=1
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300 yum install -y timescaledb-postgresql-11Enable the extension in postgresql.conf:
vim /var/lib/pgsql/11/data/postgresql.conf shared_preload_libraries = 'timescaledb' systemctl restart postgresql-11Zabbix TimescaleDB Database Setup
sudo -u postgres psql create user zabbix with password 'zabbixpwd123';
create database zabbix owner zabbix;
grant all privileges on database zabbix to zabbix; echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbixImport Zabbix schema and TimescaleDB‑specific objects:
zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix -h 192.168.99.221 zcat /usr/share/doc/zabbix-server-pgsql*/timescaledb.sql.gz | sudo -u zabbix psql zabbix -h 192.168.99.221Database deployment is now complete.
Zabbix Server Installation
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm yum -y install zabbix-server-pgsql zabbix-web-pgsqlConfigure the server (edit /etc/zabbix/zabbix_server.conf):
DBHost=192.168.99.221
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixpwd123
DBPort=5432 systemctl start zabbix-server && systemctl enable zabbix-serverPHP and Nginx Configuration
# yum install nginx php php-fpm php-mysql -y systemctl start nginx && systemctl enable nginx vim /etc/php-fpm.d/zabbix.conf # set appropriate date.timezone and other parameters systemctl restart php-fpmWeb UI and Font Tweaks
Copy a suitable Chinese font to the server and create a symlink so Zabbix UI renders correctly:
# cp /path/to/SimKai.ttf /usr/share/fonts/dejavu/zabbix.ttf
# ln -s /usr/share/fonts/dejavu/zabbix.ttf /etc/alternatives/zabbix-web-fontVerification
Test remote connection to the TimescaleDB‑backed Zabbix database:
psql -U postgres -h 192.168.99.221Note: Zabbix Server supports TimescaleDB, but Zabbix Proxy does not.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ops Development Stories
Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
