mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-16 04:02:56 -06:00
🚨 Changed membership tests to not in
This commit is contained in:
parent
767f974ad8
commit
83f27849af
@ -31,7 +31,7 @@ class ZabbixInterface:
|
|||||||
zabbix = self.context["zabbix"]
|
zabbix = self.context["zabbix"]
|
||||||
if "interface_type" in zabbix:
|
if "interface_type" in zabbix:
|
||||||
self.interface["type"] = zabbix["interface_type"]
|
self.interface["type"] = zabbix["interface_type"]
|
||||||
if not "interface_port" in zabbix:
|
if "interface_port" not in zabbix:
|
||||||
self._set_default_port()
|
self._set_default_port()
|
||||||
return True
|
return True
|
||||||
self.interface["port"] = zabbix["interface_port"]
|
self.interface["port"] = zabbix["interface_port"]
|
||||||
|
@ -188,7 +188,7 @@ def sanatize_log_output(data):
|
|||||||
del sanitized_data["interfaceid"]
|
del sanitized_data["interfaceid"]
|
||||||
# InterfaceID also hints that this is a interface update.
|
# InterfaceID also hints that this is a interface update.
|
||||||
# A check is required if there are no macro's used for SNMP security parameters.
|
# A check is required if there are no macro's used for SNMP security parameters.
|
||||||
if not "details" in data:
|
if "details" not in data:
|
||||||
return sanitized_data
|
return sanitized_data
|
||||||
for key, detail in sanitized_data["details"].items():
|
for key, detail in sanitized_data["details"].items():
|
||||||
# If the detail is a secret, we don't want to log it.
|
# If the detail is a secret, we don't want to log it.
|
||||||
|
@ -57,7 +57,7 @@ class ZabbixUsermacros:
|
|||||||
if self.validate_macro(macro_name):
|
if self.validate_macro(macro_name):
|
||||||
macro["macro"] = str(macro_name)
|
macro["macro"] = str(macro_name)
|
||||||
if isinstance(macro_properties, dict):
|
if isinstance(macro_properties, dict):
|
||||||
if not "value" in macro_properties:
|
if "value" not in macro_properties:
|
||||||
self.logger.warning(
|
self.logger.warning(
|
||||||
f"Host {self.name}: Usermacro {macro_name} has "
|
f"Host {self.name}: Usermacro {macro_name} has "
|
||||||
"no value in Netbox, skipping."
|
"no value in Netbox, skipping."
|
||||||
|
Loading…
Reference in New Issue
Block a user