Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-6089

Increase the housekeeper limit for deleting items (or make it a config variable)

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 2.0.4
    • Server (S)

      In src/zabbix_server/housekeeper/housekeeper.c the following is defined on line 236:
      min_clock = MIN(now - keep_history * SEC_PER_DAY, min_clock + 4 * CONFIG_HOUSEKEEPING_FREQUENCY * SEC_PER_HOUR);

      This has a drawback: if you change an item from the default "keep history in days" of 60 to, say, 2, it will take a very long time for all the old data to be cleared. I suggest to change that to:
      min_clock = MIN(now - keep_history * SEC_PER_DAY, min_clock + 32 * CONFIG_HOUSEKEEPING_FREQUENCY * SEC_PER_HOUR);

      In the current code, if you have hourly housekeeping running, it'll only delete the "currently lowest clock value + 4 hours" worth of data. If changing the History-retention from 60 days to 2, this takes a very long time

      Either the hard-coded value of 4 should be config parameter with sufficient warnings about the possibility of table- and transaction logs, or the default value should be increased slightly just to speed up the clearing of old history.

            Unassigned Unassigned
            mattiasgeniar Mattias Geniar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: