mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-14 09:51:26 -06:00
Fixed variable name typo
This commit is contained in:
parent
e0827ac428
commit
204937b784
@ -64,7 +64,7 @@ traverse_site_groups = False
|
|||||||
# Default device filter, only get devices which have a name in Netbox:
|
# Default device filter, only get devices which have a name in Netbox:
|
||||||
nb_device_filter = {"name__n": "null"}
|
nb_device_filter = {"name__n": "null"}
|
||||||
# Default filter for VMs
|
# Default filter for VMs
|
||||||
vm_device_filter = {"name__n": "null"}
|
nb_vm_filter = {"name__n": "null"}
|
||||||
|
|
||||||
## Inventory
|
## Inventory
|
||||||
# See https://www.zabbix.com/documentation/current/en/manual/config/hosts/inventory#building-inventory
|
# See https://www.zabbix.com/documentation/current/en/manual/config/hosts/inventory#building-inventory
|
||||||
|
@ -25,7 +25,7 @@ try:
|
|||||||
vm_hostgroup_format,
|
vm_hostgroup_format,
|
||||||
nb_device_filter,
|
nb_device_filter,
|
||||||
sync_vms,
|
sync_vms,
|
||||||
vm_device_filter
|
nb_vm_filter
|
||||||
)
|
)
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
print("Configuration file config.py not found in main directory."
|
print("Configuration file config.py not found in main directory."
|
||||||
@ -122,7 +122,7 @@ def main(arguments):
|
|||||||
netbox_devices = list(netbox.dcim.devices.filter(**nb_device_filter))
|
netbox_devices = list(netbox.dcim.devices.filter(**nb_device_filter))
|
||||||
netbox_vms = []
|
netbox_vms = []
|
||||||
if sync_vms:
|
if sync_vms:
|
||||||
netbox_vms = list(netbox.virtualization.virtual_machines.filter(**vm_device_filter))
|
netbox_vms = list(netbox.virtualization.virtual_machines.filter(**nb_vm_filter))
|
||||||
netbox_site_groups = convert_recordset((netbox.dcim.site_groups.all()))
|
netbox_site_groups = convert_recordset((netbox.dcim.site_groups.all()))
|
||||||
netbox_regions = convert_recordset(netbox.dcim.regions.all())
|
netbox_regions = convert_recordset(netbox.dcim.regions.all())
|
||||||
netbox_journals = netbox.extras.journal_entries
|
netbox_journals = netbox.extras.journal_entries
|
||||||
|
Loading…
Reference in New Issue
Block a user