TheNetworkGuy / netbox-zabbix-sync

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

Make host group configurable #13

Closed dmcken closed 2 years ago

dmcken commented 2 years ago

Allow use of customizable zabbix host group specification via environment variable.

TheNetworkGuy commented 2 years ago

Thanks for your contribution! Unfortunately i don't have enough time to look at it right now but i'll dig a bit deeper in the code later this weekend.

But the idea itself looks promising and provides another layer of customisation for users! :)

TheNetworkGuy commented 2 years ago

Finally found some time but trying the script with the suggested default lets it crash:

ZABBIX_HG_SPEC=site/manufacturer/role

raise AttributeError('object has no attribute "{}"'.format(k))

AttributeError: object has no attribute "manufacturer"

Quite strange given that the key is specified in the mapping table.