VMmanager Knowledge Base
en En
es Es

How to set up the period for automatic deletion of notifications

Description

The article contains instructions for the following scenarios:

  • how to delete entries from the VMmanager notification center;
  • how to set the notification lifetime;
  • how to set up the period for automatic deletion of notifications.

Solution

Only automatic deletion of notifications is available in VMmanager. By default, entries from the Notifications → All notifications are automatically deleted after 30 days. You can set a different period for automatic deletion of notifications by adding a patch. This setting will make the Notifications section more informative and save free space on the server with the platform.

Note
After changing the auto-delete period, outdated records will be deleted automatically. This will happen when the next notification is received.

To set up the period for automatic deletion of notifications:

  1. Connect to the server with the platform via SSH. For more information about connecting via SSH, see Workstation setup.
  2. Create the patch file /opt/ispsystem/vm/patch_notificationttl.yaml with the following content:
    version: "3.5"
    services:
      vm_box:
        environment:
          NOTICE_LIFETIME_DAYS: <N_days>
    Comment
  3. Apply the patch:
    sudo vm add-patch -p=notificationttl -f /opt/ispsystem/vm/patch_notificationttl.yaml
  4. Check that the changes have been applied:
    sudo docker exec vm_box env | grep NOTICE_LIFETIME_DAYS 

    If the patch is applied successfully, the terminal will yield a new value for the variable NOTICE_LIFETIME_DAYS.

    Example output
    NOTICE_LIFETIME_DAYS=<N_days>
    Comment
Useful tips

Related topics: