Friends, help me, zabbix has been with me for a year and has clogged the entire disk, how to delete old data and set zabbix so that it cleans data older than a month
Ad Widget
Collapse
How to set zabbix to delete old data
Collapse
X
-
Hi, in my case, I set a script in crontab in order to purge old data manually:
DELETE FROM history WHERE clock < a date
commit;
analyze table history;
DELETE FROM history_str WHERE clock < a date
commit;
analyze table history_str;
DELETE FROM history_uint WHERE clock < a date
commit;
analyze table history_uint;
#"REDO"
PURGE BINARY LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 7 DAY);
In addition, I have a item to get everyday the database size.
I got this from forums
Regards
Comment
-
Hey buddy, it seems your commands are helpful because the above ones don't work. But I have such a problem with DELETE FROM history_uint
I get such an error lock wait timeout exceeded try restarting transaction
it helped just don't know what's the difference ...
truncate table history;
truncate table history_str;
truncate table history_uint;
truncate table trends;
truncate table trends_uint;
truncate table events;
Can someone explain why it doesn't work?
Administration -> General -> Housekeeping.
Database : MySQLLast edited by przemo2; 01-02-2022, 01:32.Comment
Comment