华为信息中心配置教程(二)

相关阅读

8、配置Log信息输出到Log缓冲区

如果用户希望在Log缓冲区内看到设备产生的Log信息,可以配置Log信息输出到Log缓冲区。

1、使能Log信息向Log缓冲区的发送功能

[Huawei]info-center logbuffer

2、配置Log信息输出到Log缓存区所使用的通道

[Huawei]info-center logbuffer channel ?

  INTEGER<0-9>  Channel number <0-9>

  channel6      6 channel's name is channel6

  channel7      7 channel's name is channel7

  channel8      8 channel's name is channel8

  channel9      9 channel's name is channel9

  console       0 channel's name is console

  logbuffer     4 channel's name is logbuffer

  loghost       2 channel's name is loghost

  monitor       1 channel's name is monitor

  snmpagent     5 channel's name is snmpagent

  trapbuffer    3 channel's name is trapbuffer

[Huawei]info-center logbuffer channel 7 ?

  size  Set the buffer size of log buffer

  <cr> 

[Huawei]info-center logbuffer channel 7 size ?

  INTEGER<0-1024>  The size of logging buffer, the default is 512

3、配置向信息通道输出Log信息的规则

[Huawei]info-center source ?

  6OVER4            6OVER4 module

  AAA               AAA module

  ACL               ACL module

  ACL6              ACL6 module

  ACM               ACM module

  ADDR              ADDR module

  ADP-IPSEC         ADP-IPSEC module

  AM                AM module

  ANTIATTACK        ANTIATTACK module

  APS               APS module

  ARP               ARP module

  ARP-PING          ARP-PING module

  ARPLINK           ARPLINK module

  ATM               ATM module

  …………………………………………………………………………..

[Huawei]info-center source  ARP ?

  channel  Set the name of information channel

[Huawei]info-center source  ARP channel ?

  INTEGER<0-9>  Information channel number

  channel6      6 channel's name is channel6

  channel7      7 channel's name is channel7

  channel8      8 channel's name is channel8

  channel9      9 channel's name is channel9

  console       0 channel's name is console

  logbuffer     4 channel's name is logbuffer

  loghost       2 channel's name is loghost

  monitor       1 channel's name is monitor

  snmpagent     5 channel's name is snmpagent

  trapbuffer    3 channel's name is trapbuffer

[Huawei]info-center source  ARP channel 7 ?

  debug  Debug informational type

  log    Log informational type

  trap   Trap informational type

  <cr>  

[Huawei]info-center source  ARP channel 7 log ?

  level  Setting info level

  state  Setting info state

4、配置Log缓冲区可容纳Log信息的条数

[Huawei]info-center logbuffer size ?

  INTEGER<0-1024>  The size of logging buffer, the default is 512

9、配置Log、Trap、Debug信息输出到日志文件

配置Log信息输出到日志文件后,信息可以以文件的形式保存在设备上,便于用户随时查看设备的运行情况。

1、配置日志文件的大小。

如果设备生成的日志文件超过所配置的大小,系统会自动将日志文件按照标准zip格式压缩成压缩文件。

[Huawei]info-center logfile ?

  channel  Set the channel through which the data is transmitted to the logfile

  path     Set the save path of logfile

  size     Set the size of logfile

[Huawei]info-center logfile size ?

  INTEGER<4,8,16,32>  Specify logfile size, default is 8M

2、配置日志文件的最大保存个数。

如果产生的日志文件超过最大个数,系统将删除日期较老的日志文件,保持日志文件个数小于等于所配置的值。

[Huawei]info-center max-logfile-number ?

  INTEGER<2-500>  File numbers, the default is 200

3、手动将日志文件缓冲区中的信息保存到日志文件。

日志文件缓冲区中的信息会定时自动保存到日志文件中或当日志文件缓冲区满时保存到日志文件中。如需要查看当前信息,可以通过该命令把日志文件缓冲区中的信息保存到日志文件后进行查看。

<Huawei>save logfile

10、配置Log信息输出到控制台/终端

通过配置Log信息输出到控制台,用户可以在控制台(通过Console口登录到设备上的主机)上查看到Log信息,以便及时监控设备的运行情况。

1、使能终端显示信息中心发送信息的功能

<Huawei>terminal monitor

Info: Current terminal monitor is on.

2、使能终端显示Log信息功能

<Huawei>terminal logging

Info: Current terminal logging is on.

11、配置Log、Trap、Debug信息输出到日志主机

通过配置Log信息输出到日志主机,用户可以在日志主机上查看到Log信息,以便及时监控设备的运行情况。

1、配置向IPv4/IPv6日志主机输出Log信息

[Huawei]info-center loghost ?

  IP_ADDR<X.X.X.X>  Logging host ip address

  ipv6              Logging host ipv6 address

  source            Set the source address of packets sent to loghost

[Huawei]info-center loghost 10.1.1.1 ?

  binary        Send binary log

  channel       Assign channel to the logging host

  facility      Set logging host facility

  language      Set the language environment of logging host

  public-net    Connect in Public Network

  vpn-instance  Specify the VPN-Instance name of loghost

  <cr>          Please press ENTER to execute command

[Huawei]info-center loghost 10.1.1.1 language ?

  English  Language environment is English

[Huawei]info-center loghost 10.1.1.1 language English ?

  channel       Assign channel to the logging host

  facility      Set logging host facility

  public-net    Connect in Public Network

  vpn-instance  Specify the VPN-Instance name of loghost

  <cr>          Please press ENTER to execute command

[Huawei]info-center loghost 10.1.1.1 language English facility ?

  local0  Logging host facility

  local1  Logging host facility

  local2  Logging host facility

  local3  Logging host facility

  local4  Logging host facility

  local5  Logging host facility

  local6  Logging host facility

  local7  Logging host facility

[Huawei]info-center loghost 10.1.1.1 language English facility local2 ?

  channel       Assign channel to the logging host

  public-net    Connect in Public Network

  vpn-instance  Specify the VPN-Instance name of loghost

  <cr>          Please press ENTER to execute command

2、配置设备向日志主机发送消息的源接口信息

[Huawei]info-center loghost source ?

  GigabitEthernet  GigabitEthernet interface

  NULL             NULL interface

[Huawei]info-center loghost source GigabitEthernet 0/0/2

12、配置Trap信息输出到Trap缓冲区

 [Huawei]info-center trapbuffer

13、配置Trap信息输出到控制台/终端

<Huawei>terminal trapping

Info: Current terminal trapping is on.

14、配置Trap信息输出到SNMP代理

当设备出现异常或故障时,网络管理员希望能及时了解到设备的运行情况,以保证设备的正常工作。通过配置Trap信息输出到网管服务器,可以实现网络管理员对设备的实时监控,及时定位设备运行故障。

配置Trap信息输出到网管之前,需要先配置Trap信息输出到SNMP代理,然后通过SNMP代理向网管服务器发送Trap信息。

1、配置Trap信息输出到SNMP代理所使用的通道

[Huawei]info-center snmp channel ?

  INTEGER<0-9>  Channel number <0-9>

  channel6      6 channel's name is channel6

  channel7      7 channel's name is channel7

  channel8      8 channel's name is channel8

  channel9      9 channel's name is channel9

  console       0 channel's name is console

  logbuffer     4 channel's name is logbuffer

  loghost       2 channel's name is loghost

  monitor       1 channel's name is monitor

  snmpagent     5 channel's name is snmpagent

  trapbuffer    3 channel's name is trapbuffer

2、启动SNMP代理功能

[Huawei]snmp-agent

15、配置Debug信息输出到控制台/终端

<Huawei>terminal debugging

Info: Current terminal debugging is on.

16、清除信息中心的统计信息

<HUAWEI> reset info-center statistics

17、清除日志缓存区的统计信息

<Huawei>reset logbuffer

Warning: This command will reset the log buffer. Logs in the buffer will be lost

. Continue? (y

18、清除告警缓冲区的统计信息

<Huawei>reset trapbuffer
© 版权声明
THE END
喜欢就支持一下吧!
点赞97 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容