Currently i have following code, but when probe fails no changes are made:
Edit changed configuration, but still no joy, seems like event-options are never triggered
services {
rpm {
probe A {
test ICMP {
probe-type icmp-ping;
target address x.x.x.x;
test-interval 3;
thresholds {
successive-loss 1;
}
}
}
inactive: probe B {
test ICMP2 {
probe-type icmp-ping;
target address x.x.x.x;
test-interval 3;
thresholds {
successive-loss 1;
}
}
}
}
}
event-options {
policy failover {
events ping_test_failed;
within 100 {
trigger on 1;
}
attributes-match {
ping_test_failed.test-owner matches A;
ping_test_failed.test-name matches ICMP;
}
then {
change-configuration {
retry count 5 interval 4;
commands {
"set interface ge-0/0/0 unit 0 family inet address a.a.a.a/a vrrp-group 2 priority 1";
"deactivate services rpm probe A";
"activate services rpm probe B";
}
}
}
}
policy revert {
events ping_test_completed;
within 15 {
trigger on 1;
}
attributes-match {
ping_test_completed.test-owner matches B;
ping_test_completed.test-name matches ICMP2;
}
then {
change-configuration {
retry count 3 interval 3;
commands {
"set interface ge-0/0/0 unit 0 family inet address a.a.a.a/a vrrp-group 2 priority 200";
"deactivate services rpm probe B";
"activate services rpm probe A";
}
}
}
}
}
Edit: seems the problem is vrrp priority changing command, when i remove it then rpm deactivation/activation is working.
Final edit, i had a typo "interface" -> "interfaces". Got it working now.