Replies: 1 comment
-
|
So a list of excluded models would make sense. Eg dcim.device could be added to an array in the config file and thus skip the delection of changes for that model |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem / Motivation
Currently, NetBox does not offer a mechanism to delete change log records (ObjectChange) directly from the GUI. My organization require indefinite retention (CHANGELOG_RETENTION = 0) for auditing purposes, yet they occasionally need to purge specific, old, or bulk log entries to manage database size and performance.
The only way to delete records is via the nbshell or direct database manipulation, which is generally discouraged, less user-friendly, and requires backend access.
Proposed Solution
Introduce a function to allow Superusers (users with the is_superuser flag) to perform granular deletion of change log records through the NetBox GUI.
Add a "Delete Selected Changelog Records" bulk action option to the Change Log.
This action would be accessible only to users marked as Superusers.
The standard confirmation dialog would appear, prompting the user to acknowledge the permanent removal of the selected log entries.
To enable efficient bulk deletion, the UI filters should be leveraged. Superusers could:
Filter by Time (e.g., all changes older than 365 days).
Filter by User (e.g., logs created by a retired automation account).
Filter by Content Type (e.g., changes related only to a specific model).
Then, use the Select All checkbox combined with the new Bulk Delete action.
Benefits
Improved Database Maintenance: Organizations that must keep CHANGELOG_RETENTION = 0 can still manage the growth of the extras_objectchange table without resorting to risky direct SQL queries.
Enhanced User Experience: Provides a safe, native NetBox way to manage logs, requiring only Superuser access instead of command-line access.
Auditing Flexibility: Allows selective purging of logs while maintaining overall long-term retention requirement.
Beta Was this translation helpful? Give feedback.
All reactions