No announcement yet.

cleaning database

  • Filter
  • Time
  • Show
Clear All
new posts

    cleaning database

    I use the following commands to clean zabbix 1.1 database, and it seems to work.

    TRUNCATE TABLE zabbix.acknowledges;
    TRUNCATE TABLE zabbix.alarms;
    TRUNCATE TABLE zabbix.alerts;
    TRUNCATE TABLE zabbix.auditlog;
    TRUNCATE TABLE zabbix.escalation_log;
    TRUNCATE TABLE zabbix.history;
    TRUNCATE TABLE zabbix.history_log;
    TRUNCATE TABLE zabbix.history_str;
    TRUNCATE TABLE zabbix.history_text;
    TRUNCATE TABLE zabbix.history_uint;
    TRUNCATE TABLE zabbix.service_alarms;
    TRUNCATE TABLE zabbix.stats;
    TRUNCATE TABLE zabbix.trends;
    please anybody tell me if there is something wrong!!

    Is there any way to clean the database by selecting item types?

    It would be really useful to be able to set certain item's to never be cleaned, whereas 75% of my history table really needs cleaning.


      ZABBIX 1.1 and ZABBIX 1.1.1 are both affected by a quite serious problem - they do not correctly perform housekeeping. It basically means that housekeeper does not delete outdated data as it should do. Please wait for 1.1.2.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter


        ibdata1 size huge


        my ibdata1-file got 4GB big in size. Now I have truncated the history-table to cleanup, but ibdata1 keeps at the same size (phpmyadmin shows "InnoDB free: 4171776 kB").

        Since I am not familiar with innodb, I can only guess that innodb allocates disk space once, extending automatically, but not "contracting" automatically.

        Is there a way, I can tell innodb to free that disk space not used?



          basically I read that it cannot shrink.
          You need to back up the data, remove the file, create a new one, and restore.
          (You may want to do some more investigating also.)

          "It doesn't shrink" bug:

          some instructions: