Drop old config exports? / imported_property growing

Hi,
this specific icinga2 instance with directory is running for some years. We are using fileshipper to regularly do automated imports from various source.

Over time the tables in postgres grew significantly so that the import and sync rules take considerably longer.

From short investigation it seems those rows/properties can not be dropped as they are still referenced by old config deployments.

So the question is. How to i actually expire old data - e.g. config deployments, imported_properties, row_properties, rowsets, row??!

              table_name               | pg_size_pretty | pg_relation_size 
---------------------------------------+----------------+------------------
 imported_property                     | 3504 MB        |       3674374144
 imported_row_property                 | 1727 MB        |       1810620416
 imported_rowset_row                   | 340 MB         |        356548608
 imported_row                          | 223 MB         |        233709568
 director_generated_config_file        | 6224 kB        |          6373376
 director_activity_log                 | 6048 kB        |          6193152
1 Like