cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
893
Views
1
Helpful
3
Replies

Changing log severity on IOS-XE

Hi all, 
I'm trying to change the log severity and a traffic hits an ACL.
I.E the following logging.

 %FMANFP-6-IPACCESSLOGDP: F0/0: fman_fp_image: list TEST denied icmp 00be.750d.4e80 1.1.1.2 -> 10.10.10.10 (2048/0), 19 packets

I want to increase from 6 to 4

However, when I try to insert the command. I get an error (see below).

Router#tclsh
Router(tcl)#if { $::facility == "FMANFP" && $::mnemonic == "IPACCESSLOGDP" }
can't read "::facility": no such variable
Router(tcl)#{
+> set incr sev_index [ string first $::mnemonic $::orig_msg ] -2
+> return [string replace $::orig_msg $sev_index $sev_index 4]
+>}
invalid command name "
set incr sev_index [ string first $::mnemonic $::orig_msg ] -2
return [string replace $::orig_msg $sev_index $sev_index 4]
"

set incr sev_index [ string first $::mnemonic $::orig_msg ] -2
retu^rn [string replace $::orig_msg $sev_index $sev_index 4]%

Invalid input detected at '^' marker.

 

Does anyone know how to do this on IOS-XE 7.9?

Thanks.

3 Replies 3

pieterh
VIP
VIP

1) I guess you are mixing logging discriminator syntax with tclsh commands

2) IOS-XE 7.9   => should have been 17.9 ?

you may find this helpfull: 
System Management Configuration Guide, Cisco IOS XE 17.x - Embedded Syslog Manager (ESM) [Cisco IOS XE 17] - Cisco
section:  
Example: Severity Escalation

I dont know I dont think it easy task

Instead you can use filter to filter all log in that level and only appear the one you want.

MHM

Hello,

it looks like you are missing the curly braces for the conditional block ?

Try this syntax (copy and paste the entire line):

if { $::facility == "FMANFP" && $::mnemonic == "IPACCESSLOGDP" } {
set incr sev_index [string first $::mnemonic $::orig_msg] -2
return [string replace $::orig_msg $sev_index $sev_index 4]
}