mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 23:27:32 -06:00
fixed bug with device removal state
This commit is contained in:
parent
78b9d5ae8b
commit
b9713792d7
@ -181,12 +181,13 @@ def main(arguments):
|
|||||||
# and remove hostID from Netbox.
|
# and remove hostID from Netbox.
|
||||||
device.cleanup()
|
device.cleanup()
|
||||||
logger.info(f"Cleaned up host {device.name}.")
|
logger.info(f"Cleaned up host {device.name}.")
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
# Device has been added to Netbox
|
# Device has been added to Netbox
|
||||||
# but is not in Activate state
|
# but is not in Activate state
|
||||||
logger.info(f"Skipping host {device.name} since its "
|
logger.info(f"Skipping host {device.name} since its "
|
||||||
f"not in the active state.")
|
f"not in the active state.")
|
||||||
|
continue
|
||||||
elif device.status in zabbix_device_disable:
|
elif device.status in zabbix_device_disable:
|
||||||
device.zabbix_state = 1
|
device.zabbix_state = 1
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user