-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
v4.0.7
Feature type
New functionality
Proposed functionality
Event rules can be defined to automatically take a certain action (i.e. execute a custom script or generate an outbound webhook) in response to particular events in NetBox. Five event types are currently defined:
- Object created
- Object updated
- Object deleted
- Job started
- Job completed
This FR proposes enabling NetBox plugin to register their own custom event types, and extending the EventRule model to allow association with these dynamically-registered types.
Some of the initial work toward this functionality has already been completed under #15621.
Use case
As an example, a plugin which tracks network device configurations might introduce a "Configuration changed" event. More generally, this change will also allow more flexibility in defining new event types internally.
Database changes
The set of boolean type_* fields which currently exist on the EventRule model will likely need to be changed to an array of event type names (to accommodate unknown future event types).
External dependencies
None