cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3486
Views
5
Helpful
6
Replies

SCCP Unknown sessions

agup
Level 1
Level 1

We have a problem where the SCCP get stuck in 'UNKNOWN' / 'inactive' state. we run 'show sccp conn' command to check it manually. Looking for a script where we check for 'UNKNOWN' / 'inactive' sessions every hour, if there are 'n' number of sessions, then it would send out SNMP trap. Example output shown from 'sh sccp conn' command -

#sh sccp conn

sess_id    conn_id      stype mode     codec   sport rport ripaddr conn_id_tx

53645003   50656921     conf  inactive UNKNOWN 31106 0     UNKNOWN

53667104   50665149     conf  inactive UNKNOWN 16976 0     UNKNOWN

53671501   50666736     conf  inactive UNKNOWN 32456 0     UNKNOWN

Total number of active session(s) 3, and connection(s) 3

Thanks in advance...totally new to EEM scripting.....

1 Accepted Solution

Accepted Solutions

Okay, then you can do this using an applet.

event manager applet sccp_watch

event timer watchdog time 3600

action 1.0 cli command "enable"

action 2.0 cli command "show sccp conn"

action 3.0 set i 0

action 4.0 foreach line $_cli_result "\n"

action 4.1  regexp UNKNOWN $line

action 4.2  if $_regexp_result eq 1

action 4.3   increment i 1

action 4.4  end

action 4.5 end

action 4.6 subtract $i 2

action 4.7 if $_result ge N

action 4.8  snmp-trap strdata "The number of UNKNOWN SCCP sessions is $_result"

action 4.9 end

View solution in original post

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

What version of code is your router running?

IOS is 15.1.M4

Okay, then you can do this using an applet.

event manager applet sccp_watch

event timer watchdog time 3600

action 1.0 cli command "enable"

action 2.0 cli command "show sccp conn"

action 3.0 set i 0

action 4.0 foreach line $_cli_result "\n"

action 4.1  regexp UNKNOWN $line

action 4.2  if $_regexp_result eq 1

action 4.3   increment i 1

action 4.4  end

action 4.5 end

action 4.6 subtract $i 2

action 4.7 if $_result ge N

action 4.8  snmp-trap strdata "The number of UNKNOWN SCCP sessions is $_result"

action 4.9 end

thanks Joseph, it works. The only difference I had to make was the following to match my requirements, thanks a lot to you and this forum.

event manager applet sccp_watch

event timer watchdog time 3600

action 1.0 cli command "enable"

action 2.0 cli command "show sccp conn"

action 3.0 set i 0

action 4.0 foreach line $_cli_result "\n"

action 4.1  regexp inactive $line

action 4.2  if $_regexp_result eq 1

action 4.3   increment i 1

action 4.4  end

action 4.5 end

action 4.6 if i ge N

action 4.7  snmp-trap strdata "The number of inactive SCCP sessions are $i"

action 4.8 end

I assume you also changed the 'N' in action 4.6 to the actual value of problem sessions, correct?

yes, that's right. N was changed to a value.

Review Cisco Networking for a $25 gift card