Hello Guys,
First of all, my english is pretty bad, so sorry for my english mistakes.
The zabbix get 124 data per second and the databases (postgresql) is around ~70GB.
I configured the housekeeper to delete every data what is older than 90 days.
After few weeks, the database is getting bigger.
I can see this in the log:
I already tried this:
and this deleted 0 (zero) lines. So I tried with 155 days instead of 90 and deleted some lines, but the DB size is same.
but NOW its do nothing with 155 days
How can I remove the old data?
UPDATE:
Its my fault, I checked the first lines of the tables and no one of lines older than 90 days, so other question:
How can I reduce the database size?
First of all, my english is pretty bad, so sorry for my english mistakes.
The zabbix get 124 data per second and the databases (postgresql) is around ~70GB.
I configured the housekeeper to delete every data what is older than 90 days.
After few weeks, the database is getting bigger.
I can see this in the log:
Code:
6211:20180531:103436.667 housekeeper [deleted 3002 hist/trends, 0 items/triggers, 142 events, 70 problems, 5 sessions, 0 alarms, 5 audit items in 2.651768 sec, idle for 1 hour(s)]
Code:
delete FROM alerts where age(to_timestamp(alerts.clock)) > interval '90 days'; delete FROM acknowledges where age(to_timestamp(acknowledges.clock)) > interval '90 days'; delete FROM events where age(to_timestamp(events.clock)) > interval '90 days'; delete FROM history where age(to_timestamp(history.clock)) > interval '90 days'; delete FROM history_uint where age(to_timestamp(history_uint.clock)) > interval '90 days' ; delete FROM history_str where age(to_timestamp(history_str.clock)) > interval '90 days' ; delete FROM history_text where age(to_timestamp(history_text.clock)) > interval '90 days' ; delete FROM history_log where age(to_timestamp(history_log.clock)) > interval '90 days' ; delete FROM trends where age(to_timestamp(trends.clock)) > interval '90 days'; delete FROM trends_uint where age(to_timestamp(trends_uint.clock)) > interval '90 days' ;
but NOW its do nothing with 155 days
How can I remove the old data?
UPDATE:
Its my fault, I checked the first lines of the tables and no one of lines older than 90 days, so other question:
How can I reduce the database size?