Mensajes de registro del sistema SONiC de Dell Networking y registros de auditoría
Summary: En este artículo, se explican los mensajes del sistema y los registros de auditoría en los switches SONiC de Dell Networking.
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
Índice
Registros
del sistemaRegistros de auditoría
Registros del sistema
¿Qué es el registro del sistema?
El archivo de registro del sistema o syslog es un registro de todas las transacciones habilitadas para el registro de diversos procesos en un switch. Las alertas de syslog se generan para eventos significativos en el sistema. Incluyen eventos como la utilización de memoria, la utilización de la partición de disco, los umbrales de CPU, etc.Los registros del sistema están habilitados de manera predeterminada. Esta información puede ayudar al administrador del switch a solucionar problemas relacionados con el switch y la red.
Los mensajes de registro se clasifican según el nivel de gravedad.
Los niveles de mensajes de registro son los siguientes:
| Gravedad | Nivel |
|---|---|
| Depuración | 7 |
| Informativo | 6 |
| Notificación | 5 |
| Advertencias | 4 |
| Errores | 3 |
| Crítica | 2 |
| Alerts | 1 |
| Emergencias | 0 |
Cómo ver mensajes de registro del sistema
Los registros del sistema SONiC de Dell Networking se pueden ver mediante el siguiente comando:
Salida de muestra
show logging DELLSONiC# show logging Jul 04 17:22:05.528854+00:00 2023 sonic NOTICE syncd#syncd: :- setPort: setting admin UP on eth1 Eth1/1 portId oid:0x100000001 Jul 04 17:22:05.531292+00:00 2023 sonic NOTICE l2mcd#l2mcmgrd: :- doL2McInterfaceUpdateTask: L2MCD_CFG: IF:Eth1/1 op:SET oper:0 Jul 04 17:22:05.535991+00:00 2023 sonic NOTICE l2mcd#Logs: l2mcd_port_list_update PortInfo RX: Eth1/1, ifidx:4096 oper:1 is_add:1 is_lag:0, kif:29 rx_sock:56 Jul 04 17:22:05.536061+00:00 2023 sonic NOTICE syncd#syncd: :- syncOnLinkMsg: newlink: ifindex: 3, ifflags: 0x1103, ifname: eth1 Jul 04 17:22:05.536185+00:00 2023 sonic NOTICE syncd#syncd: :- asyncOnLinkMsg: received RTM_NEWLINK ifname: eth1, ifflags: 0x11143, ifindex: 3 Jul 04 17:22:05.537401+00:00 2023 sonic NOTICE swss#orchagent: :- doTask: Get port state change notification id:1000000000002 status:1 Jul 04 17:22:05.537401+00:00 2023 sonic NOTICE swss#orchagent: :- updatePortOperStatus: Port Eth1/1 oper state set from down to up
Cómo ver el conteo de mensajes de registro del sistema
Dell SONiC almacena una gran cantidad de mensajes de registro. Para ver la cantidad de mensajes de registro, utilice el siguiente comando:
Ejemplo de salida
show logging count DELLSONiC# show logging count 438
Cómo ver los mensajes de registro del sistema más recientes
A menudo, es útil ver los mensajes de registro más recientes. Utilice el siguiente comando para ver los mensajes:
Ejemplo de salida
show logging lines
DELLSONiC# show logging lines 3
Jul 04 17:24:18.550108+00:00 2023 sonic NOTICE syncd#syncd: :- process_packet_for_fdb_event: Learn New MAC V:1 P:1/0/0
Jul 04 17:24:18.550108+00:00 2023 sonic WARNING syncd#syncd: :- findBridgeVlanForPortVlan: failed to find bv_id for vlan 1 and port_id oid:0x100000001
Jul 04 17:24:18.550108+00:00 2023 sonic WARNING syncd#syncd: :- process_packet_for_fdb_event: skipping mac learn for {"bvid":"oid:0x0","mac":"00:00:5E:00:01:01","switch_id":"oid:0x2100000000"}, since BV_ID was not found for mac
Cómo ver mensajes de registro con un patrón específico
Puede grep ( | ) para buscar mensajes de registro de un patrón especificado. Utilice el siguiente comando para grep:
En el siguiente ejemplo, estamos viendo mensajes de registro que tienen un patrón Eth1/1.
Ejemplo de salida
show logging | grep DELLSONiC# show logging | grep Eth1/1 Jul 04 17:22:01.141637+00:00 2023 sonic NOTICE l2mcd#l2mcmgrd: :- doL2McInterfaceUpdateTask: L2MCD_CFG: IF:Eth1/1 op:SET oper:0 Jul 04 17:22:01.142410+00:00 2023 sonic NOTICE l2mcd#l2mcmgrd: :- doL2McInterfaceUpdateTask: L2MCD_CFG: IF:Eth1/1 op:SET oper:0 Jul 04 17:22:01.142410+00:00 2023 sonic NOTICE l2mcd#Logs: l2mcd_port_list_update PortInfo RX: Eth1/1, ifidx:4096 oper:0 is_add:1 is_lag:0, kif:29 rx_sock:56 Jul 04 17:22:01.151251+00:00 2023 sonic NOTICE macsec#hostapdmgrd: :- processHostapdConfigPortTblEvent: Received Eth1/1 as key and SET as OP
Cómo enviar un mensaje de registro al servidor syslog remoto
Dell SONiC puede enviar registros del sistema a un servidor remoto. Utilice el siguiente comando:
En el siguiente comando de ejemplo, enviamos mensajes de registro al servidor syslog remoto 192.168.1.10. Si especifica un nombre de host, asegúrese de configurar el servidor de nombres.
Ejemplo de salida
logging server DELLSONiC# DELLSONiC# configure terminal DELLSONiC(config)# logging server 192.168.1.10También puede especificar el número de puerto, la interfaz de origen, la gravedad o vrf.
Cómo borrar los registros del sistema
Para borrar los archivos de registro del sistema, utilice el siguiente comando:
Ejemplo de salida
clear logging DELLSONiC# clear logging
Registros de auditoría
¿Qué es el registro de auditoría?
Toda la actividad del usuario en un switch SONiC de Dell, como un inicio de sesión, los cambios de configuración se registran en los registros de auditoría. Un registro de auditoría es útil mientras se realizan auditorías de seguridad.El registro de auditoría registra lo siguiente:
- Inicio de sesión y cierre de sesión del usuario mediante SSH o consola
- Todos los comandos show y configuration se ejecutan mediante las operaciones de CLI, gNMI y API REST de Dell SONiC.
Cómo ver los registros de auditoría
Utilice el siguiente comando para ver los registrosde auditoría Salida de muestra
show audit-log DELLSONiC# show audit-log Jul 04 17:31:40.664313+00:00 2023 DELLSONiC INFO mgmt-framework#sonic-cli: User "admin" command "exit" status - success Jul 04 17:31:32.701465+00:00 2023 DELLSONiC INFO mgmt-framework#sonic-cli: User "admin" command "exit" status - success Jul 04 17:31:31.206452+00:00 2023 DELLSONiC INFO mgmt-framework#sonic-cli: User "admin" command "no shutdown" status - success Jul 04 17:31:29.227217+00:00 2023 DELLSONiC INFO mgmt-framework#sonic-cli: User "admin" command "interface Eth1/1" status - success Jul 04 17:31:25.474110+00:00 2023 DELLSONiC INFO mgmt-framework#clish[161]: User "admin" command "configure terminal" status - success Jul 04 17:31:23.480896+00:00 2023 DELLSONiC INFO mgmt-framework#clish[161]: User "admin" command "startup" status - success Jul 04 17:31:23.455134+00:00 2023 DELLSONiC INFO mgmt-framework#sonic-cli: message repeated 2 times: [ User "admin" command "exit" status - success] Jul 04 17:31:19.567044+00:00 2023 DELLSONiC INFO login[21895]: pam_unix(login:session): session opened for user admin by LOGIN(uid=0)
Podemos ver en la salida anterior que el administrador de usuarios tiene la interfaz de apagado Eth1/1 el 4 de julio de 17:31.
Cómo borrar registros de auditoría.
Utilice el siguiente comando para borrar registros de auditoría:
salida de muestra
clear audit-log DELLSONiC# clear audit-logPodemos ver que borrar el registro de auditoría está borrado y la primera entrada muestra que el registro de auditoría está borrado y la hora
DELLSONiC# show audit-log Jul 04 17:32:47.835891+00:00 2023 DELLSONiC INFO mgmt-framework#sonic-cli: User "admin" command "clear audit-log" status - success DELLSONiC#
NOTA: Solo los usuarios con función de administrador pueden ver y borrar el registro de auditoría.
Para obtener más ayuda, consulte la página del producto de distribución de SONiC de Dell Support Enterprise para ver la documentación de la versión de la guía del usuario de Enterprise SONiC o comuníquese con el soporte de Dell Technologies.
Affected Products
Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9100-ON, PowerSwitch Z9264F-ON
, PowerSwitch Z9332F-ON, PowerSwitch Z9432F-ON
...
Article Properties
Article Number: 000215519
Article Type: How To
Last Modified: 06 Dec 2023
Version: 6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.