Ad Widget

Collapse

cleaning database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zabbixazzer
    Junior Member
    • Jul 2006
    • 15

    #1

    cleaning database

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

    Code:
    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!!
  • edeus
    Senior Member
    • Aug 2005
    • 120

    #2
    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.

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      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

      Comment

      • korgano
        Junior Member
        • Apr 2006
        • 7

        #4
        ibdata1 size huge

        Hi,

        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?

        tia
        korgano

        Comment

        • Godzilla
          Junior Member
          • Aug 2005
          • 24

          #5
          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:
          http://bugs.mysql.com/bug.php?id=1341

          some instructions:
          http://dev.mysql.com/doc/refman/5.0/...-removing.html

          Comment

          Working...