Replies: 1 comment
-
It sounds like you want to use a Webhook to call your custom script. I wrote a sample webhook in python here which takes IP address updates and turns them into DNS updates - which sounds similar to what you're looking for. These are triggered automatically when an object changes, so there' s no need for the user to do anything more. If that's not what you want, then look at Custom Links. These can make a button appear on a particular page (e.g. on the Device detail page or IP Address detail page), and will send a GET request with a dynamic URL that you build, e.g. including the device ID or primary IP address. The target service could then if necessary call back to Netbox to pick up any additional information it needs. At worst, you can write a period script which runs every 5 minutes, say, and hits the REST API to download all the relevant info and rebuild configs from that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I know netbox can run custom scripts to modify netbox objects, but what I am looking for is a way to execute a script from the IP address window that will send the IP address, MAC address, FQDN and device IP to my external script.
My reason for doing this is that we have Palo Alto firewalls that act as our DHCP and DNS servers at local sites, I have a python script that can take in the IP address info stated above and then update the DHCP reservations and/or DNS entries on the firewall.
Beta Was this translation helpful? Give feedback.
All reactions