SRX Services Gateway
Highlighted
SRX Services Gateway

RPM/IP Monitoring - Slow Failback

‎06-12-2018 06:18 AM

I'd like to configure my SRX to wait 15 minutes to fail back to the default route after installing a different next-hop via rpm/ip monitoring. Is there a way to do this?

1 REPLY 1
SRX Services Gateway

Re: RPM/IP Monitoring - Slow Failback

‎06-12-2018 07:16 AM

You can use "within" option with "trigger". For example if your rpm executed once in 1 min , so you need to check if rpm was succesful 15 times 

 

We configured this some time ago 

services {
    rpm {
        probe script {
            test src1 {
                probe-type icmp-ping;
                target address 10.7.0.1;
                probe-count 1;
                probe-interval 1;
                test-interval 1;
                source-address 10.7.0.2;
            }
}  
event-options {
    policy ping-fail-src1 {
        events ping_probe_failed;
        within 32 {
            trigger on 15;
        }
        attributes-match {
            ping_probe_failed.test-owner matches .*script.*;
            ping_probe_failed.test-name matches .*src1.*;
        }
        then {
            event-script change-nexthop.slax {
                arguments {
                    nexthop-address 10.7.0.1;
                    metric 20;
                }
            }
        }
    }
    policy ping-success-src1 {
        events ping_test_completed;
        within 31 {
            trigger on 15;
            events ping_test_completed;
        }
        attributes-match {
            ping_test_completed.test-owner matches .*script.*;
            ping_test_completed.test-name matches .*src1.*;
        }
        then {
            event-script change-nexthop.slax {
                arguments {
                    nexthop-address 10.7.0.1;
                    metric 10;
                }
            }
        }
    }
}