Finally, I still found the right configuration.
It turns out that this code can not be deleted, you need only a part, responsible for the qualified-next-hop.
routing-options {
static {
route 0.0.0.0/0 {
next-hop ###ISP-1-GW###;
preference 5;
}
}
}
And the script is configured without routing-instances, directly from the routing-options:
rpm {
probe Probe-Server {
test testsvr {
target address ###ISP-1-DNS###;
probe-count 10;
probe-interval 5;
test-interval 10;
thresholds {
successive-loss 10;
total-loss 5;
}
destination-interface ge-0/0/0.0;
next-hop ###ISP-1-GW###;
}
}
}
ip-monitoring {
policy Server-Tracking {
match {
rpm-probe Probe-Server;
}
then {
preferred-route {
route 0.0.0.0/0 {
next-hop ###ISP-2-GW###;
}
}
}
}
}