I want SRX 100 to do this:
If RPM for 10.10.10.1 fails, install static route 18.104.22.168/32 next hop 10.10.10.2 using EVENT -OPTION
SRX 10.10.10.6----SW-----10.10.10.1F1 R1
------10.10.10.2 F1 R2
Below is my config :
set services rpm probe A test PING-A-1 probe-type icmp-pingset services rpm probe A test PING-A-1 target address 10.10.10.1set services rpm probe A test PING-A-1 test-interval 3set services rpm probe A test PING-A-1 thresholds successive-loss 3
set event-options policy A events ping_test_failedset event-options policy A within 100 trigger onset event-options policy A within 100 trigger 1set event-options policy A attributes-match ping_test_failed.test-owner matches Aset event-options policy A attributes-match ping_test_failed.test-name matches PING-A-1set event-options policy A then execute-commands commands "set routing-option static route 22.214.171.124/32 next-hop 10.10.10.2"
Below I have shutdown the inerface on R1 f0/0 10.10.10.1 , as expecetd SRX shows PROBE fails:
root> show services rpm probe-results Owner: A, Test: PING-A-1 Target address: 10.10.10.1, Probe type: icmp-ping, Test size: 1 probes Probe results: No route to target, Sat Dec 9 21:33:00 2017 Results over current test: Probes sent: 1, Probes received: 0, Loss percentage: 100 Results over last test: Probes sent: 1, Probes received: 0, Loss percentage: 100 Results over all tests: Probes sent: 1015, Probes received: 905, Loss percentage: 10 Measurement: Round trip time Samples: 905, Minimum: 3988 usec, Maximum: 31554 usec, Average: 10959 usec, Peak to peak: 27566 usec, Stddev: 3859 usec, Sum: 9917737 usec
But I do not see the command " set routing-option static route 126.96.36.199/32 next-hop 10.10.10.2" executed.
root> show route protocol static
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
1) What am I missing?
2) what is 100 bel;ow is it in seconds ?
set event-options policy A within 100
Thanks and have a nice weekend!!
I think you should have sevices ip-monitoring instead of event options:
set services ip-monitoring policy PING-A-1 match rpm-probe Probe-Payment-Serverset services ip-monitoring policy PING-A-1 then preferred-route route 188.8.131.52/32 next-hop 10.10.10.2