Werk #12830: Cleanup abandoned user profile directories after 30 days

Komponente GUI
Titel Cleanup abandoned user profile directories after 30 days
Datum 07.05.2021
Checkmk-Editon Checkmk Raw (CRE)
Checkmk-Version 2.1.0i1 2.0.0p4
Level Kleine Änderung
Klasse Neues Feature
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen

Each user that is able to log into the Checkmk GUI gets a user profile directory created below var/check_mk/web/[user_id].

During deletion of a user, the profile directory is not deleted automatically. This is done to prevent loss of user configurations when users are deleted accidentally and recreated later.

While this is helpful for the case mentioned above, this may result in abandoned user profile directories. Especially in the case where a large number of users was created (e.g. by an LDAP synchronization) and later removed, this could lead to a large number of directories. With a large number of directories, this may even affect the performance of different parts of the GUI.

The now introduced housekeeping logic will detect all directories not belonging to an existing user. For each of these directories it will find the most recent modified file. In case this file modification is older than 30 days, the profile directory will be deleted.

Zur Liste aller Werks