Improve automatic inventory disk cleanup
Hi,
at the weekend it happened again that the filesystem ~/var/check_mk/inventory_archive almost filled up. This happens every now and then and apparently checkmk does not clean up there by itself. I would wish that the automatic disk cleanup is improved and also takes such files/folders into account when cleaning up.
regards
Christian
Comments: 7
Oldest
•
Newest
•
Most likes
•
Fewest likes
-
27 May
Marcel Arentz AdminHighlighted comment
Hi Christian,
this feature has been released with Checkmk 2.5 -
25 Jun, '24
Lars SörensenPlease add also a "Cleanup abandoned service files" Function that removes files (RRD, Info, etc.) of removed/renamed Services like the "Cleanup abandoned Host" Function dos for removed Host.
-
13 Dec, '24
Andy MarshIt would be really useful if cleaning up the archive files could be done not only on a time based basis, but on a number based basis. I.e. I would like to keep 1 file archived + the current file. we have devices that do not update for months which means a time based set-up does not work for us too well - For example:
If we set it to 3 months, we would have some devices that will create 90 (1 per day say) inventory files, but this keeps the inventory files for the longer devices
If we set it to 2 days, we would end up deleting the irregularly updated devices.
As the inventory data in our case is only capturing the check mk plugin versions and memory/cpu (we aren't using mk_inventory at all) then we don't need to be too fussy about specifically "when" the inventory file has changed, just that it a capture "before" any future change. -
09 Jul, '25
Bernd Holzhauer MergedAfter a few months, the inventory archive takes up a lot of space in the file system, so it would be nice to have a cleanup job that cleans it up after a configurable time or directory size and frees up space again. Currently, you have to clean it up manually:
https://forum.checkmk.com/t/inventory-archive-cleanup-script-usage/54684 -
21 Jul, '25
Mohamed Saleh System"Integration of CleanUp job for Inventory Archive" (suggested by <Hidden> on 2025-07-09), including upvotes (2) and comments (1), was merged into this suggestion.
-
28 Jul, '25
Martin Hirschvogel AdminHello,
this was implemented and will be available in 2.5
https://checkmk.com/werk/18049
Due to the massive changes, this might not be ported to 2.4
Martin