Ad Widget

Collapse

Auditlog huge - can I just delete rows from that database table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jjeff123
    Member
    • May 2022
    • 33

    #1

    Auditlog huge - can I just delete rows from that database table?

    I've had 6.04 for over a year. Converted to timescale because I assumed I just had a lot of data. no, I have 231GB of auditlogs which were never cleaned up due to the bug fixed in 6.06.

    I don't want to delete the table, I'd like to keep at least a couple weeks worth of data.
    Can I do something like
    delete from auditlog where clock < [unix timestamp of last month]

    or will deleting by hand from the auditlog cause problems?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You can set limits to auditlog... Administration-> general-> audit log. By default its 365 days I think... Then housekeeper should take care of it.

    Comment

    • jjeff123
      Member
      • May 2022
      • 33

      #3
      Originally posted by cyber
      You can set limits to auditlog... Administration-> general-> audit log. By default its 365 days I think... Then housekeeper should take care of it.
      I did that setting, it's at 30 days now, but but my audit log has 373 million records and housekeeper is cleaning up 145K every other hour. So I'll only need another 220 days of housekeeping. Hence my desire to hurry that process up.

      Comment

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

        #4
        Personally, I don't think anything goes wrong, if you just delete older records directly... waiting 220 days is bit too much..

        Comment

        • jjeff123
          Member
          • May 2022
          • 33

          #5
          Yes, thanks. that's what I did.I'm going to post something in the cookbooks forum.

          Comment

          Working...