Skip to content

Include more context in Event Rules #14896

Open
@llamafilm

Description

@llamafilm

NetBox version

v3.7.0

Feature type

Change to existing functionality

Proposed functionality

When triggering a Python script using Event Rule, I'd like to have access to more context, just like Webhooks have. Currently the script only gets the data object. Webhooks also have:

  • event
  • username
  • model
  • snapshots

Use case

I want to log the username to have an audit trail. I also want to log whether the script was run manually or by an event rule.
I want to use the snapshot data to build more complex conditions into the script. For example, the event rule triggers on every device update, and the script updates my monitoring system. But I only want it to run if certain key fields were changed, like the name or status. Because other fields like airflow are irrelevant for monitoring.

Database changes

No response

External dependencies

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    netboxstatus: blockedAnother issue or external requirement is preventing implementationtopic: event rulesFor issues related to the Event Rules featuretype: featureIntroduction of new functionality to the application

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions