From b9713792d71fd45ca861c876e8031c7b51fff59a Mon Sep 17 00:00:00 2001 From: TheNetworkGuy Date: Wed, 22 May 2024 09:23:07 +0200 Subject: [PATCH] fixed bug with device removal state --- netbox_zabbix_sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netbox_zabbix_sync.py b/netbox_zabbix_sync.py index d586c2e..c0ce5b7 100755 --- a/netbox_zabbix_sync.py +++ b/netbox_zabbix_sync.py @@ -181,12 +181,13 @@ def main(arguments): # and remove hostID from Netbox. device.cleanup() logger.info(f"Cleaned up host {device.name}.") - + continue else: # Device has been added to Netbox # but is not in Activate state logger.info(f"Skipping host {device.name} since its " f"not in the active state.") + continue elif device.status in zabbix_device_disable: device.zabbix_state = 1 else: