由于zabbix每天收集大量记录,清理过期的数据以提高查询性能。
MySQL -uroot -p 输入mysql密码
use zabbix;
truncate table history;
optimize table history;
truncate table history_str;
optimize table history_str;
truncate table history_uint;
optimize table history_uint;
truncate table trends;
optimize table trends;
truncate table trends_uint;
optimize table trends_uint;
truncate table events;
optimize table events;
注意:此语句会清空zabbix所有历史监控数据,请慎用!
