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

    HTTP Health check backend with HAProxy package via GET request

    Scheduled Pinned Locked Moved Cache/Proxy
    3 Posts 2 Posters 1.8k Views
    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.
    • K
      Kirill2401
      last edited by

      Hi all!

      I need to configure the HTTP health check via GET requests on custom address for the backend. The backend has two servers. Each server has the same URL like http://servername:8080/monitoring/teststatus which return status code 500 or 200, which depends on internal checks on the server

      I have two questions:

      1. Can you explain or give me the example of how I should write the HTTP health check for backend via GET request with address http://servername:8080/monitoring/teststatus?

      2. Can I configure the http health check (GET) for every server in the backend? On the web interface, I didn't find how to do it, because there is only one check for the common backend. Maybe I should do it in another way?
        0_1533312443360_get.png

      P 1 Reply Last reply Reply Quote 0
      • P
        PiBa @Kirill2401
        last edited by

        What do you mean with 'custom address' ?

        haproxy itself will normally check all the servers with the same health-check.
        These parameters should do it.?:

        • Method = GET
        • Url = /monitoring/teststatus

        Or perhaps you want to configure a 'port' option on the server to make it check on a different port than the regular traffic go's to? Could add that on the server-pass-thru option.

        Or if you need something totally different, then perhaps you could investigate the agent-check..?

        1 Reply Last reply Reply Quote 2
        • K
          Kirill2401
          last edited by

          Hi, PiBa!

          Or perhaps you want to configure a 'port' option on the server to make it check on a different port than the regular traffic >>go's to? Could add that on the server-pass-thru option.

          This is exactly what I need! Thanks, it works for me with the server-pass-thru option :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.