TheNetworkGuy / netbox-zabbix-sync

Python script to synchronise Netbox devices to Zabbix.
MIT License
118 stars 27 forks source link

Proxy support #8

Closed TheNetworkGuy closed 2 years ago

TheNetworkGuy commented 3 years ago

Currently there is no proxy support. I'm still debating on how to implement this. This could be a custom field, however i would rather see config context. The thought process behind this is that Zabbix proxies usually account for all devices in a site, so assigning a single proxy object to a site saves a lot of work instead of manually assigning it to each new device at a site / rack / etc.

TheNetworkGuy commented 3 years ago

I've updated the code to include proxy support. To simplify the transition i've made a new -p flag that is required when: A. Netbox device does not have a Zabbix proxy configured in the config context B. Zabbix host object does have a proxy configured C. You want to sync the devices up, meaning the proxy link will get deleted in Zabbix

This is the only case in which the -p flag will help. In all other use cases the -p flag can be omitted. For example:

TLDR: Deleting proxy links when a proxy is NOT specified within Netbox is locked behind the -p flag. This can be changed in the near future but is for now a design choice, not a bug.

I've updated the README with this information.

TheNetworkGuy commented 2 years ago

Closing this one since its been open for almost half a year now.