Search code examples
zabbix

How to reduce history_uint table size in Zabbix database server?


I have a problem that my Zabbix Database server's history_uint table is too long. It takes 57GB space. For that reason, the query takes much more time to execute.

How could I reduce the space and make my query faster?


Solution

  • As the table name suggest, it's where the history values of integer data types are stored.

    The only way to have a smaller table is to store less history.

    The history values do store each item value as it is retrieved/received from the hosts. The are stored as long as the history storage period is defined. The housekeeping then removes these values from the history tables when it is running.

    So either do less frequent data aquisition in your items and/or reduce the time the history is stored.

    Also make sure, that the housekeeping is running and configured correctly.

    https://www.zabbix.com/documentation/4.0/manual/config/items/history_and_trends

    https://www.zabbix.com/documentation/4.0/manual/installation/requirements#database_size