-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managed Records do not trigger event rules for netbox_dns | record object type #246
Comments
That's interesting - I can't reproduce this at all.
There is a known problem with Event Rules/Webhooks, but that results in too many invocations with wrong data (see #89). Actually it is next to impossible to avoid Webhooks being triggered, because it's internal functionality in NetBox. What does the change logs say? Have the records actually been updated? And how do you detect the triggering of the webhook? |
Did you create a manual record in your test (I notice it's a CNAME which is not one the fields the coupling/managed records handles?). I'm monitoring the jobs as well as the logs of the netbox worker. Also, I'm triggering a script.. not a webhook. The change log do show as the record as updated but the initial creation doesn't show up in the change log (if it's supposed to). |
Hi @aaronhuff, thanks for the update. In fact I created an IP address with an associated DNS record, and got a much longer series of Webhook invocations - The The change log should contain separate entries for the creation and updates of all records. But for my question it's sufficient to know that there are change log entries for the record, so it was definitely written to the database. Event rules operate within NetBox for all models inheriting from The next step would be to get your script out of the picture to make really sure the event rule has been triggered. Could you please create a webhook like this: ![]() and add it to your event rule: ![]() Then, start the webhook receiver via (netbox) [root@dns netbox]# /opt/netbox/netbox/manage.py webhook_receiver
Listening on port http://localhost:9000. Stop with CONTROL-C. Now you can create or update an IP address with an associated DNS record. The output of the test receiver should look like this (full text this time):
Four webhooks were triggered:
That's pretty much what was to be expected. If you can confirm this, the issue is not with the event rule, but in a later stage of the processing pipeline - either a problem with the script or with NetBox being unable (or unwilling) to execute it. |
Thanks, I followed your very details steps and was able to see a webhook trigger on my worker node. Let me continue to investigate. |
Versions
NetBox Version: 3.7.5
NetBox DNS Version: 0.22.8
Python Version: 3.11.4
Describe the bug
Managed records created by the IP Address coupling feature, do not trigger the netbox_dns | record content type event rules (create, updated, delete).
To Reproduce
Steps to reproduce the behavior:
Expected result
Trigger event rule and run webhook/script.
Actual result
No event rule triggers.
Screenshots

Code Examples
The text was updated successfully, but these errors were encountered: