TheNetworkGuy / netbox-zabbix-sync

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

IP is not synchronised #41

Closed Domisiding closed 4 months ago

Domisiding commented 8 months ago

Hi, if you change the IP address in the NetBox, i.e. go to the existing one and edit it there, the Zabbix does not accept these changes. Only if you delete the old IP that was in the device in the NetBox and connect a new IP.

TheNetworkGuy commented 6 months ago

Edit: thought that i could reproduce this bug, however i just tried to and i'm unable to. Exact steps:

  1. Fresh environment, latest version of the script. Zabbix 6.4 and Netbox 3.6
  2. Have one device synced
  3. Change the primary IP address in Netbox and run sync again
(venv_zabbix) user@Laptopname:~/netbox-zabbix-sync$ python netbox_zabbix_sync.py -vcjH
2023-12-27 14:36:58,892 - Netbox-Zabbix-sync - DEBUG - Found group HQ London/Fortinet/Firewall for host Firewall DMZ.
2023-12-27 14:36:58,892 - Netbox-Zabbix-sync - DEBUG - Found template FortiGate by SNMP for host Firewall DMZ.
2023-12-27 14:36:58,932 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: hostname in-sync.
2023-12-27 14:36:58,933 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: template FortiGate by SNMP is present in Zabbix.
2023-12-27 14:36:58,933 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: template(s) in-sync.
2023-12-27 14:36:58,933 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: hostgroup in-sync.
2023-12-27 14:36:58,933 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: status in-sync.
2023-12-27 14:36:58,933 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: interface in-sync.
(venv_zabbix) user@Laptopname:~/netbox-zabbix-sync$ python netbox_zabbix_sync.py -vcjH
2023-12-27 14:37:16,726 - Netbox-Zabbix-sync - DEBUG - Found group HQ London/Fortinet/Firewall for host Firewall DMZ.
2023-12-27 14:37:16,726 - Netbox-Zabbix-sync - DEBUG - Found template FortiGate by SNMP for host Firewall DMZ.
2023-12-27 14:37:16,815 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: hostname in-sync.
2023-12-27 14:37:16,815 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: template FortiGate by SNMP is present in Zabbix.
2023-12-27 14:37:16,815 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: template(s) in-sync.
2023-12-27 14:37:16,815 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: hostgroup in-sync.
2023-12-27 14:37:16,815 - Netbox-Zabbix-sync - DEBUG - Device Firewall DMZ: status in-sync.
2023-12-27 14:37:16,815 - Netbox-Zabbix-sync - WARNING - Device Firewall DMZ: Interface OUT of sync.
2023-12-27 14:37:16,860 - Netbox-Zabbix-sync - INFO - Solved Firewall DMZ interface conflict.
TheNetworkGuy commented 4 months ago

Hey, do you have any comments / is this issue still persistant on your end? Could you provide some troubleshooting steps to replicate this issue? :) If not then i would like to propose to close this issue.

Thanks in advance!