FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Does FusionAuth have a health check endpoint on the API?

    Scheduled Pinned Locked Moved Solved
    Q&A
    health check api
    3
    6
    6.0k
    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.
    • danD
      dan
      last edited by

      If I wanted to check the health of a fusionauth installation, what's the best way to do that?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by dan

        The system status API call is the best solution here. It will return a status code when you (or your application load balancer, CDN or other software system) makes a GET request on <faurl>/api/status. It'll either be a 200 if things are all good or a 500 if there are any issues with the system.

        It's documented more fully here: https://fusionauth.io/docs/v1/tech/apis/system#system-status

        Note that this endpoint is not currently supported by the client libraries, but is just a curl away.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        F 1 Reply Last reply Reply Quote 1
        • F
          falk.jaeger @dan
          last edited by

          @dan unfortunately this is not right. If my fusionauth does not boot correctly, for example when the db is not reachable /api/status returns a 308 instead of a 500

          danD 1 Reply Last reply Reply Quote 0
          • danD
            dan @falk.jaeger
            last edited by

            @falk-jaeger Hmmm.

            I don't know how you can get a 308. Is the request going through a proxy or something else?

            Here's the list of /api/status return codes (table 8):

            https://fusionauth.io/docs/v1/tech/apis/system#retrieve-system-status

            If you are getting a different HTTP status code, please submit a bug report with replication steps and your FusionAuth version: https://github.com/fusionauth/fusionauth-issues/issues

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 0
            • B
              boris.pigin
              last edited by

              I see the redirection to /maintenance-mode-silent-configuration-failed if the futhionauth could start because the fusionauth database not reachable.
              cbd73a71-3346-46a7-806d-4afd700dca3c-grafik.png

              danD 1 Reply Last reply Reply Quote 0
              • danD
                dan @boris.pigin
                last edited by

                As of 1.51.1, we now have a dedicated health check API endpoint:

                https://fusionauth.io/docs/apis/system#retrieve-system-health has more details

                --
                FusionAuth - Auth for devs, built by devs.
                https://fusionauth.io

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post