< Home

Configuring the Device to Output Traps to a Log Host

Context

After configuring the device to output traps to a log host, you can view traps saved on the log host to monitor device running.

Pre-configuration Tasks

There is a reachable route between the device and the log host.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run the following command as required.

    • Run info-center loghost ip-address [ channel { channel-number | channel-name } | facility local-number | language language-name | { vpn-instance vpn-instance-name | public-net } | local-time | log-counter { disable | enable } | port port | security-log | operation-log | { source-ip source-ip-address } | transport { udp | tcp ssl-policy policy-name } ] *

      The device is configured to output traps to the IPv4 log host.

    • Run info-center loghost ipv6 ipv6-address [ channel { channel-number | channel-name } | facility local-number | language language-name | local-time | log-counter { disable | enable } | port port | security-log | operation-log | transport { udp | tcp ssl-policy policy-name } ] *

      The device is configured to output traps to the IPv6 log host.

    • Run info-center loghost domain domain-name [ vpn-instance vpn-instance-name ] [ channel { channel-number | channel-name } | facility local-number | language language-name } | log-counter { disable | enable } | local-time | port port | security-log | operation-log | transport { udp | tcp ssl-policy policy-name } ] *

      The device is configured to output traps to the log host with the specified domain name.

    By default, the device does not output traps to a log host.

    The device can output traps to eight log hosts (IPv4 and IPv6 hosts) to implement backup among log hosts.

  3. Run info-center source { module-name | default } channel { channel-number | channel-name } trap { state { off | on } | level severity } *

    A rule for outputting traps to a channel is set.

    By default, channel 2 is enabled to output traps and the lowest severity is debugging.

  4. (Optional) Run info-center loghost source interface-type interface-number

    The source interface used by the device to send messages to a log host is specified.

    By default, the source interface for a device to send messages to a log host is the actual interface that sends the messages.

    After the source interface is specified, the log host determines the device that sends messages. The log host then can easily retrieve received messages.

  5. (Optional) Run info-center loghost source-port source-port

    The source interface number used by the device to send messages to a log host is configured.

    By default, the device sends messages to a log host using interface 38514.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >