feat: add healthcheck database section (#8060)

This commit is contained in:
Colin Adler
2023-06-20 15:13:22 +00:00
committed by GitHub
parent 2db4488337
commit 823127e761
11 changed files with 284 additions and 12 deletions
+6
View File
@@ -46,6 +46,12 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"reachable": true,
"status_code": 0
},
"database": {
"error": null,
"healthy": true,
"latency": 0,
"reachable": true
},
"derp": {
"error": null,
"healthy": true,
+27
View File
@@ -5977,6 +5977,26 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| `enabled` | boolean | false | | |
| `error` | any | false | | |
## healthcheck.DatabaseReport
```json
{
"error": null,
"healthy": true,
"latency": 0,
"reachable": true
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ----------- | ------- | -------- | ------------ | ----------- |
| `error` | any | false | | |
| `healthy` | boolean | false | | |
| `latency` | integer | false | | |
| `reachable` | boolean | false | | |
## healthcheck.Report
```json
@@ -5988,6 +6008,12 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
"reachable": true,
"status_code": 0
},
"database": {
"error": null,
"healthy": true,
"latency": 0,
"reachable": true
},
"derp": {
"error": null,
"healthy": true,
@@ -6167,6 +6193,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| Name | Type | Required | Restrictions | Description |
| ------------------ | ---------------------------------------------------------- | -------- | ------------ | ------------------------------------------------ |
| `access_url` | [healthcheck.AccessURLReport](#healthcheckaccessurlreport) | false | | |
| `database` | [healthcheck.DatabaseReport](#healthcheckdatabasereport) | false | | |
| `derp` | [healthcheck.DERPReport](#healthcheckderpreport) | false | | |
| `failing_sections` | array of string | false | | |
| `healthy` | boolean | false | | Healthy is true if the report returns no errors. |