Answer the question
In order to leave comments, you need to log in
How to properly configure database cleanup in Zabbix?
Good afternoon, I have about 350Mb of events in the database every day in Zabbix, in connection with this, the place will end soon.
Question:
1. How to properly organize a backup of data for the last 24 hours and clear the database from the end in 24 hours? and will it affect the work of zabbix if I work directly with mysql?
1.1 Why didn't delete from history_log where itemid=24511 work? the result of df -h before and after shows the same value.
2. I heard that Zabbix cleans itself, where can I see it to check if it really cleans?
Answer the question
In order to leave comments, you need to log in
Do you need so many events? There are too many metrics in default templates :)
Look towards zabbix partitioning and zabbix housekeeping
www.zabbix.org/wiki/Docs/howto/mysql_partition
There is an excellent huyabix site, which describes in detail the process of proper huaskipping on your own zabbix database, and it works quickly and does not slow down.
huyabbix.com
Guys, the size of the history_log test table was 96Kb,
did delete from history_log where itemid=24511 and commit
and the size became 48Kb,
now it turns out you can do this:
mysqldump -quick -u root -p -f zabbix history_log > /tmp/zabbix/history_log.sql
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question