Load balancing with HAProxy

Hello,

we have two physical devices which has to be working active and standbye mode.
I am able to check both of the devices the through below links:
https://192.168.1.1:28443/check - active
https://192.168.1.2:28443/check - standby
And there is a third machine (linux), it should handle the traffic with HAProxy
If the first link is not available, then HAProxy needs to route the traffic to the second one.

Is there any solution to solve it?

Thanks!
Szabi