First time poster here, and I've a few questions...
We currently have a single zabbix server with a single proxy. Currently, we monitor 600 hosts, with around 60,000 items and around 230 NVPS on Zabbix 1.8.
We are in process of upgrading to 2.2 (which will be a new installation, without any data migrations) and moving from MySQL to PostgreSQL. I've been reading the sparse information regarding database partitioning Zabbix w/PostgreSQL and the numerous different ways to accomplish it. There seem to be a bunch of competing theories.
Based on the wiki, I'm taking the suggestion to use pg_partman as the leading contender at the moment...
1. If I utilize partitioning in the new Zabbix 2.2 environment, how would future upgrades requiring schema changes work? Would I have to un-partition, upgrade and then repartition? Would schema changes just fail?
2. Using pg_partman to accomplish the partitioning, the 'clock' field of the database tables is an integer, not a timestamp, so I must use ID based, not time based. How would one go about having similar retention periods as time based (or at least the ability to just drop old data tables instead of utilizing the housekeeper)?
3. Has anyone actually done any partitioning with Zabbix 2.2 and PostgreSQL?
4. Is data partitioning actually recommended to be used or is it just one of those "you can do it if you're brave enough" kind of things?
As for pg_partman, since nobody has posted anything on what you do to actually partition the tables, here's my first stab (you'll obviously need to fix the schema if yours is different):
Thanks In Advance!
We currently have a single zabbix server with a single proxy. Currently, we monitor 600 hosts, with around 60,000 items and around 230 NVPS on Zabbix 1.8.
We are in process of upgrading to 2.2 (which will be a new installation, without any data migrations) and moving from MySQL to PostgreSQL. I've been reading the sparse information regarding database partitioning Zabbix w/PostgreSQL and the numerous different ways to accomplish it. There seem to be a bunch of competing theories.
Based on the wiki, I'm taking the suggestion to use pg_partman as the leading contender at the moment...
1. If I utilize partitioning in the new Zabbix 2.2 environment, how would future upgrades requiring schema changes work? Would I have to un-partition, upgrade and then repartition? Would schema changes just fail?
2. Using pg_partman to accomplish the partitioning, the 'clock' field of the database tables is an integer, not a timestamp, so I must use ID based, not time based. How would one go about having similar retention periods as time based (or at least the ability to just drop old data tables instead of utilizing the housekeeper)?
3. Has anyone actually done any partitioning with Zabbix 2.2 and PostgreSQL?
4. Is data partitioning actually recommended to be used or is it just one of those "you can do it if you're brave enough" kind of things?
As for pg_partman, since nobody has posted anything on what you do to actually partition the tables, here's my first stab (you'll obviously need to fix the schema if yours is different):
Code:
-- Create daily partitions based on the clock - (60*60*24)
SELECT partman.create_parent('public.acknowledges', 'clock', 'id-static', '86400');
SELECT partman.create_parent('public.alerts', 'clock', 'id-static', '86400');
SELECT partman.create_parent('public.auditlog', 'clock', 'id-static', '86400');
SELECT partman.create_parent('public.events', 'clock', 'id-static', '86400');
SELECT partman.create_parent('public.service_alarms', 'clock', 'id-static', '86400');
-- Create monthly partitions based on the clock - (60*60*24*30)
SELECT partman.create_parent('public.history', 'clock', 'id-static', '2592000');
SELECT partman.create_parent('public.history_log', 'clock', 'id-static', '2592000');
SELECT partman.create_parent('public.history_str', 'clock', 'id-static', '2592000');
SELECT partman.create_parent('public.history_text', 'clock', 'id-static', '2592000');
SELECT partman.create_parent('public.history_uint', 'clock', 'id-static', '2592000');
SELECT partman.create_parent('public.trends', 'clock', 'id-static', '2592000');
SELECT partman.create_parent('public.trends_uint', 'clock', 'id-static', '2592000');
Comment