A
A
Andrey San2014-10-21 14:38:48
MySQL
Andrey San, 2014-10-21 14:38:48

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

4 answer(s)
B
brutal_lobster, 2014-10-21
@brutal_lobster

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

P
Puma Thailand, 2014-10-21
@opium

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

A
Andrey San, 2014-10-22
@admusers

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

T
Talik, 2016-01-21
@Talik0507

if we are talking about MySQL, then the issue of database growth is relevant if you do not optimize the database.
A lot has been written about optimization in the case of MySql
+ partitioning to everything
https://www.zabbix.org/wiki/Docs/howto/mysql_partition

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question