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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user