Automation

Expand all | Collapse all

Resetting an FPC when rpm probe fails

Jump to Best Answer
  • 1.  Resetting an FPC when rpm probe fails

    Posted 08-05-2019 05:52

    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...

     

     



  • 2.  RE: Resetting an FPC when rpm probe fails

    Posted 08-05-2019 06:37

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



  • 3.  RE: Resetting an FPC when rpm probe fails

    Posted 08-05-2019 16:54

    Thanks I will look into that



  • 4.  RE: Resetting an FPC when rpm probe fails
    Best Answer

     
    Posted 08-05-2019 17:50

    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"



  • 5.  RE: Resetting an FPC when rpm probe fails

    Posted 08-06-2019 05:21

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