Skip to content

feat(coderd): add DERP healthcheck #6936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! add healthy bool
  • Loading branch information
coadler committed Apr 3, 2023
commit f045e6e7f4129cd6de67bc74eb5bae83201aa9cd
14 changes: 14 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/api/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
```json
{
"derp": {
"healthy": true,
"netcheck": {
"captivePortal": "string",
"globalV4": "string",
Expand Down Expand Up @@ -73,11 +74,13 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"netcheck_logs": ["string"],
"regions": {
"property1": {
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -126,11 +129,13 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
}
},
"property2": {
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -180,6 +185,7 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
}
}
},
"pass": true,
"time": "string"
}
```
Expand Down
26 changes: 22 additions & 4 deletions docs/api/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -5463,6 +5463,7 @@ Parameter represents a set value for the scope.
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -5494,6 +5495,7 @@ Parameter represents a set value for the scope.
| `can_exchange_messages` | boolean | false | | |
| `client_errs` | array of array | false | | |
| `client_logs` | array of array | false | | |
| `healthy` | boolean | false | | |
| `node` | [tailcfg.DERPNode](#tailcfgderpnode) | false | | |
| `round_trip_ping` | integer | false | | |
| `stun` | [healthcheck.DERPStunReport](#healthcheckderpstunreport) | false | | |
Expand All @@ -5503,11 +5505,13 @@ Parameter represents a set value for the scope.

```json
{
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -5561,13 +5565,15 @@ Parameter represents a set value for the scope.

| Name | Type | Required | Restrictions | Description |
| -------------- | ----------------------------------------------------------------- | -------- | ------------ | ----------- |
| `healthy` | boolean | false | | |
| `node_reports` | array of [healthcheck.DERPNodeReport](#healthcheckderpnodereport) | false | | |
| `region` | [tailcfg.DERPRegion](#tailcfgderpregion) | false | | |

## healthcheck.DERPReport

```json
{
"healthy": true,
"netcheck": {
"captivePortal": "string",
"globalV4": "string",
Expand Down Expand Up @@ -5601,11 +5607,13 @@ Parameter represents a set value for the scope.
"netcheck_logs": ["string"],
"regions": {
"property1": {
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -5654,11 +5662,13 @@ Parameter represents a set value for the scope.
}
},
"property2": {
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -5714,6 +5724,7 @@ Parameter represents a set value for the scope.

| Name | Type | Required | Restrictions | Description |
| ------------------ | ------------------------------------------------------------ | -------- | ------------ | ----------- |
| `healthy` | boolean | false | | |
| `netcheck` | [netcheck.Report](#netcheckreport) | false | | |
| `netcheck_logs` | array of string | false | | |
| `regions` | object | false | | |
Expand Down Expand Up @@ -5742,6 +5753,7 @@ Parameter represents a set value for the scope.
```json
{
"derp": {
"healthy": true,
"netcheck": {
"captivePortal": "string",
"globalV4": "string",
Expand Down Expand Up @@ -5775,11 +5787,13 @@ Parameter represents a set value for the scope.
"netcheck_logs": ["string"],
"regions": {
"property1": {
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -5828,11 +5842,13 @@ Parameter represents a set value for the scope.
}
},
"property2": {
"healthy": true,
"node_reports": [
{
"can_exchange_messages": true,
"client_errs": [[null]],
"client_logs": [["string"]],
"healthy": true,
"node": {
"certName": "string",
"derpport": 0,
Expand Down Expand Up @@ -5882,16 +5898,18 @@ Parameter represents a set value for the scope.
}
}
},
"pass": true,
"time": "string"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| ------ | ------------------------------------------------ | -------- | ------------ | ----------- |
| `derp` | [healthcheck.DERPReport](#healthcheckderpreport) | false | | |
| `time` | string | false | | |
| Name | Type | Required | Restrictions | Description |
| ------ | ------------------------------------------------ | -------- | ------------ | ------------------------------------------------ |
| `derp` | [healthcheck.DERPReport](#healthcheckderpreport) | false | | |
| `pass` | boolean | false | | Healthy is true if the report returns no errors. |
| `time` | string | false | | Time is the time the report was generated at. |

## netcheck.Report

Expand Down