I'm looking to deploy a Zabbix installation that I estimate will be collecting about 200 values per second, keeping most data for around 40 days, and then summary data for at least a year. My database backend will be PostgreSQL 8.4.x.
Looking at the schema and examining the query logs, it looks like tables like history_uint would probably be suited to day-by-day partitioning. I’ve done some quick trials and everything appears to work ok.
However, before I go off an implement all of the scripts necessary to manage the partitions, I wondered if anyone can shed light on whether Postgres performance does suffer in this scenario and whether anyone had implemented partitioning before?
To the best of my knowledge, timestamps in Zabbix come from the agent/proxy. Therefore, time ordering can not be guaranteed. Therefore, I’m thinking along the following lines:
- partition on a daily basis
- partition on ‘clock’ field
- create partitions one day ahead
- partition trigger knows about tables up-to five days in the past and one day ahead
- remove tables once no rows left, i.e. allow Zabbix clean-up routines to remove data as configured by each host item
If this hasn’t been done before and no-one can tell me it’s not necessary, I’ll publish my scripts in the cookbook/on the wiki.
Looking at the schema and examining the query logs, it looks like tables like history_uint would probably be suited to day-by-day partitioning. I’ve done some quick trials and everything appears to work ok.
However, before I go off an implement all of the scripts necessary to manage the partitions, I wondered if anyone can shed light on whether Postgres performance does suffer in this scenario and whether anyone had implemented partitioning before?
To the best of my knowledge, timestamps in Zabbix come from the agent/proxy. Therefore, time ordering can not be guaranteed. Therefore, I’m thinking along the following lines:
- partition on a daily basis
- partition on ‘clock’ field
- create partitions one day ahead
- partition trigger knows about tables up-to five days in the past and one day ahead
- remove tables once no rows left, i.e. allow Zabbix clean-up routines to remove data as configured by each host item
If this hasn’t been done before and no-one can tell me it’s not necessary, I’ll publish my scripts in the cookbook/on the wiki.

Comment