Skip to content
DashboardWebsite

Data Retention

This page explains OpenTremor’s retention periods and how a platform superadmin can change them. Telemetry and audit events expire through MongoDB TTL indexes. Findings, review feedback, and raw resource content are handled by an application sweep.

DataSettingDefaultBehavior
Telemetry spans and usage eventstelemetry_days30 daysExpire through a MongoDB TTL index.
Audit eventsaudit_days730 daysExpire through a separate MongoDB TTL index.
Resolved low, medium, info, and unknown severity findingsfinding_low_medium_days180 daysThe sweep purges eligible terminal findings after this period.
Resolved high and critical severity findingsfinding_high_critical_days730 daysThe sweep purges eligible terminal findings after this period.
Raw analyzed resource contentresource_content_days90 daysThe sweep redacts the raw resources.value content and embedded finding evidence. It keeps the resource document, analysis, and findings.
Review feedbackfeedback_days730 daysThe sweep purges review feedback after this period.
Refused network access eventsnetwork_events_days7 daysExpire through a MongoDB TTL index. Each event contains a client IP address.

The day settings can be changed through PATCH /v1/admin/settings. telemetry_days accepts 1–365 days; audit_days accepts 30–3650 days. Each of the finding, resource content, and feedback settings accepts 1–3650 days. network_events_days accepts 1–90 days.

Open and needs-review findings are never purged, regardless of age or severity. The sweep only purges findings with terminal statuses: acknowledged, suppressed, false positive, or closed.

When a revision’s analysis completes, findings it no longer reports are closed. A closed finding ages out based on its severity’s retention period, measured from when it was last seen. The findings list omits closed findings unless you filter on status=closed. See Revision history.

Two settings control when the sweep runs:

SettingDefaultBounds
sweep_enabledtrue—
sweep_interval_hours24 hours1–168 hours

Changes to telemetry_days and audit_days update the running system’s TTL indexes immediately. They do not require a restart or another prepare step.

Changes to finding, resource content, and feedback periods take effect on the next sweep. A MongoDB TTL index cannot express conditions based on status, severity, and age, so the application sweep handles these records.

Core does not run a scheduler. The standalone Task Scheduler calls POST /v1/admin/retention/run on a heartbeat. The endpoint skips work if sweep_enabled is false or the configured interval has not elapsed. In those cases it returns the previous result with skipped: true.

In the dashboard: Platform Admin → System → Data Lifecycle. Select Run sweep now to force a sweep, or call POST /v1/admin/retention/run?force=true. Both require a platform superadmin. See Platform Admin — Running a retention sweep manually for the endpoint reference, including GET /v1/admin/retention/status.

In the dashboard: Platform Admin → System → Data Lifecycle. To update settings through the API, send a PATCH /v1/admin/settings request:

Terminal window
curl -X PATCH http://localhost:8000/v1/admin/settings \
-H "X-API-Key: <admin-key>" \
-H "Content-Type: application/json" \
-d '{
"retention_audit_days": 1825,
"retention_finding_high_critical_days": 1825,
"retention_resource_content_days": 30,
"retention_feedback_days": 400
}'

Set a field to null to clear its override and use the hardcoded default. See Configuration Reference — Platform settings.

Findings whose resources are no longer present in the current changeset state are not automatically marked stale. The severity, status, and age based purge rules described above still apply.

Org offboarding deletes organization data through a separate cascade. See Platform Admin — Deleting an organization.