12-12-2013 09:21 AM
I am trying to create a TCL script to suppress PfR learning syslog messages:
%OER_BR-5-NOTICE: Prefix Learning STARTED
%OER_BR-5-NOTICE: Prefix Learning STOPPED
I only wish to suppress these messages.
All other syslog messages are needed.
I have started with the following:
puts [open "flash:test" w] {
if { [ regexp { "Prefix Learning STOPPED" } $::orig_msg ] } {
return ""
} else {
return "$::orig_msg"
}
}
I am seeing the errors:
Error packaging args for ESM.
Error packaging args for ESM.
Also, although I am only scripting with the "STOPPED" messages to begin, I am not seeing the "STARTED" messages either.
I have done some bash scripting but am new to scripting TCL.
Paul
12-15-2013 10:11 AM
When you "more" this file on flash, what are the contents? I did notice one error. Your script should be:
if { [regexp {Prefix Learning STOPPED} $::orig_msg] } {
return ""
}
return $::orig_msg
12-23-2013 11:14 AM
The script you have listed:
if { [regexp {Prefix Learning STOPPED} $::orig_msg] } {
return ""
}
return $::orig_msg
... is filtering both the "%OER_BR-5-NOTICE: Prefix Learning STOPPED" and the "%OER_BR-5-NOTICE: Prefix Learning STARTED" messages. However, I am not understanding why it is filtering the "%OER_BR-5-NOTICE: Prefix Learning STARTED" messages. My worry is the script may also be filter other unknown needed to be seen messages. In the end, I do want to filter both, but need to key in on each message individually in th script. Is there a way to do that and verify each is filtered individually? Also, I am getting ESM errors on the non-filtered console during filtering:
Error packaging args for ESM.
Error packaging args for ESM.
Are you familar with these errors or seen these types of messages before?
Thank you for you assist,
Paul
12-23-2013 12:22 PM
Post your config and IOS version from this device.
12-23-2013 02:06 PM
test123-br# do sh ver | inc .bin
System image file is "flash:c2951-universalk9-mz.SPA.152-4.M4.bin"
-
test123-br# do sh run
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname test123-br
!
boot-start-marker
boot system flash:c2951-universalk9-mz.SPA.152-4.M4.bin
boot-end-marker
!
logging buffered filtered
!
no aaa new-model
!
username -------- password ---------
!
!
ip cef
!
!
key chain --------
key ----
key-string --------
!
pfr border
logging
local GigabitEthernet0/0
master ---.---.---.--- key-chain --------
active-probe address source interface Tunnel1
!
!
redundancy
!
interface Tunnel1
ip address ---.---.---.--- 255.255.255.0
no ip redirects
ip mtu 1470
ip flow ingress
ip nhrp authentication --------
ip nhrp map multicast dynamic
ip nhrp map multicast 172.16.0.2
ip nhrp map ---.---.---.--- 172.16.0.2
ip nhrp network-id ------
load-interval 30
tunnel source 172.16.0.1
tunnel mode gre multipoint
tunnel key ---------
!
!
interface GigabitEthernet0/0
description PSUEDO LAN
ip address 192.168.1.4 255.255.255.248
!
interface GigabitEthernet0/1
description PSEUDO WAN
ip address 172.16.0.1 255.255.255.0
!
router eigrp 1
network 172.16.0.0
network 192.168.1.0
!
no ip http server
no ip http secure-server
!
ip sla auto discovery
logging filter flash:test101.tcl
!
line con 0
exec-timeout 60 0
login local
!
line aux 0
transport none
!
line 2
no activation-character
no exec
transport preferred none
transport none
stopbits 1
line vty 0 4
exec-timeout 60 0
login local
transport input ssh
!
end
!
test123-br# do show log
Console logging: level debugging, 600 messages logged, xml disabled,
filtering disabled
Monitor logging: level debugging, 30 messages logged, xml disabled,
filtering disabled
Buffer logging: level debugging, 30 messages logged, xml disabled,
filtering enabled (30 messages logged)
Exception Logging: size (8192 bytes)
Count and timestamp logging messages: disabled
Persistent logging: disabled
Filter modules:
flash:test101.tcl
12-23-2013 03:55 PM
This looks like a regression of CSCsq49519. There is no workaround, and this seems to specifically affect this OER messages.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide