定义Cisco设备的log级别(日志审核策略)

Post by mrchen, 2010-9-6, Views:
原创文章如转载,请注明:转载自冠威博客 [ http://www.guanwei.org/ ]
本文链接地址:http://www.guanwei.org/post/Cisconetwork/09/Cisco-log.html

 如果你是一名网络运维工程师,那cisco网络设备告警信息相信是你最关心的了,但并不是所有的log都是你关心的,如何才能定制你需要的log级别呢,cisco的设备log是可以选择的。

下面是配置命令,选择你需要的配置上吧
site1(config)#logging buffered ?
<0-7> Logging severity level
<4096-2147483647> Logging buffer size
alerts Immediate action needed (severity=1)
critical Critical conditions (severity=2)
debugging Debugging messages (severity=7)
emergencies System is unusable (severity=0)
errors Error conditions (severity=3)
filtered Enable filtered logging
informational Informational messages (severity=6)
notifications Normal but significant conditions (severity=5)
warnings Warning conditions (severity=4)
xml Enable logging in XML to XML logging buffer


我一般在非核心使用的是notifications 这个级别,核心设备使用informational
比如我要配置一个logging级别是6(informational),并指定源接口,和syslog服务器地址

site1(config)#do show log #这时我还没有指定
Syslog logging: enabled (11 messages dropped, 8 messages rate-limited,
0 flushes, 0 overruns, xml disabled, filtering disabled)
Console logging: level debugging, 48 messages logged, xml disabled,
filtering disabled
Monitor logging: level debugging, 0 messages logged, xml disabled,
filtering disabled
Buffer logging: level notifications, 0 messages logged, xml disabled,
filtering disabled
Logging Exception size (4096 bytes)
Count and timestamp logging messages: disabled

No active filter modules.

Trap logging: level informational, 59 message lines logged


site1(config)#logging buffered informational 
site1(config)# logging host 1.1.1.2 
site1(config)#logging source-interface loopback 0

下面检查log级别是不是我所指定的
site1#show logging 
Syslog logging: enabled (11 messages dropped, 8 messages rate-limited,
0 flushes, 0 overruns, xml disabled, filtering disabled)
Console logging: level debugging, 52 messages logged, xml disabled,
filtering disabled
Monitor logging: level debugging, 0 messages logged, xml disabled,
filtering disabled
Buffer logging: level informational, 3 messages logged, xml disabled, #级别已经改为informational了
filtering disabled
Logging Exception size (4096 bytes)
Count and timestamp logging messages: disabled

Tags: cisco  日志  审核  log 
本文未看懂?联系冠威客服,享受手把手服务,远程、现场任您选。优惠期间,免费服务!
有更好的解决方案?联系冠威客服,加入冠威,成为冠威客。发表文章,赚取佣金!
冠威客服:E-mail:Service@GuanWei.Org QQ:1026092 合作伙伴:淘男网
分类:Cisco笔记 | 评论:0 | 引用:0
分享到:

上一篇:双击热备份和负载均衡的区别和联系
下一篇:ubuntu小企鹅输入法(Fcitx,堪比sougou输入法)安装的一些问题(乱码等)

或许你还对下面的文章感兴趣

Comments

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Hot Articles

New Articles

Last Comments

Guest