mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-12-19 11:52:20 -06:00
Added checks for empty list of hostgroups, improved some logging
This commit is contained in:
@@ -212,6 +212,8 @@ def main(arguments):
|
||||
config["hostgroup_format"], netbox_site_groups, netbox_regions)
|
||||
# Check if a valid hostgroup has been found for this VM.
|
||||
if not device.hostgroups:
|
||||
logger.warning(f"Host {device.name}: Host has no valid "
|
||||
f"hostgroups, Skipping this host...")
|
||||
continue
|
||||
device.set_inventory(nb_device)
|
||||
device.set_usermacros()
|
||||
|
||||
Reference in New Issue
Block a user