mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add healthcheck database section (#8060)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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. |
|
||||
|
||||
Reference in New Issue
Block a user