Webhooks No Longer Triggering after v3.7.0 Upgrade/Event Rule Migration #14764
Replies: 5 comments 24 replies
-
Could you provide the rule and webhook (sanitize as required obvivously)? I do have a webhook (that does nothing) and that appears to be working as intended |
Beta Was this translation helpful? Give feedback.
-
Here is the webhook that the event rule should be calling: If there's a better way to provide the settings than screenshots please let me know. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@eramnes @adparis99 What was the earlier NetBox version you had before upgrading to 3.7.0? |
Beta Was this translation helpful? Give feedback.
-
@candlerb @markkuleinio I believe I've found a way to replicate the behavior I and @eramnes have been seeing in the NetBox demo instance. To put it succinctly, I suspect that when multiple event rules with different conditions are applied to a single model, only the first event rule is being evaluated (and executed, should the condition match). In my example, I'm using dcim.interface as the model, and the 802.1x mode as the conditions (access, tagged, and tagged-all). In my testing, event rules do not trigger (or more specifically, a webhook is not generated) for tagged interfaces after following these steps, but they do trigger for access interfaces:
If I swap the conditions between the two rules - that is, I put the tagged condition on the first event rule that I created, and access on the second rule - the behavior swaps as well. I can then generate webhooks for tagged interfaces, but not for access. |
Beta Was this translation helpful? Give feedback.
-
We have encountered a maybe related issue. Recently upgraded our netbox prod instance from 3.6.6 to 3.7.1. Doing a bulk edit on 2 interfaces resulted in only one webhook. Expected are 2 webhooks, one for each interface. Unfortunately I wasn't able to reproduce this with the following steps:
Importing our database into a fresh 3.7.1 docker netbox instance recreates this problem. Was also thinking this could be a problem with having multiple webhooks for the same object types (we currently have 3 webhooks for interface object types). But this was also not reproducible. The solution for us was to delete all the event rules and recreate them. Afterwards all bulk edits produced the expected webhooks for all edited objects. Posting this mostly if other users happen to have a similar problem. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We have been using Netbox for a while now and had set up some webhooks to call some APIs to perform actions on object updates. These had been working great.
We recently updated to v3.7.0 and with the migration to Event Rules, it seems the webhooks no longer trigger on object update. The auto-creation of the Event Rules from the conditions on the old webhooks was successful, and the conditions are still there, but changing an object so that it would trigger the Event Rule does nothing.
I've checked the request queue after making a change that should match an Event Rule, and there's no request that shows up there, in any state (active, finished, failed, scheduled). I've verified that netbox-rq is running, and the PIDs for the workers show in the request queue interface. I also tried creating a brand new Event Rule with the same conditions and pointing it to the old webhook but that didn't seem to make a difference. We are using custom Status values as the condition for the Event Rule, but I tried using a provided value instead and that didn't seem to help.
Given that I haven't seen anyone else report this as an issue, I think I must be doing something wrong. Can anyone point me in the correct direction? I've tried turning logging on for Netbox and Django but I don't see anything that stands out as having to do with webhooks or Event Rules. If you need any further info I would be happy to provide that.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions