• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How to Configure Pfsense HAProxy HTTP HealthCheck Failover

Scheduled Pinned Locked Moved Cache/Proxy
2 Posts 1 Posters 1.6k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    anandpeculiar
    last edited by Feb 28, 2022, 8:54 AM

    Re: HTTP Health check backend with HAProxy package via GET request

    I have two backend web servers, and i need to monitor them using httpcheck by checking the URL and looking for a string to be present in the response of the request. if the string is not available switch the backend to another server.

    Status:

    Server1 - Active
    Server2 - Backup

    Configuration Details:

    • Health Check Method : HTTP
    • HTTP Check Method : GET
    • Url used by http check requests: /jsonp/FreeForm&maxrecords=10&format=XML&ff=223
    • Http check version : HTTP/1.0\r\nExpect:\ XS01

    Result of the http Request is

    {"d":{"__type":"Response","Version":"4.5.23.1160","ResultCode":"XS01","ErrorString":"","Results":[{"__type":"Result",
    

    so, I am expecting the string ResultCode:"XS01" in the response from the server, if the string found the server1 is up, if not bring the Server2 from the backup.

    How to achieve this in HAProxy Backend Health Check?

    A 1 Reply Last reply Mar 2, 2022, 6:11 PM Reply Quote 0
    • A Offline
      anandpeculiar @anandpeculiar
      last edited by Mar 2, 2022, 6:11 PM

      @anandpeculiar this can be done under Advanced Settings--> Backend Pass thru using the expect string,

      http-check expect string XS01

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received