The info-center loghost domain command configures a device to output logs to a syslog server.
The undo info-center loghost domain command disables a device from outputting logs to a syslog server.
A device does not output logs to any syslog server by default.
info-center loghost domain domain-name [ { local-time | utc } | channel { channel-number | channel-name } | { public-net | vpn-instance vpn-instance-name } | source-ip source-ip-address | facility local-num | level level-num | port server-port | transport { udp | tcp [ ssl-policy policy-name [ security ] [ verify-dns-name dns-name ] ] } ] *
undo info-center loghost domain domain-name [ vpn-instance vpn-instance-name ]
Parameter | Description | Value |
---|---|---|
local-time |
Indicates the local time. |
The default value is UTC. |
utc |
Indicates the Universal Time Coordinated (UTC). |
- |
channel |
Indicates the information channel. |
- |
channel-number |
Specifies a channel number. |
The value is an integer ranging from 0 to 9.
|
channel-name |
Specifies a channel name. |
The value is a string:
|
public-net |
Indicates the logs sent to a syslog server over the public network. |
- |
vpn-instance vpn-instance-name |
Specifies name of a virtual private network (VPN) instance of a syslog server. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
source-ip source-ip-address |
Specifies the source IPv4 address of packets to be sent to a syslog server. |
The value is in dotted decimal format. |
facility local-num |
Specifies a syslog server facility that is used to identify the log information source. You can use this parameter to plan a local value for the log information of a specified device, so that the syslog server can handle received log information based on the parameter. |
The value is an enumerated type: local0, local1, local2, local3, local4, local5, local6, or local7. The default value is local7. |
level level-num |
Specifies a log level. |
The value is an enumerated type:
|
port server-port |
Specifies the destination port number of packets to be sent to a syslog server. |
The value is an integer ranging from 1 to 65535.
|
transport |
Indicates the information transport mode. |
- |
udp |
Indicates that the information transport mode is UDP. |
- |
tcp |
Indicates that the information transport mode is TCP. |
- |
ssl-policy policy-name |
Specifies the name of a Secure Sockets Layer (SSL) policy when packets are transmitted using TCP. SSL encrypted transmission provides high security. If packets are transmitted on insecure networks, configure SSL encrypted transmission by specifying ssl-policy policy-name. If packets are transmitted on secure networks, configure UDP transmission mode by specifying udp or TCP transmission mode by specifying tcp. |
The value is a string of 1 to 23 case-insensitive characters, spaces not supported. |
security |
Specifies a security log host. If the security parameter is set, the system sends only security logs to the log host. |
- |
verify-dns-name dns-name |
Specifies the DNS server certificate name for the logging host. |
String form, does not support space, case sensitive, length range is 1 to 255 |
domain domain-name |
Specifies the DNS domain name of a log host. |
The value is a string of 1 to 255 case-sensitive characters, spaces not supported. |
Usage Scenario
To configure a device to output logs to a syslog server, run the info-center loghost command. The system logs information about device operations in real time. These logs can be output to the syslog servers for storage and query. If a problem occurs, you can check the logs to learn about what happened to the device during device operation and analyze fault causes.
Prerequisites
Information management has been enabled using info-center enable, and the IP address of a syslog server is reachable.
Configuration Impact
Logs record information about users' operations on an existing device (such as command configuration operation) and specific events (such as a network connection failure). After the info-center loghost command is run, an existing device outputs generated logs to the specified syslog server.
Precautions
The configured log host level does not take effect on security logs.
Rules for a single host to select a VPN
<HUAWEI> system-view [~HUAWEI] info-center loghost domain www.huawei.com vpn-instance vrf1 Warning: There is security risk as this operation enables a non secure syslog protocol.
<HUAWEI> system-view Enter system view, return user view with return command. [~HUAWEI] info-center loghost 3.3.3.3 level critical Warning: The configured loghost level does not take effect on security logs. [~HUAWEI] info-center loghost domain www.huawei.com level critical Warning: The configured loghost level does not take effect on security logs.