We left Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Hangfire healthchecks for DB connectivity

Hi,

We’re using Hangfire hosted in Kubernetes with a PostgresSQL backend.
From time to time the DB goes crazy and Hangfire loses connection with the DB and cannot reconnect.
The DB looks fine (it’s an Azure managed instance) and restarting the pod fixes everything.

Is there a built-in way to expose a health check that would fail whenever the server cannot connect to the DB?
If not, what should we check for? The MonitoringAPI doesn’t seem to have anything related to the DB connection.

Cheers.