TheNetworkGuy / netbox-zabbix-sync

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

Adding the Netbox Device ID to Zabbix macro #19

Closed taofineberg closed 1 year ago

taofineberg commented 1 year ago

First of all, I would like to thank you for your script it works very well. I have a few use cases where I would like to add some inventor information to the Zabbix device. (GPS coordinates) The way I have achieved this is by doing an API request from Zabbix to pull the information by adding an external script item to the device and using JSON path to extract and allocate the information to the inventory item.

At the moment I am manually adding a maco {$NETBOX_DEVICE} to each device in Zabbix with the Netbox device ID so that it knows what device to get the information from.

I am not sure how much of a lift it would be for you to add the option to add the maco from your script but that would be extremely helpful and gives the option to pull more information from Zabbix without having to add more complexity to the script.

Thanks again Tao

TheNetworkGuy commented 1 year ago

I'll look into a way of providing this information to Zabbix. Not sure where to start but if this takes a minimal amount of work then this could be implemented. However as your current method, although cumbersome, does work there isn't much priority from my side to this specific feature request since i'm quite busy a.t.m. in my personal life. Keeping this issue open to see if more people are interested.

TheNetworkGuy commented 1 year ago

Closing this since the use-case is very tiny and there are other suggestions which take priority over this one. Should there be enough interest in the near future then we can take another look at it.