Get service health
Reads the service now and returns the verdict (health), with the rules of the stored verdict, and the result of each probe (probes) in the shape of its own endpoint. One call gives the data of the per-component endpoints. HAProxy, pgBackRest and the emergency reserve use the results that the health poller read in the last 5 minutes, when it has them. Calls for the same service at the same time share one reading. It does not read an error a second time and does not store the verdict. Like the Patroni endpoint, it sets a failed service to running when Patroni is healthy and the failed operation was a config apply. When the backup config is out of sync, pgbackrest is a not_applicable entry with no backups; /health/pgbackrest runs the probe. A service that is not running or failed reads unknown with no probes. It usually answers in a few seconds, and in at most 3 minutes when a probe does not return or other live checks run. The list and detail responses carry the stored verdict (health), which costs no probe.
/api/v1/database-services/{id}/healthtse_sessionAPI key · cookierequiredidstringrequiredOK
healthServiceHealthResponserequiredShow propertiesHide properties
checked_atstring<date-time>The time of the last real reading. Absent when there is none. When it is 15 minutes old or older, status is error with a reason that names the checks that did not run.
componentsComponentHealthResponse[]requiredShow propertiesHide properties
ComponentHealthResponsekeystringrequiredThe stable key of the component: the path segment of its endpoint. Name is text for people and can change.
patronietcdpgbouncerhaproxypgbackrestpostgresqlreservevipmessagestringnamestringrequiredstatusstringrequiredhealthywarningerrorunknownnot_applicablereasonstringrequiredsincestring<date-time>The time the status last changed. Absent on a live reading.
statusstringrequiredhealthywarningerrorunknownprobesServiceProbesResponserequiredShow propertiesHide properties
etcdEtcdHealthResponseShow propertiesHide properties
console_mesh_downbooleanThe console reaches no enrolled server over the mesh, so the members were not checked.
errorstringmembersEtcdMemberHealth[]Show propertiesHide properties
EtcdMemberHealthcausestringWhy the member is not healthy: down (no mesh path), unverified (the check failed), or unhealthy (etcd says so). Empty when healthy.
downunverifiedunhealthyerrorstringhealthybooleanrequiredhoststringrequiredoverlay_ipstringserver_idstringrequiredstatusstringrequiredhealthyunhealthyerrorhaproxyHaproxyHealthResponseShow propertiesHide properties
errorstringmembersHaproxyNodeHealth[]Show propertiesHide properties
HaproxyNodeHealthbackendsHaproxyBackendServer[]Show propertiesHide properties
HaproxyBackendServerbackendstringrequiredcheckstringserverstringrequiredstatusstringrequirederrorstringhealthybooleanrequiredhoststringrequiredserver_idstringrequiredstatusstringrequiredhealthyunhealthyerrornot_applicablepatroniPatroniHealthResponseShow propertiesHide properties
console_mesh_downbooleanThe console reaches no enrolled server over the mesh, so the members were not checked.
errorstringstatusstringrequiredhealthyunhealthyerrortopologyClusterStatusShow propertiesHide properties
membersMember[]requiredShow propertiesHide properties
Memberapi_urlstringhoststringrequiredlaginteger<int64>namestringrequirednofailoverbooleanpending_restartbooleanportinteger<int64>rolestringrequiredserver_idstringstatestringrequiredtimelineinteger<int64>requiredpgbackrestPgbackrestHealthResponseShow propertiesHide properties
backup_runningbooleanrequiredbackupsPgbackrestBackupInfo[]Show propertiesHide properties
PgbackrestBackupInfochecksum_errorsbooleanTrue when pgBackRest found invalid page checksums in the backup: some data files of the database are corrupt
database_idinteger<int64>database_size_bytesinteger<int64>requiredlabelstringrequiredolderbooleanTrue for a backup of a database id older than the newest of its repo, from before a PostgreSQL major upgrade. It restores only into a new service on pg_version, never in place
pg_versionstringprior_checksum_errorsbooleanTrue when a backup that this backup depends on (its full, and the diff of an incr) has invalid page checksums. A restore of this backup restores the corrupt files of that backup too, so it is refused like a backup with checksum_errors
repointeger<int64>size_bytesinteger<int64>requiredBytes that this backup stored in the repo, after compression. The files of the backups that it depends on are not included
start_timestringrequiredstop_timestringrequiredtypestringrequiredwal_startstringwal_stopstringcoverageStanzaCoverageJSONShow propertiesHide properties
assumes_archivingbooleanrequiredearlieststringrequiredendstringrequirednowstringrequiredreposRepoCoverageJSON[]requiredShow propertiesHide properties
RepoCoverageJSONbackupsCoveredBackupJSON[]requiredShow propertiesHide properties
CoveredBackupJSONchecksum_errorsbooleanTrue when pgBackRest found invalid page checksums in the backup, or in a backup that it depends on (its full, and the diff of an incr). A restore of it is refused unless allow_checksum_errors is set
labelstringrequiredstop_timestringrequiredcurrent_tliinteger<int32>requireddatabase_idinteger<int64>The pgBackRest database id of this coverage
earlieststringrequiredgrant_fingerprintstringThe license grant fingerprint of a fork or recover that restores this database id: the cluster that the copy has. Only a live scan of the backups gives it
kindstringrequiredlocalremoteolderbooleanTrue for a database id older than the newest of the stanza, from before a PostgreSQL major upgrade. Its times restore only into a new service on pg_version, and its coverage ends at its newest backup
pg_versionstringThe PostgreSQL major of the database id
repointeger<int64>requiredwal_maxstringrequiredwal_minstringrequirederrorstringfirst_backup_pendingbooleanTrue when the service has no backups only because its first backup did not end yet: the backup runs, or an operation whose end starts a full backup (a deploy, a restore, a major upgrade step) runs or ended less than 15 minutes ago on the console clock. The service health counts no backups as healthy then.
stanzastringstatusstringrequirednot_applicable: the service has no active backup repo. not_deployed: the service is not running and no deploy of it completed, so pgbackrest info did not run.
healthywarningerrornot_applicablenot_deployedwal_maxstringwal_minstringpgbouncerPgbouncerHealthResponseShow propertiesHide properties
errorstringserversPgbouncerNodeHealth[]Show propertiesHide properties
PgbouncerNodeHealtherrorstringhealthybooleanrequiredhoststringrequiredpoolsPgbouncerPoolInfo[]Show propertiesHide properties
PgbouncerPoolInfocl_activeinteger<int64>requiredcl_waitinginteger<int64>requireddatabasestringrequiredpool_modestringrequireduserstringrequiredserver_idstringrequiredstatusstringrequiredhealthyunhealthyerrorpostgresqlPostgresqlInfoResponseShow propertiesHide properties
connectionsConnectionsInfoShow propertiesHide properties
activeinteger<int64>requiredidleinteger<int64>requiredmaxinteger<int64>requiredtotalinteger<int64>requireddatabasesDatabaseInfo[]Show propertiesHide properties
DatabaseInfonamestringrequiredsize_bytesinteger<int64>requirederrorstringmembersPostgresqlMemberInfo[]requiredShow propertiesHide properties
PostgresqlMemberInfoerrorstringnamestringrequiredpatroni_versionstringpostmaster_start_timestringrolestringrequiredserver_idstringserver_versioninteger<int64>statestringrequiredstats_errorstringtotal_size_bytesinteger<int64>uptime_secondsinteger<int64>reserveReserveHealthResponseShow propertiesHide properties
errorstringnodesReserveNodeHealth[]Show propertiesHide properties
ReserveNodeHealthdetailstringerrorstringexpected_bytesinteger<int64>requiredexpected_countinteger<int64>requiredfilesReserveFile[]requiredShow propertiesHide properties
ReserveFilenamestringrequiredsize_bytesinteger<int64>requiredhoststringrequiredrootReserveRootShow propertiesHide properties
dirstringrequiredexpected_bytesinteger<int64>requiredmountstringrequiredMount point of the disk that holds postgresql.conf
size_bytesinteger<int64>requiredSize of the root file; 0 when it is missing
statusstringrequiredokdegradedserver_idstringrequiredstatusstringrequiredokdegradednot_provisionedunknownstatusstringrequiredokdegradednot_provisionedunknownError
codestringStable code of the refusal, when the route has codes
detailsstring[]Additional detail, e.g. per-field validation failures
errorstringrequiredHuman-readable error message