Junos Automation (Scripting)
Junos Automation (Scripting)

Resetting an FPC when rpm probe fails

‎08-05-2019 05:51 AM

Hi,

 

I am trying to solve a simple problem on an SRX220 w/ VDSL mPIM.  It has a single uplink to the internet, which regularly fails in a way where the interface/sync remains up, however the path through the upstream provider is dead.  Hard-cycling the VDSL interface is the only way to restore service, currently this is done manually (disable/commit/enable/commit).

 

I have been thinking about a way to automate this, as when it fails in the middle of the night it is annoying to have to re-establish service in the morning (when multiple services are already down for several hours).  Thus far my thinking is to use an rpm probe w/ IP monitoring to ping something reliable on the internet (eg Google DNS), and if there is 100% loss over a period of time, perform a reset of the VDSL interface.

 

So far I have successfully setup the rpm/ip-monitoring and it is working correctly, however the only action available on failure seems to be disable interface (no way to re-enable it).  After a bit of reading, resetting the FPC via an op script would deliver what I want in a single action, but struggling to find how to call the op-script from the ip-monitoring instance.

 

Is my thinking sound, or is there a better way to do this?

 

Thanks for reading...

 

 

4 REPLIES 4
Junos Automation (Scripting)

Re: Resetting an FPC when rpm probe fails

‎08-05-2019 06:37 AM

You cat write event script that will disable and then enable interface (may be with small pause between actions).

Junos Automation (Scripting)

Re: Resetting an FPC when rpm probe fails

‎08-05-2019 04:54 PM

Thanks I will look into that

Junos Automation (Scripting)
Solution
Accepted by topic author clayq
‎08-06-2019 05:25 AM

Re: Resetting an FPC when rpm probe fails

‎08-05-2019 05:50 PM

Try this 

 

set services rpm probe icmp-ping-probe test ping-probe-test probe-type icmp-ping
set services rpm probe icmp-ping-probe test ping-probe-test target address x.x.x.x 
set services rpm probe icmp-ping-probe test ping-probe-test test-interval 5
set services rpm probe icmp-ping-probe test ping-probe-test thresholds successive-loss 3

 


set event-options policy disable-on-ping-failure events ping_test_failed
set event-options policy disable-on-ping-failure within 60 trigger on
set event-options policy disable-on-ping-failure within 60 trigger 3
set event-options policy disable-on-ping-failure within 65 trigger until
set event-options policy disable-on-ping-failure within 65 trigger 4
set event-options policy disable-on-ping-failure attributes-match ping_test_failed.test-owner matches icmp-ping-probe
set event-options policy disable-on-ping-failure attributes-match ping_test_failed.test-name matches ping-probe-test
set event-options policy disable-on-ping-failure then execute-commands commands "request chassis fpc0 restart"


Mengzhe Hu
JNCIE x 3 (SP DC ENT)
Junos Automation (Scripting)

Re: Resetting an FPC when rpm probe fails

[ Edited ]
‎08-06-2019 05:20 AM

Thanks very much, I just tweaked the FPC syntax to suit SRX ("request chassis fpc restart slot 2")