How to set the logs of CE series switches sent to the server at a certain level


When configuring logs to be sent to the log server, you can set the level of the logs. For example, to send logs of notification and higher levels to the log server, run:
<HUAWEI> system-view
[~HUAWEI] info-center loghost channel loghost level notification
[*HUAWEI] commit

Other related questions:
What is the default user level on CE series switches
User levels determine operation permission of users. For CE series switches, there are 16 user levels that range from level 0 to 15. A larger value indicates a higher level. By default, the level of a user logging in to a switch through the console port is 15, and the level of a Telnet/Stelnet user is 0.

How to filter logs on CE series switches
Run the info-center filter-id { id | bymodule-alias modname alias } command in the system view to filter out the specified log information.
To filter out the log "ent_config_change", run the following commands:
<HUAWEI> system-view
[~HUAWEI] info-center filter-id bymodule-alias devm ent_config_change

How to configure a CE switch to send logs to a server
You can configure the switch to export logs to the log server so that you can view them on the log server to monitor device running. For example, to export all logs with a level higher than "notification" to the log server, run:
<HUAWEI> system-view
[~HUAWEI] info-center loghost channel loghost level notification
[*HUAWEI] commit

How are logs of CE series switches stored
Logs generated by the system are first saved in the log buffer. The system automatically saves the logs to a log file (log.log or diag.log) every 30 minutes or when the log buffer is full. You can also manually save the logs in the log buffer to the log file using the command. User logs are saved in flash:/logfile/log.log and diagnostic logs are saved in flash:/logfile/diag.log. When the size of a log file reaches 8 MB, the system compresses the log file with the file name or Slot-id and time indicate the slot number and the generation time of the log file, respectively. The storage space for user logs and diagnostic logs is limited. You can run the display logfile storage-usage command to view its size and usage. Currently, the log storage space cannot be adjusted. If the available log storage space is less than 20%, the system will delete the earliest compressed log file to release space for the latest logs.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top