-
Notifications
You must be signed in to change notification settings - Fork 28
Postgresql partitioning on zabbix monitoring server
WARNING: PostgreSQL partitioning of the Zabbix database is not supported by Zabbix SIA support or by Erigones (Danube Cloud) support. Use at your own risk!
Zabbix partitioning helper SQL functions and scripts are available on the esdc-mon VM image version 2.6.1 or later. The scripts are based on https://github.com/cavaliercoder/zabbix-pgsql-partitioning and can be found here: https://github.com/erigones/esdc-factory/tree/master/ansible/roles/zabbix-server-partitioning
-
Connect to the Zabbix server and stop the zabbix-server service:
[root@mon01 ~]# systemctl stop zabbix-server
-
Check the
/usr/local/sbin/zbx_partitions.py
script for suitable partitioning schema (tables
dict):vim /usr/local/sbin/zbx_partitions.py
-
Create DB partitions (these may take a long time if you have lots of data):
/usr/local/sbin/zbx_partitions.py init -v
-
Disable Housekeeper by editing the
/etc/zabbix/zabbix_server.conf
file:HousekeepingFrequency=0
-
Start the Zabbix server:
[root@mon01 ~]# systemctl start zabbix-server
-
Enable automatic creation of new and deletion of old partitions:
[root@mon01 ~]# crontab -e 30 1 * * * /usr/local/sbin/zbx_partitions.py
Don't forget to monitor the correct functioning of the regular zbx_partitions.py script.
Homepage | User Guide | API Reference | Wiki