
华为信息中心配置教程(一) h9 ~' F( ]- W+ w( J% i
1、使能信息中心 l5 {+ x: r9 t2 ^! G4 u
设备运行时,信息中心会通过信息的形式实时记录设备运行情况。只有使能了信息中心功能,系统才会向日志主机、控制台等方向输出系统信息。网络管理员可以存储和查阅输出信息为监控设备的运行情况和诊断网络故障提供依据。
. j) @, F% i7 h [Huawei]info-center enable ! q' F, ~: T$ n3 r8 p
Info: Information center is enabled.
( }. c% u% ?1 k( \; |9 i n' G, r' [* r! G
2、重命名信息通道
, v8 S; n* g( g! W2 L 为了方便记忆和使用,用户可以将各个通道重新命名。用户在命名通道时需注意各个不同的通道名称不可重复,而且最好将通道名称与实际的通道功能对应起来以免混淆。
& u/ ?' i6 `# l8 |/ ^& f 缺省情况下,各信息通道的名称如下表:+ ^5 U f* ~$ K3 a) \: P5 x* X
表1 信息通道的缺省通道名
+ e; a3 z: R0 F0 a' A( c, v; b | 通道编号 8 C( Z2 q& q( S' n; l7 t4 ?
| 缺省通道名
" `1 j" f# S! u0 ` | 0
# U ` L1 C* T | console
8 f9 }' ?7 Y1 {, ~' U- ]$ G2 Y | 1 ( H1 ~# _# K8 B9 h% o
| monitor 5 C- B* e0 y4 I+ X5 `2 W: g2 i# N
| 2 & V" ~4 s8 M" Y8 q; Y( b
| loghost
" b* W: n D2 x6 A. \5 @, R | 3
# x2 [2 {6 ^9 Q5 @1 Y$ ?) t | trapbuffer / p- i+ z2 C& }7 i! ~/ [2 C s
| 4 8 K6 V% h& s4 j7 A0 _! B
| logbuffer % U# [- C- i/ L# e4 ]
| 5
9 g R0 Z" R. q | snmpagent
" Y6 ]! Y( ?$ {$ C | 6
; {1 d5 E/ r. k! T2 b; e | channel6
( i9 i- G9 _' p7 @; V | 7 - u$ G5 c5 f) l6 }8 L1 W$ d: Y
| channel7 5 r* r: h! j9 M6 {1 Y6 P) g
| 8 $ @' k& s; x. L/ H, v% ]) K
| channel8 ( |8 _7 ?, X1 A; E6 q
| 9 ) {* O+ B' U9 W* m ?" w
| channel9 4 W7 W( E! [' \7 Y" a) |+ _
| [Huawei]info-center channel ?* v5 P& `+ e0 n, j
INTEGER<0-9> Information channel number
! r; g/ k2 P# L
( s8 t- R# Z& w' h [Huawei]info-center channel 2 ?
% z, i; ~$ l1 [$ ~( a" N name Rename information channel
: C. e8 T" h7 b* L1 i" M& u
- y+ S, b* d) Z- [4 c7 C0 Q9 c [Huawei]info-center channel 2name ?6 n: \4 R. D/ O+ I# r# g
STRING<1-30> Information channel name (only composed ofletters or digits,and must start with a letter)- i+ \. L) z2 _4 G9 ?/ g* h
7 n2 O3 X8 I# s" H8 q4 P
[Huawei]info-center channel 2 name loghost2
2 M9 Q% @; K1 h2 q5 a8 C U1 W 5 |- r3 O( z9 t* [) ~) i
3、对指定的Log或Trap信息进行过滤
) y" k( y) H" s1 h 当用户不需要关注某些Log或Trap信息时,可以配置信息过滤功能来屏蔽此类信息的输出。配置生效后,信息中心对此类信息就不进行发送处理,信息中心的各个输出方向也都无法获得此信息。
: A, T* G7 L1 [9 \ 1、配置以ID方式对日志进行过滤3 t- s- ]: Q& r1 j' v& V, R0 n" F* R
[Huawei]info-center filter-id ?2 a0 H; G F" Z) ]- v6 g a9 _
INTEGER<0-4294967295> Specify the ID of the log to be filtered
3 L& B& m8 n' T7 @ bymodule-alias Specify a log by the module and alias
: n7 b% u3 ^- r3 f8 [3 i" L6 e
S! `! b1 B* V# N1 O" N7 m [Huawei]info-center filter-id 40391010
' x3 O H0 l8 ~2 a( B9 f N( f 1 ~+ F# ?0 t3 k. Q
2、配置通过模块名和助记符进行过滤: o& ~9 _4 Y: g( a
[Huawei]info-center filter-id bymodule-alias ?/ W6 P3 k6 \9 a
6OVER4 6OVER4 module
2 W2 O6 d. f, |% C, w3 E- y& V7 h N) L AAA AAA module5 `: g& G! V8 i. M1 q/ k0 z) { @
ACL ACL module. j/ ?/ _! t' R1 P" K; C
ADDR ADDR module7 q+ p+ k7 j! H5 |; M1 ^
ADP-IPSEC ADP-IPSEC module
" r/ F0 \. `* u! ^9 W$ e5 P ANTIATTACK ANTIATTACK module
' q4 k$ N& x- B/ `; w/ o! n! U APS APS module, _8 W1 T" G6 l$ y
ARP ARP module) C; n' f3 l. r4 d
ARPLINK ARPLINK module
/ }7 ?/ Y+ T% m. w: L) V ATM ATM module( K" s$ L% q+ f1 U x' T
BFD BFD module
5 D1 ^; ~! z* o; m& J: _ BGP BGP module
$ A' t! Z% a& {( q# | BULKSTAT BULKSTAT module: z4 d+ f/ W- F% \
CDM CDM module
( b/ K/ L, D( B CFM CFM module! q8 h* ?! A4 d' D
……………………………………………………………….: w2 K' }8 b% d( t' H- u
WLAN WLAN module
( X- J4 i( z0 `' A# o5 @: _
+ | ]3 c4 E# R; @9 J/ c [Huawei]info-center filter-idbymodule-alias CMD ?7 y6 x; g5 ^ S4 C* A% a0 M
CLKCHGREBOOTCANCELED Scheduled reboot will be canceled because[string]changed system clock.; e5 ~$ x1 \( Y0 p% i) S
CMD_PRI_REARRG The user chose [STRING] when decidingwhether to rearrange the command level.3 u, q3 R( Z' ?; T% g2 y7 n
………………………………………………..
/ N* Y( ] U1 W5 }6 `+ Q; ` SUPER_CHANGE_SUCCESS OID [oid] Super change successful.
# L' i5 c9 p. ~ UTCCLOCKCHANGE OID [oid] The system UTC clock changed.(CurrentTime=[STRING])
' }! Y/ @' \" }0 S. x# }( b q4 W4 f
b4 k! I% S% U0 ^ [Huawei]info-center filter-id bymodule-alias CMD CMD_PRI_REARRG
3 t: N& D) O3 f
4 o% S/ N" o, Z* @, X5 ^' W( n, S7 ~ 4、配置输出的Log、Trap和Debug信息的时间戳
4 H8 h+ A5 t, G 如果用户希望为了适应自身习惯或者本地时间而需要调整信息的时间格式和时间精度时,可以配置时间戳。
& h* j9 ~/ j7 ?* C 1、配置时间戳格式(如boot)4 o! m& V- i4 i( S4 Y R( c' S# x
[Huawei]info-center timestamp ?* w0 n" H, b4 u
debugging Set the time stamp type of the debuginformation
?2 y6 ]! \( M log Set the time stamp type of the loginformation
! i( O( w+ H8 r/ v* }2 u& d4 y trap Set the time stamp type of the alarminformation
- N; a1 N& S, P. W) ]* A 3 ^* f3 d5 ~! n; o, |- P
[Huawei]info-center timestamplog ?8 T& D% k! f' Y/ f- o
boot Information time stamp of relativetime type
& `8 P3 b$ `7 _ f+ |" n date Information time stamp of date type
n9 h4 y9 k2 q* y, t3 Z A format-date Information time stamp of date another type6 W/ r3 Y5 @( p; b& J* ~8 l
none None information time stamp3 Z; p D4 s" R6 \7 k, L4 C
short-date Information time stamp of short date type:(MM:DD)
9 T$ v8 `( ~2 I9 d/ P
" m4 D; N% ?( O* y, F [Huawei]info-center timestamp log boot; P5 V5 f# W# o% ^, ?+ _- l; [) P
, X3 c4 k5 y: j) U. b+ y
2、配置时间戳精度9 K/ Y, o, y/ `1 O% Q8 V8 b
[Huawei]info-center timestamp log date ?
1 p3 |+ u$ o1 V0 [ precision-time Information time stamp of precision time type! R. R/ ^5 k' [
<cr> ; w' O0 M: P l: j: H! o! o
, s8 g) Q [+ L A4 T
[Huawei]info-center timestamp log date precision-time ?8 Q1 L. M$ d' v' O1 H/ J. J
millisecond Accurate to millisecond h3 j$ B& G, K2 N: P' S
second Accurate to second
. v$ H" b+ e5 R {" H- t$ N tenth-second Accurate to 1/10 second
- H5 m4 r2 p" u4 Y: ~0 j
% ?: j. M1 ]5 U) E+ ], `) y7 o/ I [Huawei]info-center timestamp log date precision-time millisecond
' G) J8 \0 P+ ?! \ {+ ~/ Y* E 2 B( g! T6 ]: E- s
5、去使能本地日志信息计数功能$ |* Q: _/ x. w' {
随着设备的长时间运行,可能会产生大量的Log信息。
5 K0 y( }6 F* z) a+ t W 如果用户希望记录到日志缓冲区、日志文件或者发送到控制台和终端的Log信息不携带流水号信息,可以配置去使能Log信息的计数功能。
: x2 }$ O3 b2 x8 W# C. U 如果用户希望记录到日志缓冲区、日志文件或者发送到控制台和终端的Log信息重新计数,可以先去使能Log信息的计数功能,然后再使能Log信息的计数功能。
; o7 j3 A9 ]) U0 a- N* O" w 如果用户为了查看是否所有的日志信息都记录到日志缓冲区、日志文件或者发送到控制台和终端,可以使能Log信息的计数功能,使生成的Log信息带有顺序递增的序列号。
# ~: e6 a o# A. ]0 K D 如果Log信息发送到日志文件、控制台或者终端,那么日志信息在这些不同的输出方向上独立计数,且日志计数序列号为正向排序,即最早的日志计数序列号为0,越新的日志序列号越大。2 U* f. ]7 |& @* T$ r7 _
如果Log信息发送到日志缓冲区,那么日志计数序列号为逆向排序,即最新的日志计数序列号为0,越老的日志序列号越大。
& W: Y8 U0 L6 k5 I 1、查看log日志缓存- H7 _& ^: O9 r( @9 d7 s3 Y+ M5 q5 {
<Huawei>display logbuffer ( Z: u% m, g2 l
Logging buffer configuration and contents : enabled @7 r2 c a+ C4 h1 a
Allowed max buffer size : 1024% W7 }8 z% [6 K! |7 S9 R
Actual buffer size : 512: Q; k/ e( U- I: D4 [
Channel number : 4 , Channel name : logbuffer
8 K. B3 P( ]" a4 i- L- o Dropped messages : 0
' v0 s( d0 |5 e: O f Overwritten messages : 0% _1 }: @4 @4 f7 d* w
Current messages : 1* k5 K" m, |( A6 h
) r! k9 d) {" ?, Y
Oct 6 2016 09:55:43-08:00Huawei %%01GTL/4/STATECHANGED(l)[0]:License state cha& W1 d" G2 m# x7 ~
nged from Default to Default./ L3 E7 s& Y9 I. d8 }
: Q4 S: S/ w! X5 ?1 K7 g 2、去使能Log信息的计数功能, `2 Z2 Z1 J; z$ F [
[Huawei]info-center local log-counter disable
; r' S1 F6 S) N- O
& ~7 T, E1 s! B, P, a 6、配置海量log日志抑制功能 e% p3 I1 |: Q r# ^
设备运行过程中,当连续产生具有相同日志ID的大量日志时,对信息中心的处理造成冲击,会影响其他日志的记录,严重时可能对运行业务带来影响。- x, m; r& I2 c, x+ E
信息中心以单条日志为单位进行日志的流量监控,当监控周期内日志的流量持续超过阈值时,对该日志进行抑制,每秒内只处理阈值条日志,超过阈值的日志丢弃;当日志发送流量降低到阈值以下,经过5倍监控周期后,解除对日志的抑制。
8 F- [- [; a& n; X C- h5 ^ 1、设置信息中心每秒处理单条日志的阈值。( a$ K! \8 ?4 [% X& p! |0 |
信息中心日志缺省采用统一阈值(30条每秒),但是个别日志根据其使用场景选取的缺省值会高于50条。但是用户可以通过手工配置所有日志的阈值。如果阈值设置过小可能导致一些日志丢失。如果阈值设置过大可能导致信息中心不能分离出海量日志。
+ }. e! F- q" J6 K. D% g+ T6 t' T [Huawei]info-center rate-limit ?" ]% B1 `; r1 F0 K& N
except Specify the log which that ratelimit won't take effect on, T% i# W% v" [4 V# F
global-threshold Value of threshold, the default is 400 persecond
/ ^' e; A! s$ H: Y- U: L monitor-period Specify the monitor period (in seconds) forrate limit. The default is 3 seconds
6 u& _- x$ z$ S( u# ] threshold Specify the maximum number of acertain log that the
2 \ N4 }) p$ }. }4 E9 }3 a information center can process in one second. If the log H2 N% r' u. h
is notspecified, the threshold takes effect on all logs.: C' p4 y g+ I( Q3 l4 W
The default is 30 per second; l( Z% K" C' s% }/ U6 b
; A; u' m- }, U6 H+ B
[Huawei]info-center rate-limit threshold ?, \+ d$ ~& b$ B {: s
INTEGER<1-500> Value of the threshold, the default is 30 persecond. \- E" U3 _$ x% _
) z8 Y* F K) K# u [Huawei]info-center rate-limit threshold 30 ?
% ~- Y& w0 D; _ byinfoid Specify a log by the information ID # 指定日志ID) M, a9 N/ h1 T2 d) \1 R
bymodule-alias Specify a log by the module and alias # 指定模块名称指定日志2 m1 N3 v5 j7 s0 f
<cr>5 f/ j7 D, p5 j# j4 p- g
/ j, o3 b. @5 m# k
2、配置信息中心每秒处理日志总数
4 u$ b: |3 `) K [Huawei]info-center rate-limit ?
! L: T J( Z( I `9 _* x* z except Specify the log which that ratelimit won't take effect on
7 J' h3 k3 }! {* F: D! C. a+ V global-threshold Value of threshold, the default is 400 persecond
8 J6 t6 y6 p) a- F' e Q L$ b monitor-period Specify the monitor period (in seconds) forrate limit. The default is 3 seconds. w/ V/ y# ^$ ?3 J+ f& ]' d
threshold Specify the maximum number of acertain log that the/ a9 w1 Y7 U0 ?
information center can process in one second. If the log
0 U* c0 @" X+ @* h2 u8 Q- O9 R- K is notspecified, the threshold takes effect on all logs.4 a3 Y0 y4 _# m5 H5 x0 f: T" f
Thedefault is 30 per second/ C# }* b9 \$ }# I
- V2 I6 y) ]5 @' K8 |5 g [Huawei]info-center rate-limit global-threshold ?
7 H. {+ s8 ]6 l/ f, G INTEGER<100-1000> Specify the maximum number of logs that theinformation
+ B0 a, Y. |. H- m( {6 m) u$ r centercan process in one second. The default value is
# T' L7 i( T q" D& V, A" F6 c 400 persecond
; k+ ^" u9 j6 p) X& i
$ k2 M2 a4 |' t3 @0 f" e 3、配置信息中心进行速率抑制的监控周期7 f9 [! g8 J; `( F
[Huawei]info-center rate-limit monitor-period ?
6 X$ S, i( n. w" u8 q INTEGER<1-60> Value of the threshold, the default is 3 persecond4 Y9 s! I( }; w' ~! I
0 d" b0 u+ | w/ ?- [
4、配置日志不受信息中心日志速率抑制。
4 \# n' x. G$ n, E O: g. |4 c 当某日志拥有很好的机制保障不会发生海量日志时,可以使用此命令解除信息中心日志速率抑制对其可能造成的影响。使用该命令配置后,信息中心的日志速率抑制对其不再产生监控作用。
( [6 o" h7 s q( c [Huawei]info-center rate-limit except ?% C) m3 D+ d3 R/ r2 ^8 L c' u
byinfoid Specify a log by the information ID2 U; g' I2 W9 v& a" c
bymodule-alias Specify a log by the module and alias
. m: E( a/ P' K$ E! A: z- ^ 0 N; U, w! b$ y" g3 A
[Huawei]info-center rate-limit except byinfoid ?
$ k: y/ ]6 |2 o3 s" i INTEGER<0-4294967295> Information ID4 N& {2 C/ x% l0 j& K
. t+ D4 u7 E6 {1 Q4 [5 e& Y 7、配置连续重复log日志的统计抑制功能: }; W) X* Q( W. O; _8 o3 r
在系统中,日志的触发由各个业务模块的处理流程控制,触发的信息量也在业务模块的流程中控制,信息中心负责对接收到的信息进行处理。
$ ]! t/ `( }; ^& }8 ]2 R 但是如ARP、VRRP等业务模块在某些场景下会短时间产生大量重复日志,这时可以使能连续重复日志的统计抑制功能,避免信息中心受到冲击而影响其他日志的记录。( p: B7 H" { n! o2 x
只有日志ID和全部参数完全相同,且中间无其它日志的两条日志,才可判定为连续重复日志。0 F6 z7 h' F+ r" o) R: N+ F
[Huawei]info-center statistic-suppress enable |
|