15-Network Management and Monitoring Command References

HomeSupportReference GuidesCommand ReferencesH3C MSR610[810][830][1000S][2600][3600] Routers Command References-R6749-6W10015-Network Management and Monitoring Command References
27-Fast log output commands
Title Size Download
27-Fast log output commands 79.46 KB

Fast log output commands

 

The following compatibility matrixes show the support of hardware platforms for fast log output:

 

Hardware

Fast log output compatibility

MSR610

Yes

MSR810, MSR810-W, MSR810-W-DB, MSR810-LM, MSR810-W-LM, MSR810-10-PoE, MSR810-LM-HK, MSR810-W-LM-HK, MSR810-LM-CNDE-SJK, MSR810-CNDE-SJK, MSR810-EI, MSR810-LM-EA, MSR810-LM-EI

Yes

MSR810-LMS, MSR810-LUS

No

MSR810-SI, MSR810-LM-SI

No

MSR810-LMS-EA, MSR810-LME

Yes

MSR1004S-5G, MSR1004S-5G-CN

Yes

MSR1104S-W, MSR1104S-W-CAT6, MSR1104S-5G-CN, MSR1104S-W-5G-CN

Yes

MSR2600-6-X1, MSR2600-15-X1, MSR2600-15-X1-T

Yes

MSR2600-10-X1

Yes

MSR 2630

Yes

MSR3600-28, MSR3600-51

Yes

MSR3600-28-SI, MSR3600-51-SI

No

MSR3600-28-X1, MSR3600-28-X1-DP, MSR3600-51-X1, MSR3600-51-X1-DP

Yes

MSR3600-28-G-DP, MSR3600-51-G-DP

Yes

MSR3610-I-DP, MSR3610-IE-DP, MSR3610-IE-ES, MSR3610-IE-EAD, MSR-EAD-AK770, MSR3610-I-IG, MSR3610-IE-IG

Yes

MSR3610-X1, MSR3610-X1-DP, MSR3610-X1-DC, MSR3610-X1-DP-DC, MSR3620-X1, MSR3640-X1

Yes

MSR 3610, MSR 3620, MSR 3620-DP, MSR 3640, MSR 3660

Yes

MSR3610-G, MSR3620-G

Yes

MSR3640-G

Yes

MSR3640-X1-HI

Yes

 

Hardware

Fast log output compatibility

MSR810-W-WiNet, MSR810-LM-WiNet

Yes

MSR830-4LM-WiNet

Yes

MSR830-5BEI-WiNet, MSR830-6EI-WiNet, MSR830-10BEI-WiNet

Yes

MSR830-6BHI-WiNet, MSR830-10BHI-WiNet

Yes

MSR2600-6-WiNet

Yes

MSR2600-10-X1-WiNet

Yes

MSR2630-WiNet

Yes

MSR3600-28-WiNet

Yes

MSR3610-X1-WiNet

Yes

MSR3610-WiNet, MSR3620-10-WiNet, MSR3620-DP-WiNet, MSR3620-WiNet, MSR3660-WiNet

Yes

 

Hardware

Fast log output compatibility

MSR860-6EI-XS

Yes

MSR860-6HI-XS

Yes

MSR2630-XS

Yes

MSR3600-28-XS

Yes

MSR3610-XS

Yes

MSR3620-XS

Yes

MSR3610-I-XS

Yes

MSR3610-IE-XS

Yes

MSR3620-X1-XS

Yes

MSR3640-XS

Yes

MSR3660-XS

Yes

 

Hardware

Fast log output compatibility

MSR810-LM-GL

Yes

MSR810-W-LM-GL

Yes

MSR830-6EI-GL

Yes

MSR830-10EI-GL

Yes

MSR830-6HI-GL

Yes

MSR830-10HI-GL

Yes

MSR1004S-5G-GL

Yes

MSR2600-6-X1-GL

Yes

MSR3600-28-SI-GL

No

 

customlog character-encoding utf-8

Use customlog character-encoding utf-8 to configure fast log output to use the UTF-8 encoding.

Use undo customlog character-encoding to restore the default.

Syntax

customlog character-encoding utf-8

undo customlog character-encoding

Default

Fast log output uses the GB18030 encoding.

Views

System view

Predefined user roles

network-admin

Usage guidelines

For the log host to correctly display Chinese characters in received log messages, make sure the fast log output module uses the same character set encoding as the log host. Fast log output supports using GB18030 and UTF-8 encodings.

Examples

# Configure fast log output to use the UTF-8 encoding.

<Sysname> system-view

[Sysname] customlog character-encoding utf-8

customlog format

Use customlog format to enable fast log output.

Use undo customlog format to restore the default.

Syntax

customlog format { aft | attack-defense | dns | dpi [ ips | traffic-policy | url-filter [ unicom ] ] | keepalive sgcc | nat { cmcc | telecom [ with-vni ] | unicom } | packet-filter [ sgcc ]| security-policy sgcc | session }

undo customlog format { aft | attack-defense | dns | dpi [ ips | traffic-policy | url-filter [ unicom ] ] * | keepalive | nat | packet-filter | security-policy | session } *

Default

Fast log output is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

aft: Enables fast log output for the AFT module.

 

attack-defense: Enables fast log output for the attack defense module.

dns: Enables fast log output for the DNS module.

dpi: Enables fast log output for a DPI-related module. If you do not specify a DIP module keyword, this command enables fast log output for all the DPI-related modules.

 

ips: Specifies the intrusion protection system module.

sgcc: Specifies the SGCC format for the specified type of IPS logs. If you do not specify this keyword, the standard format is used for fast output of the IPS logs.

policy-hit: Specifies the IPS policy hit logs.

signature-update: Specifies the IPS signature update logs.

reputation: Specifies the IP reputation, domain reputation, and URL reputation modules.

terminal: Specifies the terminal identification module.

traffic-policy: Specifies the bandwidth management module.

url-filter: Specifies the URL filtering module.

unicom: Specifies the UNICOM format for fast output URL filtering logs. If you do not specify this keyword, the standard format is used to output the logs.

dga: Specifies the DGA detection module.

 

keepalive: Enables fast log output of keepalive logs. After this keyword is specified, the device sends keepalive logs to the log host periodically. If the log host cannot receive the keepalive logs in a specific period of time, the log host determines that the device is down.

 

nat: Enables fast log output in a specific format for the NAT module.

·     cmcc: Specifies the CMCC format.

·     telecom: Specifies the TELECOM format.

·     unicom: Specifies the UNICOM format.

with-vni: Carries VNI (VXLAN ID) information in NAT logs.

 

packet-filter: Enables fast output of packet matching logs for the packet filter, object policy, and security policy modules.

security-policy: Enables fast log output of security policy configuration logs for the security policy module.

session: Enables fast log output for the session management module.

sgcc: Specifies the SGCC format for the specified type of logs. If you do not specify this keyword, the standard format is used for fast output of the logs.

Usage guidelines

The fast log output feature enables fast output of logs to log hosts.

Typically, logs generated by a service module are first sent to the information center, which then outputs the logs to the specified destination (such as to log hosts). When fast log output is configured, logs of service modules are sent directly to log hosts instead of to the information center. Compared to outputting logs to the information center, fast log output saves system resources.

Fast log output, flow log, and information center are exclusive from one another. When the customlog format command is configured, the specified service module uses only the fast log output method. For more information about flow log, see "Configuring flow log." For more information about the information center, see "Configuring the information center."

To output logs of the NAT module to a log host, you must specify the log format required by the log host in the customlog format and customlog host commands. Logs of other modules can be output only in one format. You do not need to specify the format for these logs.

You can configure the device to carry VNI information in NAT logs only if you specify the TELECOM format. NAT logs that carry the VNI field use a new format different from the TELECOM format.

Examples

# Enable fast log output for the session management module.

<Sysname> system

[Sysname] customlog format session

customlog host

Use customlog host to configure fast log output parameters.

Use undo customlog host to remove the fast log output configuration.

Syntax

customlog host [ vpn-instance vpn-instance-name ] { hostname | ipv4-address | ipv6 ipv6-address } [ port port-number ] export { aft | attack-defense | cmcc-sessionlog | cmcc-userlog | dns | dpi [ ips | traffic-policy | url-filter ] * | keepalive | packet-filter | security-policy | session | telecom-sessionlog | telecom-userlog | unicom-sessionlog | unicom-userlog } *

undo customlog host [ vpn-instance vpn-instance-name ] { hostname | ipv4-address | ipv6 ipv6-address } [ port port-number ]

Default

Fast log output parameters are not configured.

Views

System view

Predefined user roles

network-admin

Parameters

vpn-instance vpn-instance-name: Specifies the MPLS L3VPN instance to which the log host belongs. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the log host is on the public network, do not specify this option.

hostname: Specifies a log host by its name, a case-insensitive string of 1 to 253 characters. The host name can contain letters, digits, hyphens (-), underscores (_), and dots (.).

ipv4-address: Specifies a log host by its IPv4 address.

ipv6 ipv6-address: Specifies a log host by its IPv6 address.

port port-number: Specifies the port number of the log host. The value range is 1 to 65535, and the default is 514. The setting must be the same as the port number configured on the log host. Otherwise, the log host cannot receive logs.

export: Specifies a source module for fast log output.

aft: Outputs logs of the AFT module to the log host.

 

attack-defense: Outputs logs of the attack defense module to the log host.

cmcc-sessionlog: Outputs NAT session logs in CMCC format to the log host.

cmcc-userlog: Outputs NAT444 user logs in CMCC format to the log host.

dns: Outputs logs of the DNS module to the log host.

dpi: Outputs logs of a DPI-related module to the log host. If you specify the dpi keyword without a DPI module keyword, this command outputs logs of all the DPI-related modules to the log host.

 

ips: Specifies the intrusion protection system module.

traffic-policy: Specifies the bandwidth management module.

url-filter: Specifies the URL filtering module.

 

keepalive: Outputs keepalive logs to the log host.

 

packet-filter: Outputs packet matching logs of the packet filter, object policy, and security policy modules to the log host.

security-policy: Outputs security policy configuration logs of the security policy module to the log host.

session: Outputs logs of the session management module to the log host.

telecom-sessionlog: Outputs NAT session logs in TELECOM format to the log host.

 

telecom-userlog: Outputs NAT444 user logs in TELECOM format to the log host.

 

unicom-sessionlog: Outputs NAT session logs in UNICOM format to the log host.

 

unicom-userlog: Outputs NAT444 user logs in UNICOM format to the log host.

 

Usage guidelines

The customlog host command takes effect only after the customlog format command is configured.

To output NAT logs to a log host, you must specify the log format required by the log host in the customlog format and customlog host commands.

You can specify a maximum of four log hosts for fast log output.

Examples

# Output logs of the session management module to the log host at 1.1.1.1.

<Sysname> system-view

[Sysname] customlog host 1.1.1.1 port 1000 export session

customlog host source

Use customlog host source to specify a source IP address for fast log output.

Use undo customlog host source to restore the default.

Syntax

customlog host source interface-type interface-number

undo customlog host source

Default

The source IP address of fast output logs is the primary IP address of the outgoing interface.

Views

System view

Predefined user roles

network-admin

Parameters

interface-type interface-number: Specifies a source interface by its type and number. The interface's primary IP address will be used as the source IP address of fast output logs.

Usage guidelines

Configure this command when you need to filter logs according to their source IP addresses on the log host.

The customlog host source command takes effect only after the customlog format and customlog host commands are configured.

Examples

# Use the IP address of Loopback 0 as the source IP address of fast output logs.

<Sysname> system-view

[Sysname] interface loopback 0

[Sysname-LoopBack0] ip address 2.2.2.2 32

[Sysname-LoopBack0] quit

[Sysname] customlog host source loopback 0

customlog language

Use customlog language to specify a language for fast log output.

Use undo customlog language to restore the default.

Syntax

customlog language { chinese | english }

undo customlog language

Default

Fast logs are output in English.

Views

System view

Predefined user roles

network-admin

Parameters

chinese: Specifies the language to Chinese.

english: Specifies the language to English.

Usage guidelines

Only some fields in the fast logs of certain service modules can be output in Chinese. The following fields in the service module logs support fast output in Chinese:

·     Session logs: Application and Category.

·     Audit logs: Application.

·     URL filtering logs: Application, URLCategory, and URLParentCategory.

·     IPS logs: Application, AttackName, Category, and SubCategory.

·     Anti-virus logs: Application.

·     WAF logs: Application, AttackName, Category, SubCategory, and SrcLocation.

·     Sandbox logs: Application.

For IPS logs, you can use the customlog language chinese or log language chinese command to specify the language for fast log output to Chinese.

For more information about the log language chinese command, see DPI engine commands in DPI Command Reference.

Examples

# Specify the language for fast log output to Chinese.

<Sysname> system-view

[Sysname] customlog language chinese

Related commands

log language chinese (DPI Command Reference)

customlog timestamp

Use customlog timestamp localtime to configure the timestamp of fast output logs to show the system time.

Use undo customlog timestamp localtime to restore the default.

Syntax

customlog timestamp localtime

undo customlog timestamp localtime

Default

The timestamp of fast output logs shows the Greenwich Mean Time (GMT).

Views

System view

Predefined user roles

network-admin

Examples

# Configure the timestamp of fast output logs to show the system time.

<Sysname> system-view

[Sysname] customlog timestamp localtime

customlog with-sn

Use customlog with-sn to configure the device to carry its serial number in fast output logs.

Use undo customlog with-sn to restore the default.

Syntax

customlog with-sn

undo customlog with-sn

 

Default

The device does not carry its serial number in fast output logs.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature enables a device to add a serial number (SN) field to fast output log messages, helping users to identify the devices that sent the log messages.

This feature is not applicable to fast output logs in TELECOM, CMCC, and UNICOM formats.

Examples

# Configure the device to carry its serial number in fast output logs.

<Sysname> system-view

[Sysname] customlog with-sn

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网