Title: How to filter log information on Ruijie Switch? [Print this page] Author: GTAC-Sophia Time: 2023-7-11 18:24 Title: How to filter log information on Ruijie Switch? Requirements:
The log filtering function can be configured todisplay and record log information of specific types and levels as required
1. Set log filtering directions to terminal and server.
2. Set the log filtering type to filter-only.
3. The filtering rule for logs is Single-match, and the module name contains the SYS logs Configuration tips: 1. If only the filtering direction and type are configured, but no filtering rules are configured, the log filtering function does not take effect.
2. If only the filtering rules are configured but the filtering direction and type are not configured, the log filtering function takes effect. The filtering direction and type take effect according to the default Settings. By default, logs in all directions are filtered. The filtering type is filter-only. Configuration steps:
Ruijie#en
1.
Ruijie(config)#logging filter direction server
Ruijie(config)# logging filter direction termianl
all: Filter loginformation in all directions, including the Console direction, VTY terminal,log buffer, log file, and log server
buffer: Filter thelog information of the past log buffer
file: Filter loginformation for past log files
server: Filter thelog information of the previous log server.
terminal: Filter logs to the console and VTY terminals (including Telnet and SSH)
2. logging filter type filter-only
Contains-only:Indicates that only logs that contain the keyword information in the filteringrules are output. Logs that do not contain keyword information in the filtering rules are not output.
filter-only: that logs that contain keywords in the filtering rules are filtered out. The filtered logs are not displayed
3. logging filter rule { exact-match module module-name mnemonic mnemonic-name level inform- level }
logging filter rule single-match { level inform-level |mnemonic mnemonic-name | module module-name }
Exact-match: match the exact information
mnemonic mnemonic-name: The mnemonic name of the log information to be filtered.
level inform-level: Level of log information to be filtered. The ranges from 0 to 7.
module module-name: Name of the module to be filtered.
Single-match: match the single information
Exact-metch: filter the log" %LLDP-4-AGEOUTREM: Port Gigabit Ethernet 0/8one neighbor aged out, Chassis ID is 5869.6c33.881e, Port ID is Gi0/33."
Verification:
Welcome to Ruijie Community (https://community.ruijienetworks.com/)