Track is a great feature in Comware - I recommend you read through the High Availability Guide to get a good technical understanding before following this quick solution guide.
HP Track basically a detection module in the switch that returns positive or negative dependent on interface status, link status, network reachability or network performance. I used it recently with BFD to track the status of a remote IP address, and used static routing with preferences to change the routing table if it detected a destination was unreachable.
I wanted to use OSPF, but unfortunately, there were some firewalls in the way which I had no control over..... the backup link was ADSL
I lab'd all of this in Simware to prove the concept first.
SITE 1
BFD Config
bfd echo-source-ip 172.16.0.1
Track Config
track 1 bfd echo interface Vlan-interface 172 remote ip 172.16.0.2 local ip 172.16.0.1
Routing Config
ip route-static 192.168.10.0 24 172.16.0.2 track 1
ip route-static 192.168.10.0 24 10.0.10.254 preference 65
SITE 2
BFD Config
bfd echo-source-ip 172.16.0.2
Track Config
track 1 bfd echo interface Vlan-interface 172 remote ip 172.16.0.1 local ip 172.16.0.2
Routing Config
ip route-static 10.0.10.0 24 172.16.0.1 track 1
ip route-static 10.0.10.0 24 192.168.10.254 preference 65
Points to note - the track interface is on the main route, and the static route without track requires a higher preference than 60 (the default preference of a static route)