Ad Widget

Collapse

Database clean up

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darveesh
    Junior Member
    • Mar 2005
    • 8

    #1

    Database clean up

    Is there a script to clean up the received data values? I don't wish to remove the hosts or the items or the triggers or the actions.

    But any received values, alarms, trends, etc. are fair game.

    If no script exists, can you point to the tables I can safely truncate?

    Thanks.

    Alex.
  • matboy
    Member
    • May 2005
    • 35

    #2
    Would be nice indeed

    Comment

    • jldash
      Junior Member
      • Jun 2005
      • 5

      #3
      I'd like to accomplish the same thing.
      Can I just truncate all the tables that the manual describes as containing 'History' ?

      Comment

      • darveesh
        Junior Member
        • Mar 2005
        • 8

        #4
        I truncated the following tables that are somehow history related:

        ALARMS
        ALERTS
        HISTORY
        HISTORY_STR
        SERVICE_ALARMS
        TRENDS


        history is/can be a MASSIVE table. So watch out. Truncating in mysql on a intel P3 took 2 hours for 8 million records.

        Afterwards, zabbix pages (php) were very slow. Maybe zabbix_suckerd was doing something/recovering from the "blow"... but eventually it normalized...

        Comment

        • festivalman
          Junior Member
          • Mar 2005
          • 10

          #5
          Sounds great. Question though. I've got a 15 gigs db at this point that I'm going to truncate the history for. Do I need to do any other commands after this for the ibdata1 mysql file to shrink or will it happen automatically?

          Comment

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

            #6
            Originally posted by festivalman
            Sounds great. Question though. I've got a 15 gigs db at this point that I'm going to truncate the history for. Do I need to do any other commands after this for the ibdata1 mysql file to shrink or will it happen automatically?
            As far as I know, InnoDB doesn't shrink database spaces automatically even if there is no data.
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • riegersteve
              Member
              • Oct 2004
              • 68

              #7
              and on that note, why must this be InnoDb can you make it Isam

              Comment

              Working...