Ad Widget

Collapse

Database Growing quickly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sbdcunha
    Junior Member
    • May 2023
    • 20

    #1

    Database Growing quickly

    Dear All,
    I have the below Zabbix Server and its working fine but I feel the database is growing recently

    zabbix_server (Zabbix) 6.4.2

    my house keeping all entries were earlier 180 days but I just reduced it to 10 days 2 days before just to see if the database growing is reduced but no luck it just grows
    I also have in zabbix.conf the below

    HousekeepingFrequency is default
    MaxHousekeeperDelete=500 changed from default

    I dont really know if the housekeeping is running automatically and is there a way I can check if housekeeping is running by checking some logs

    also I would like to run it manually .. appreciate the command syntax

    Would be grateful for advice or any link that would help me to reduce the the size of the below files specially the history file

    Below the files which consume the max space and history file being the biggest

    -rw-r----- 1 mysql mysql 62117642240 Aug 1 08:03 history_uint.ibd
    -rw-r----- 1 mysql mysql 1598029824 Aug 1 08:03 trends_uint.ibd
    -rw-r----- 1 mysql mysql 163577856 Aug 1 08:03 items.ibd
    -rw-r----- 1 mysql mysql 583008256 Aug 1 08:00 auditlog.ibd

    Thanks and Regards

    Simon

  • gofree
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2017
    • 400

    #2
    if you search the forum/blog/web.youtube you'll find all the answers - this topic has been discussed countless times - in short mysql doesnt clean space in default settings - thats why people use partitioning ( custom mysql ) or out of the box ( timescaledb )



    https://blog.zabbix.com/partitioning...cedures/13531/
    https://blog.zabbix.com/zabbix-time-...escaledb/6642/
    https://blog.zabbix.com/how-to-deplo...-plugin/13668/


    Comment

    • sbdcunha
      Junior Member
      • May 2023
      • 20

      #3
      Dear All,

      The issue is resolved
      After googling around and testing i found that SQL partitioning needed and the below procedure works perfect even though there are other links as mentioned above
      Just follow the below link regarding partitioning of mysql and it solved my issue like a charm

      In this tutorial we will learn, step by step, how to partition Zabbix database (history and events tables) on MySQL or MariaDB.


      I managed to free more than 25GB and also now the space increases very very slow..

      Also the mysql .binary files by default setting is disabled which also take a huge space
      Limiting the bin files to say 7 or 10 days will also save huge amount of space
      use expire logs days command to set a value


      Regards

      simon

      Comment

      Working...