I have zabbix 2.2.1 and 252 monitors the hosts. Currently, the database is in local and size database is 65GB is running housekeeper who clears history entries older than 30 days. Entries are deleted, and the disk space does not increase.
Please give me some advice how I can fix it.
Regards
Clearly, this is database issue:
Zabbix stores all the processing and historical data in the database, which usually is MySQL InnoDB or PostgreSQL (might be Oracle, but this is not a typical case, but applies same rule).
a) MySQL innodb:
When InnoDB files grow, especially when
innodb_file_per_table
is set tooff
- they might never come back to the real size unless you do dump/restore. This is the way it's designed and the way it works: https://www.percona.com/blog/2013/09/25/how-to-reclaim-space-in-innodb-when-innodb_file_per_table-is-on/b) PostgreSQL:
It will take a time to reclaim disk space, but will never do unless you
vacuum
on the table: http://www.postgresql.org/docs/9.4/static/sql-vacuum.htmlAutovacuum is also available: http://www.postgresql.org/docs/9.4/static/runtime-config-autovacuum.html
Here is a good manual and comparison between different methods: http://www.linuxinsight.com/optimize_postgresql_database_size.html