cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
328
Views
0
Helpful
4
Replies
marvinbdavis
Beginner

EEM Script - Help With Detecting Missing Output Of A Command

I would like to detect when the result of a command, its output is missing.

The output is missing due to the failure of cellular SIM card. All parameters on the SIM card will be missing.

 

Examples:

command - show cell 0 hardware | inc Digital Network-Number

normal command output -  Digital Network-Number (MSISDN) = 6571234567

no output due to SM Card failure - Digital Network-Number (MSISDN) = 

 

I am a beginner with EEM. I have written the basic script below to detect the SIM card failure but I would like critique if this is the best way to accomplish my goal.

 

The cellular router is a backup on demand router. When the SIM card fails, there is no way of detecting the failure since the network monitoring system will see that the router loopback and other interfaces are up even though the cellular interface is down. The only way I know how to accomplish this at this time is to have the network monitoring system detect at a fixed time of day (before or after business hours) when the router reloads, when the EEM script has been run.

 

Alternative Command - show cell 0 profile 3 | inc PDP address

 

EEM Script

 

event manager applet sim_card_health_fail

event timer cron cron-entry "0 6 * * 1-6"
action 0002 cli command "enable"
action 0004 cli command "term exec prompt timestamp"
action 0006 cli command "term length 0"
action 0008 cli command "show cell 0 hardware | inc Digital Network-Number"
action 0010 regexp "[0-9.] +" "$_cli_result"
action 0012 if $_regexp_result ls "0"
action 0014 reload
action 0016 end

 

Thank You

4 REPLIES 4
balaji.bandi
VIP Expert

You can do monitor using SNMP for that interface with your NMS

 

https://www.cisco.com/c/en/us/td/docs/routers/access/interfaces/NIM/software/configuration/guide/4GLTENIM_SW.html

 

you can shutdown and no shutdown cellular interface manually will that come up, then you can do action instead of reloading - shut and no shut.

You can also use ping using the cellular interface as a source to ping outside - based on the result action it.

 

is this works for you?

 

 

 



BB


*** Rate All Helpful Responses ***

BB,

 

Thank you for the quick response. 

 

The problem is that I will not know that the router is down since the SIM card has lost all of its parameters and interface C0 will not connect to the telecom provider. The router configuration will be intact but the SIM card configuration will be empty. Without the SIM card configured, there will be no cellular network connectivity, The SIM card can lose its configuration from an AC power surge even though the 819 router is isolated on a UPS.

 

Regards,

marvinbdavis

 

You mean due to device reboot you lost the config, if i understand correctly.



BB


*** Rate All Helpful Responses ***

BB,

Only the router cellular SIM card config will be lost. The main router config will still be available even after the router reboots.

Under normal conditions both cellular SIM card and main router configurations will be intact after a reboot.

Only the SIM card configuration fields will be empty after a power surge. I have seen this on many 819 routers.

 

Regards,

marvinbdavis

Content for Community-Ad