We use haproxy as http load balancer. Sometimes one of our servers stop responding while accepting http connection requests. So stats page displays servers as green "accessible" but our nagios server says CRITICAL - Socket timeout after 20 seconds" and that server is not responding actually.
How to tell haproxy to check page response time and if it takes longer than timeout then tag it as DOWN.