Ad Widget

Collapse

zabbix and mysql do not get along...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brgsousa
    Junior Member
    • Apr 2011
    • 6

    #1

    zabbix and mysql do not get along...

    Hi everyone!
    Although there is a lot of discussion about this topic, I could not find something that could help me.
    How can I erase old history from zabbix? And how can I clean mysql garbage that insist to remain even after that?

    regards,
    Bruno
  • marcel
    Senior Member
    Zabbix Certified Specialist
    • Oct 2010
    • 112

    #2
    log into mysql through mysql command-line interface
    use zabbix database and delete entries in tables

    | history |
    | history_log |
    | history_str |
    | history_text |
    | history_uint |


    marcel
    Zabbix Certified Specialist for Large Environments since 12/2010

    Comment

    • brgsousa
      Junior Member
      • Apr 2011
      • 6

      #3
      I did erase all records from those tables but mysql file (/var/lib/mysql/ibdata1) does not reduce

      Comment

      • marcel
        Senior Member
        Zabbix Certified Specialist
        • Oct 2010
        • 112

        #4
        And it will not reduce as InnoDB does not work that way. The only way to reduce InnoDB database properly is to dump the data into external file, recreate database structure and inport the data back into the database.

        InnoDB does not work as MyISAm - it will not reduce (file-sice wise) if you delete records, it will only make already allocated filespace available for different inserts.

        Marcel
        Zabbix Certified Specialist for Large Environments since 12/2010

        Comment

        • brgsousa
          Junior Member
          • Apr 2011
          • 6

          #5
          is it ok if I recreate zabbix tables using MyISAM?

          Comment

          • marcel
            Senior Member
            Zabbix Certified Specialist
            • Oct 2010
            • 112

            #6
            Originally posted by brgsousa
            is it ok if I recreate zabbix tables using MyISAM?
            hmm, you can try

            should work with smaller datasets

            marcel
            Zabbix Certified Specialist for Large Environments since 12/2010

            Comment

            Working...