zabbix历史记录一般是这几个表
清理历史记录就是清理这几个表
简单粗暴清理
直接重建表
TRUNCATE TABLE history;
OPTIMIZE TABLE history;
TRUNCATE TABLE history_uint;
OPTIMIZE TABLE history_uint;
TRUNCATE TABLE history_str;
OPTIMIZE TABLE history_str;
TRUNCATE TABLE history_text;
OPTIMIZE TABLE history_text;
按日期清理
例如:清理一个月前的数据 当前时间 2022-08-15
访问 时间戳转换工具 转换时间戳
DELETE FROM history WHERE clock < 1657857865;
DELETE FROM history_uint WHERE clock < 1657857865;
DELETE FROM history_str WHERE clock < 1657857865;
DELETE FROM history_text WHERE clock < 1657857865;
最后重启服务
systemctl start zabbix-server
标签:TRUNCATE,清理,zabbix,TABLE,历史数据,history,OPTIMIZE,DELETE
From: https://www.cnblogs.com/guangdelw/p/17401295.html