Ad Widget

Collapse

Housekeeping not ( completely ) working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pigi_102
    Member
    • Sep 2021
    • 36

    #1

    Housekeeping not ( completely ) working.

    Hello all,
    I'm facimng a strange situation.
    I have inherited a zabbix installation ( was a 3 version very bad maintained ) that I cleaned a bit and upgraded, step by step to 7.0.x
    Db was around 2Tb and by deleting a lot of not needed stuff I cleaned up to 800G. Db is postgres.
    Upgrade and cleaning has been done almost one year ago so it should have plenty of time to "housekeep" everything.
    I've then configured housekeeping like in this image:

    Housekeeping seems to have no problem at all. Here latest log:
    Code:
      2343:20260806:033203.128 executing housekeeper
      2343:20260806:035148.258 housekeeper [deleted 4163522 hist/trends, 0 items/triggers, 16170 events, 414 problems, 0 sessions, 0 alarms, 185 audit, 685 autoreg_host, 0 records in 1185.117584 sec, idle for 1 hour(s)]
      2343:20260806:045148.351 executing housekeeper
      2343:20260806:050924.441 housekeeper [deleted 4262054 hist/trends, 0 items/triggers, 16603 events, 407 problems, 0 sessions, 0 alarms, 0 audit, 674 autoreg_host, 0 records in 1056.078489 sec, idle for 1 hour(s)]
      2343:20260806:060924.537 executing housekeeper
      2343:20260806:062137.647 housekeeper [deleted 4191647 hist/trends, 123 items/triggers, 15983 events, 395 problems, 0 sessions, 0 alarms, 8 audit, 680 autoreg_host, 0 records in 733.095292 sec, idle for 1 hour(s)]
      2343:20260806:072137.745 executing housekeeper
      2343:20260806:073246.614 housekeeper [deleted 3872422 hist/trends, 60 items/triggers, 15663 events, 401 problems, 0 sessions, 0 alarms, 20 audit, 690 autoreg_host, 0 records in 668.858428 sec, idle for 1 hour(s)]
      2343:20260806:083246.716 executing housekeeper
      2343:20260806:084817.869 housekeeper [deleted 3818375 hist/trends, 123 items/triggers, 16112 events, 458 problems, 0 sessions, 0 alarms, 40 audit, 684 autoreg_host, 0 records in 931.140151 sec, idle for 1 hour(s)]
    I've noticed that events in my DB goes back to 2013 so 10 years back.
    Code:
    zabbix=# SELECT to_char(to_timestamp(MIN(clock)), 'DD/MM/YYYY') AS oldest_alert_date FROM alerts;
     oldest_alert_date
    -------------------
     12/03/2016
    
    (1 row)
    ​zabbix=# SELECT to_char(to_timestamp(MIN(clock)), 'DD/MM/YYYY') AS oldest_event_date FROM events;
     oldest_event_date
    -------------------
     10/12/2013
    (1 row)
    ​
    Same goes for alerts and I suspect other stuffs.​
    What's the best way to clean this mess without loosing the wanted number of days as in housekeeping configuration ?

    Thanks in advance
    Pierluigi
Working...