Zabbix no free space on disk

6,611

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 to off - 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.html

Autovacuum 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

Share:
6,611

Related videos on Youtube

Mick
Author by

Mick

Updated on September 18, 2022

Comments

  • Mick
    Mick almost 2 years

    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

    • Gryphius
      Gryphius over 10 years
      you should probably give more information about your database backend. for example mysql with InnoDB default configuration is known for this behaviour. stackoverflow.com/questions/3456159/…