mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
better defaults for freebox parsing issue #927
This commit is contained in:
@@ -152,12 +152,13 @@ def main():
|
||||
if "l3connectivities" in host and isinstance(host["l3connectivities"], list):
|
||||
for ip in [ip for ip in host["l3connectivities"] if ip.get("reachable")]:
|
||||
mac: str = host.get("l2ident", {}).get("id", "(unknown)")
|
||||
if mac != '(unknown)':
|
||||
plugin_objects.add_object(
|
||||
primaryId=mac,
|
||||
secondaryId=ip.get("addr", "(unknown)"),
|
||||
secondaryId=ip.get("addr", "0.0.0.0"),
|
||||
watched1=host.get("primary_name", "(unknown)"),
|
||||
watched2=host.get("vendor_name", "(unknown)"),
|
||||
watched3=map_device_type(host.get("host_type", "unknown")),
|
||||
watched3=map_device_type(host.get("host_type", "")),
|
||||
watched4=datetime.fromtimestamp(ip.get("last_time_reachable", 0)),
|
||||
extra="",
|
||||
foreignKey=mac,
|
||||
|
||||
Reference in New Issue
Block a user