Ad Widget

Collapse

Zabbix server database growth

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ottow
    Junior Member
    • Sep 2024
    • 13

    #1

    Zabbix server database growth

    Hi,

    We've been running Zabbix (7.0.4) for some months now, and are currently monitoring about 1900 hosts which are a mix of Linux, Windows, Network devices and Selenium Synthetics.
    We are getting quite concerned about the database growth (Postgres), the DB size (on disk) keeps increasing and nothing we do seems to be able to shrink it, or get the growth rate to decrease.
    So far, we have:
    • Ensured Housekeeping is running hourly, deleting items and finishing without any errors. Log extract below:
      3251787:20250212:043020.670 housekeeper [deleted 5624020 hist/trends, 0 items/triggers, 29488 events, 55 problems, 0 sessions, 0 alarms, 33478 audit, 0 autoreg_host, 0 records in 1077.108064 sec, idle for 1 hour(s)]
      3251787:20250212:053020.746 executing housekeeper
      3251787:20250212:061305.413 housekeeper [deleted 5650476 hist/trends, 0 items/triggers, 30349 events, 28 problems, 0 sessions, 0 alarms, 23080 audit, 0 autoreg_host, 0 records in 2564.663256 sec, idle for 1 hour(s)]
      3251787:20250212:071305.513 executing housekeeper
      3251787:20250212:073119.127 housekeeper [deleted 7507300 hist/trends, 0 items/triggers, 20242 events, 35 problems, 1 sessions, 0 alarms, 56760 audit, 0 autoreg_host, 0 records in 1093.610179 sec, idle for 1 hour(s)]
      3251787:20250212:083119.228 executing housekeeper
      3251787:20250212:084822.594 housekeeper [deleted 5720678 hist/trends, 356 items/triggers, 31167 events, 21 problems, 0 sessions, 0 alarms, 13307 audit, 0 autoreg_host, 0 records in 1023.361913 sec, idle for 1 hour(s)]
    • Run Manual Housekeeping, with similar results.
    • Gradually increased the MaxHousekeeperDelete value to a higher value (right now it is at 300000), in hope that it would delete more data
    • Set the Housekeeping periods and overrides as below.
    • Set the Audit log data storage period to 15d
    • Confirmed that the Housekeeping Overrides are actually propagated to the host items.
    Click image for larger version

Name:	image.png
Views:	422
Size:	52.1 KB
ID:	498973

    Despite this, our database keeps growing by about 10GB /24h (on disk) and shows no sign of ever decreasing in size.

    What would be the recommended steps for getting the growth rate under control?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Check intervals for items? It is one way to reduce the amount of data.
    If you check from DB directly, whats the oldest data there? Does it obey the 30d limit there? Partition your DB, so it would be easier to drop old data.

    Having trends and history storage periods the same is kind of pointless.. If you have all the data, you don't really need trends.. Trends compared to history is a very small amount of data..

    Comment

    • ottow
      Junior Member
      • Sep 2024
      • 13

      #3
      Thank you for the ideas, will follow up on this.
      We are already reviewing the intervals set on the templates we use, it is a lot of work but hopefully the end result will be some improvements.
      Last edited by ottow; 14-02-2025, 12:48.

      Comment

      • Megachip
        Junior Member
        • May 2025
        • 16

        #4
        Is there any way to configure zabbix only saving changes to datapoints (instead of everything)?

        Comment

        • PavelZ
          Senior Member
          • Dec 2024
          • 162

          #5
          Yes, you can do this if you configure it for individual items:


          In general, compression in MySQL solves the problem quite effectively. Compression in MySQL is easy to enable and is completely transparent for Zabbix.
          For Postgress it's different. You'll have to configure TSDB.

          Also try to evaluate which templates are less useful. Try this visualization if you have mysql: https://github.com/pavlozt/zabbix-db-auditor/

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            Originally posted by PavelZ
            In general, compression in MySQL solves the problem quite effectively. Compression in MySQL is easy to enable and is completely transparent for Zabbix.
            For Postgress it's different. You'll have to configure TSDB.
            [/URL]
            configuring the TSDB is basically installing the plugin and enabling compression..

            Comment

            • Megachip
              Junior Member
              • May 2025
              • 16

              #7
              Originally posted by PavelZ
              Yes, you can do this if you configure it for individual items:


              In general, compression in MySQL solves the problem quite effectively. Compression in MySQL is easy to enable and is completely transparent for Zabbix.
              For Postgress it's different. You'll have to configure TSDB.

              Also try to evaluate which templates are less useful. Try this visualization if you have mysql: https://github.com/pavlozt/zabbix-db-auditor/
              Will test, thanks a lot.

              But still not understand, why a Computer Model or a type of an CPU is stored every hour ... I wouldn't expect any short time changes there ^^

              Comment

              • PavelZ
                Senior Member
                • Dec 2024
                • 162

                #8
                Obviously, Zabbix is ​also a place for collecting information. In a large company, hardware can be changed suddenly ) That is, without coordination, and this needs to be responded to.

                Comment

                Working...