You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Bulk Deletion Action on the Changelog List
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.
Filtering Options for Deletion
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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