Skip to content

Documentation

Cleanup Rules

Define which stale assets to remove, preview how many match, and run the cleanup by hand or on a schedule.

Overview

Cleanup rules keep your inventory free of assets that no longer exist. A rule describes a stale asset, for example one that has not been seen for 90 days. You preview how many assets match, then run the cleanup to remove them, either by hand or automatically on a schedule. Open Admin → Cleanup Rules to manage the rules for your tenant.

Cleanup permanently deletes the matching assets and their observations. Always run Preview first and check the count before you run a cleanup.

Screen tour

  1. Search rules by name, description or condition: filters every column as you type. If nothing matches, click Clear search.
  2. New Rule: opens the Create Rule panel. See Create a rule.
  3. Draft: rules that are switched off. They never run, and you can’t preview them. Click Activate on a card to move it to Active.
  4. Active: active rules without a schedule. You preview and run them by hand.
  5. Scheduled: active rules with a cron schedule. They run automatically on their schedule, and you can also preview and run them by hand.
  6. Condition: what makes an asset stale for this rule, for example Stale for more than 90 days or Last seen before 2026-01-31.
  7. Previewed: N in scope: how many assets the last preview found. The card also shows when the rule last ran (Last run 5m ago), its cron schedule, or Never run.
  8. Preview: counts the matching assets without changing anything. See Preview a rule.
  9. More actions: opens the rule menu with Run cleanup…, Execution history, Edit rule, Add schedule, Move to draft and Delete rule.
  10. Execution history: the five most recent runs of the rule, with their status and counts.

Each column header shows how many rules it holds. An empty column shows No draft rules, No active rules or No scheduled rules. When you have no rules at all, the page shows No cleanup rules configured and a Create your first rule button.

Create a rule

  1. Click New Rule. The Create Rule panel opens.
  2. Enter a Name, for example Stale servers over 90 days.
  3. Optionally, enter a Description.
  4. Under Condition, choose how to find stale assets:
    • Stale for (days): enter a number of days. Assets not seen for longer than that match.
    • Last seen before: pick a date. Assets last seen before that date match.
  5. Leave Active on to put the rule on the board ready to run, or switch it off to save the rule as a draft.
  6. Optionally, switch on Schedule automatic execution and enter a Cron expression. See Schedule a rule.
  7. Click Create Rule.

The message Rule created confirms the save, and the card appears in the Draft, Active or Scheduled column. Click Cancel, the close button or press Esc to close the panel without saving.

Preview a rule

A preview is a dry run. It counts the assets that match the rule’s condition across your tenant and changes nothing.

  1. On an Active or Scheduled card, click Preview. The button shows Previewing… while it runs.
  2. Read the result. A message such as Preview complete — 12 assets in scope appears, and the card shows Previewed: 12 in scope.

The preview is recorded in the rule’s Execution history and updates Last run. It also unlocks Run cleanup… for the rule.

Run a cleanup

  1. Run cleanup…: opens the delete confirmation. Until you preview the rule, the menu shows Run a preview to enable cleanup. and the item is unavailable.
  2. Execution history: shows or hides the rule’s recent runs on the card.
  3. Edit rule: opens the Edit Rule panel. On a scheduled rule this item is Edit schedule.
  4. Add schedule: opens the Edit Rule panel with Schedule automatic execution switched on. Shown on Active rules.
  5. Move to draft: switches the rule off and moves it to Draft.
  6. Delete rule: deletes the rule after you confirm.
  1. Click Preview on the rule and check the number of assets in scope.
  2. Click the More actions button on the card, then click Run cleanup….
  3. Read the Permanently delete assets? dialog. It names the rule and the number of assets in scope from your preview.
  4. Click Delete N assets to run the cleanup, or Cancel to close the dialog without changing anything.

  1. The rule name and the number of assets the cleanup removes. Cleanup uses a hard delete, so removed assets cannot be restored.
  2. Cancel: closes the dialog. Nothing is deleted.
  3. Delete N assets: runs the cleanup. The button shows Deleting… while it runs.

When the cleanup finishes, a message such as Cleanup complete — 12 assets removed appears and the run is added to Execution history. The cleanup removes every asset that matches the condition at the moment it runs, together with the asset’s observations.

Schedule a rule

A scheduled rule runs automatically. Each scheduled run removes the assets that match the condition at that moment, like Run cleanup…, and is recorded in Execution history.

  1. On an Active card, open More actions and click Add schedule. On a scheduled card, click Edit schedule.
  2. Make sure Schedule automatic execution is On.
  3. Enter a Cron expression in standard five-field cron syntax. The default 0 3 * * * runs daily at 3 AM.
  4. Click Update Rule.

The rule moves to the Scheduled column and its card shows the cron expression. Only active rules run on their schedule: a rule in Draft keeps its schedule but doesn’t run until you activate it. To stop the schedule, edit the rule and switch Schedule automatic execution off, or click Move to draft.

Edit, activate or move a rule to draft

  • Edit: open More actions and click Edit rule (or Edit schedule). Change any field in the Edit Rule panel and click Update Rule. The message Rule updated confirms the change.
  • Activate: on a Draft card, click Activate. The message Rule activated appears and the rule moves to Active, or to Scheduled if it has a schedule.
  • Move to draft: open More actions and click Move to draft. The message Rule moved to draft appears. A draft rule keeps its condition and schedule.

Delete a rule

  1. Open More actions on the card and click Delete rule.
  2. In the Delete this rule? dialog, click Delete rule to confirm, or Cancel.

Deleting a rule stops its scheduled cleanup. Assets already removed by past runs are unaffected. The message Rule deleted confirms the deletion.

View the execution history

  1. Open More actions on the card and click Execution history.
  2. The card lists the five most recent runs. Each row shows the status, Preview (assets in scope), Removed (assets deleted) and how long ago the run happened. Hover the time to see the exact date.
  3. Click Execution history again to hide the list.

If the rule has never run, the list shows No executions yet. After you preview or run a rule, the card header also shows a badge for the latest run, for example 12 in scope or 12 removed.

Fields

FieldDescriptionRules
NameThe rule name shown on its card.Required.
DescriptionA short note shown under the name.Optional.
ConditionStale for (days) with a number of days, or Last seen before with a date. Assets not seen within this period are included in preview and cleanup.Required. Days must be a whole number of 1 or more. Default 90 days.
ActiveWhether the rule is on the board ready to preview, run and follow its schedule. Off saves the rule as a draft.On by default.
Schedule automatic executionRuns the rule automatically.Off by default.
Cron expressionWhen the scheduled rule runs.Required when the schedule is on. Standard cron syntax. Default 0 3 * * * (daily at 3 AM).

Statuses

Rule columns

ColumnMeaningNext possible column
DraftThe rule is switched off. It doesn’t run and can’t be previewed.Active or Scheduled (click Activate)
ActiveThe rule is on and has no schedule. You preview and run it by hand.Scheduled (add a schedule), Draft (Move to draft)
ScheduledThe rule is on and runs automatically on its cron schedule.Active (turn the schedule off), Draft (Move to draft)

Execution statuses

StatusMeaningNext possible status
running (Running)The preview or cleanup is in progress.completed or failed
completedThe run finished. On the card badge, a preview shows N in scope and a cleanup shows N removed.—
failed (Failed)The run stopped with an error, for example an invalid condition. Nothing was deleted.—