Add interface information handling and update Zabbix formatting

- Introduced InterfaceInfo class to encapsulate interface details.
- Modified CiscoMacTableParser to gather and store interface information.
- Updated ZabbixLLDFormatter to include interface status and descriptions in the output.
- Adjusted test_new_format.py to validate new interface information integration.
- Enhanced run.sh for improved container management.
This commit is contained in:
Xavier Rodriguez
2026-03-09 15:21:48 +01:00
parent f12e236e82
commit 6782aa47d1
5 changed files with 160 additions and 50 deletions
+5 -5
View File
@@ -150,11 +150,11 @@ class CiscoMacHTTPHandler(BaseHTTPRequestHandler):
if not mac_entries:
self.logger.warning(f"No se obtuvieron entradas de tabla MAC de {host}")
# Obtener la lista de interfaces detectadas
all_interfaces = getattr(mac_parser, 'detected_interfaces', [])
# Formatear para Zabbix incluyendo todas las interfaces
zabbix_data = zabbix_formatter.format_for_zabbix(mac_entries, all_interfaces)
# Formatear para Zabbix incluyendo información de interfaces
zabbix_data = zabbix_formatter.format_for_zabbix(
mac_entries,
mac_parser.interface_info
)
return zabbix_data