mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-14 01:41:25 -06:00
Filtering devices which do not have a name. Posible related to #22, nontheless a good practice to ignore these devices.
This commit is contained in:
parent
7718e23545
commit
14c83ba50d
@ -72,7 +72,7 @@ def main(arguments):
|
||||
# Set Netbox API
|
||||
netbox = api(netbox_host, token=netbox_token, threading=True)
|
||||
# Get all Zabbix and Netbox data
|
||||
netbox_devices = netbox.dcim.devices.all()
|
||||
netbox_devices = netbox.dcim.devices.filter(name__n="null")
|
||||
netbox_journals = netbox.extras.journal_entries
|
||||
zabbix_groups = zabbix.hostgroup.get(output=['groupid', 'name'])
|
||||
zabbix_templates = zabbix.template.get(output=['templateid', 'name'])
|
||||
|
Loading…
Reference in New Issue
Block a user