feat(cli): support bundle: dump healthcheck summary (#12963)

* refactor(codersdk): extract common fields from HealthReport and friends
* feat(codersdk/healthsdk): add Summarize() method
* feat(cli): support bundle: dump healthcheck summary
This commit is contained in:
Cian Johnston
2024-04-16 13:31:56 +01:00
committed by GitHub
parent 06e042acfa
commit 407e61ecd4
13 changed files with 590 additions and 242 deletions
+6 -1
View File
@@ -325,7 +325,12 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"error": "string",
"healthy": true,
"severity": "ok",
"warnings": ["string"]
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"workspace_proxy": {
"dismissed": true,
+45 -19
View File
@@ -8134,7 +8134,12 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"error": "string",
"healthy": true,
"severity": "ok",
"warnings": ["string"]
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
},
"workspace_proxy": {
"dismissed": true,
@@ -8251,6 +8256,14 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `severity` | [health.Severity](#healthseverity) | false | | |
| `warnings` | array of [health.Message](#healthmessage) | false | | |
#### Enumerated Values
| Property | Value |
| ---------- | --------- |
| `severity` | `ok` |
| `severity` | `warning` |
| `severity` | `error` |
## healthsdk.ProvisionerDaemonsReportItem
```json
@@ -8326,21 +8339,26 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"error": "string",
"healthy": true,
"severity": "ok",
"warnings": ["string"]
"warnings": [
{
"code": "EUNKNOWN",
"message": "string"
}
]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ----------- | ---------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------- |
| `body` | string | false | | |
| `code` | integer | false | | |
| `dismissed` | boolean | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. |
| `severity` | [health.Severity](#healthseverity) | false | | |
| `warnings` | array of string | false | | |
| Name | Type | Required | Restrictions | Description |
| ----------- | ----------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------- |
| `body` | string | false | | |
| `code` | integer | false | | |
| `dismissed` | boolean | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. |
| `severity` | [health.Severity](#healthseverity) | false | | |
| `warnings` | array of [health.Message](#healthmessage) | false | | |
#### Enumerated Values
@@ -8396,14 +8414,22 @@ If the schedule is empty, the user will be updated to use the default schedule.|
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------- | -------- | ------------ | ----------- |
| `dismissed` | boolean | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | |
| `severity` | [health.Severity](#healthseverity) | false | | |
| `warnings` | array of [health.Message](#healthmessage) | false | | |
| `workspace_proxies` | [codersdk.RegionsResponse-codersdk_WorkspaceProxy](#codersdkregionsresponse-codersdk_workspaceproxy) | false | | |
| Name | Type | Required | Restrictions | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------- |
| `dismissed` | boolean | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. |
| `severity` | [health.Severity](#healthseverity) | false | | |
| `warnings` | array of [health.Message](#healthmessage) | false | | |
| `workspace_proxies` | [codersdk.RegionsResponse-codersdk_WorkspaceProxy](#codersdkregionsresponse-codersdk_workspaceproxy) | false | | |
#### Enumerated Values
| Property | Value |
| ---------- | --------- |
| `severity` | `ok` |
| `severity` | `warning` |
| `severity` | `error` |
## key.NodePublic