Search code examples
postgresqlhasura

How to monitor Hasura database connectivity


How can I monitor the most simple way if Hasura has proper connection to the database or if the database is reachable in a correct way?

I am thinking to create a hasura endpoint which just executes some dummy query over the database, but I couldn't figure out how to implement this in Hasura.

Maybe Hasura has something build in for this part?


Solution

  • Hasura's health check endpoint gives information about the server health and metadata inconsistencies (in this case, database connection issue).

    You can read more about the API here - https://hasura.io/docs/latest/graphql/core/api-reference/health.html