Use Webooks and Event rules to pass data #16166
Unanswered
Pulsar911n
asked this question in
Help Wanted!
Replies: 1 comment 1 reply
-
The template is Jinja2 templating, so this should work, based on the example in https://docs.netbox.dev/en/stable/integrations/webhooks/:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I've been banging my head to my desk in the previous week because I can't figure out the following:
I recently got a task to automate host creation between netbox and zabbix. Whenever a host is created in netbox, the same host is supposed to be created in zabbix.
I've tried using a webhook to send a post request to the zabbix api endpoint, and triggering this webhook with an event rule.
The problem is that I can't seem to find a way to give the hostname, ip, etc data to the request in the webhook. Netbox stores these data in some way, but zabbix doesn't understand netbox's syntax, so im trying to figure out a way to pass data from netbox to zabbix in the correct format and method.
As far as I'm aware, the body template section of the webhook is responsible to sending data with the request. Said body template in my case looks like this:
I have tried to define the "host" parameter with netbox's syntax, data['name'], but this syntax doesn't match the rest of the request. thus it's not working.
Any ideas or help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions