◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
定义Cisco设备的log级别(日志审核策略)
Post by mrchen, 2010-9-6, Views:本文链接地址: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
本文未看懂?联系冠威客服,享受手把手服务,远程、现场任您选。优惠期间,免费服务!
有更好的解决方案?联系冠威客服,加入冠威,成为冠威客。发表文章,赚取佣金!
冠威客服:E-mail:Service@GuanWei.Org QQ:1026092
或许你还对下面的文章感兴趣
- SSH加强思科路由器远程管理安全 (2010-8-18 10:51:54)
- 思科(Cisco)路由器策略路由配置详解 (2010-8-15 19:44:31)
- 思科Cisco路由器access-list访问控制列表命令详解 (2010-7-25 0:2:44)
- 思科Cisco策略路由(policy route)精解 (2010-7-24 23:34:20)
- 如何防止思科(Cisco)路由器用DNS翻译不存在的命令 (2010-7-24 22:56:46)
- 思科Cisco IOS命名规则(代表什么意思,支持哪些协议) (2010-7-24 17:1:27)
- 实验11:思科(Cisco)路由器点到点链路上的OSPF (2010-6-26 22:54:23)
- 思科(Cisco)CleanPipe防DDOS解决方案 (2010-6-18 13:57:26)
- 实验10:Cisco(思科)路由器EIGRP协议的基本配置 (2010-6-18 11:49:10)
- 实验9:Cisco(思科)路由器RIPv2协议的基本配置 (2010-6-18 11:22:28)
