cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2492
Views
0
Helpful
2
Replies

EEM for Dual SIM - SNMP OID failed, is there another way?

rkalaivanan
Level 1
Level 1

Hi all,

I'm trying to configure a dual SIM toggle solution for Cisco 819 router and been struggling for 2 weeks now. The example available online using SNMP OID '1.3.6.1.4.1.9.9.661.1.3.2.1.18.12' is not working for me. I get a "NO_SUCH_INSTANCE_EXCEPTION".  Using config below :

 

event manager applet DualSIM
event timer watchdog time 3600

action 1.0 info type snmp oid 1.3.6.1.4.1.9.9.661.1.3.2.1.18.12 get-type exact
action 1.1 syslog msg "Carrier is $_info_snmp_value"

 

Next i tried to manually get the carrier name from "sh cellular 0 network" command and assign it to a variable and use If/else logic to compare with string i specify but this fails too, i dont get a match and it always goes to 'else'.

 

Any idea what am i doing wrong here please?


Configuration :

 

event manager applet SIM
event tag e1 track 10 state down
event tag e2 timer countdown time 120
trigger
correlate event e1 or event e2
action 1.0 track read 10
action 1.1 if $_track_state eq "down"
action 1.15 cli command "enable"
action 1.2 cli command "sh cellular 0 network | inc Network ="
action 1.4 string trimleft "$_cli_result" "Network = "
action 1.5 syslog msg "$_string_result"
action 1.6 if $_string_result eq "CELCOM"
action 1.7 syslog msg "CELCOM Network Issue. Switching to DIGI"
action 1.8 cli command "clear interface cellular 0"
action 1.9 cli command "cellular 0 lte sim activate slot 0"
action 2.0 else
action 2.1 syslog msg "Digi Network Issue. Switching to CELCOM"
action 2.2 cli command "clear interface cellular 0"
action 2.3 cli command "cellular 0 lte sim activate slot 1"
action 2.4 end
action 2.5 end

 

 

1 Accepted Solution

Accepted Solutions

Hey Joe,


Thanks for your reply, i managed to get it working.

 

For the benefit for other folks looking for solution, here's the EEM script I'm using :

 

event manager applet SIM
 event tag e1 track 10 state down
 event tag e2 timer countdown time 120
 trigger
  correlate event e1 or event e2
 action 1.0 track read 10
 action 1.1 if $_track_state eq "down"
 action 1.2  info type snmp oid 1.3.6.1.4.1.9.9.661.1.3.2.1.9.14 get-type exact
 action 1.3  syslog msg "Carrier is $_info_snmp_value"
 action 1.4  set x "$_info_snmp_value"
 action 1.5  cli command "enable"
 action 1.6  if $x eq "CELCOM"
 action 1.7   syslog msg "CELCOM Network Issue. Switching to DIGI"
 action 1.8   cli command "clear interface cellular 0"
 action 1.9   cli command "cellular 0 lte sim activate slot 1"
 action 2.0  else
 action 2.1   syslog msg "Digi Network Issue. Switching to CELCOM"
 action 2.2   cli command "clear interface cellular 0"
 action 2.3   cli command "cellular 0 lte sim activate slot 0"
 action 2.4  end
 action 2.5 end

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

I'd either need to see the full output of "show cellular 0 network" or a walk of 1.3.6.1.4.1.9.9.661.1.3.2.1 to know what advice to give you.

Hey Joe,


Thanks for your reply, i managed to get it working.

 

For the benefit for other folks looking for solution, here's the EEM script I'm using :

 

event manager applet SIM
 event tag e1 track 10 state down
 event tag e2 timer countdown time 120
 trigger
  correlate event e1 or event e2
 action 1.0 track read 10
 action 1.1 if $_track_state eq "down"
 action 1.2  info type snmp oid 1.3.6.1.4.1.9.9.661.1.3.2.1.9.14 get-type exact
 action 1.3  syslog msg "Carrier is $_info_snmp_value"
 action 1.4  set x "$_info_snmp_value"
 action 1.5  cli command "enable"
 action 1.6  if $x eq "CELCOM"
 action 1.7   syslog msg "CELCOM Network Issue. Switching to DIGI"
 action 1.8   cli command "clear interface cellular 0"
 action 1.9   cli command "cellular 0 lte sim activate slot 1"
 action 2.0  else
 action 2.1   syslog msg "Digi Network Issue. Switching to CELCOM"
 action 2.2   cli command "clear interface cellular 0"
 action 2.3   cli command "cellular 0 lte sim activate slot 0"
 action 2.4  end
 action 2.5 end

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: