Observability
Logs, metrics, traffic and runtime state of services and environments. Each operation lists its method and path, parameters, request body, responses and an example call.
/api/v1/alerts/{id}/acknowledgeAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Alert id.
Response Body
application/json
application/problem+json
curl -X POST "https://example.com/api/v1/alerts/string/acknowledge"{ "$schema": "https://example.com/AcknowledgeOutputBody.json", "acknowledged": true}/api/v1/clusters/{id}/project-usageAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Cluster id.
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/clusters/string/project-usage"{ "$schema": "https://example.com/ClusterProjectUsageOutputBody.json", "projects": [ { "cpuMilli": 0, "memoryBytes": 0, "projectId": "string" } ]}/api/v1/environments/{id}/alertsAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Environment id.
Query Parameters
active lists open and acknowledged alerts; resolved lists those that resolved in the last seven days.
"active"Value in
- "active"
- "resolved"
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/environments/string/alerts"{ "$schema": "https://example.com/ListAlertsOutputBody.json", "items": [ { "acknowledgedAt": "2019-08-24T14:15:22Z", "acknowledgedBy": "string", "detail": "string", "environmentId": "string", "id": "string", "lastEvaluatedAt": "2019-08-24T14:15:22Z", "openedAt": "2019-08-24T14:15:22Z", "resolvedAt": "2019-08-24T14:15:22Z", "resolvedReason": "recovered", "rule": "volume_usage", "serviceId": "string", "serviceName": "string", "severity": "warning", "state": "open", "subject": "string", "summary": "string", "threshold": 0, "unit": "percent", "value": 0.1 } ]}/api/v1/environments/{id}/canvas-metricsAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Environment id.
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/environments/string/canvas-metrics"{ "$schema": "https://example.com/CanvasMetricsOutputBody.json", "services": [ { "cron": { "lastScheduleTime": "2019-08-24T14:15:22Z", "nextRunTime": "2019-08-24T14:15:22Z", "processName": "string", "runs": [ { "finishedAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "succeeded": true } ] }, "instances": [ { "ready": true, "role": "writer" } ], "kind": "string", "limits": { "cpuMilli": 0, "memoryBytes": 0 }, "metrics": [ { "headline": 0.1, "key": "cpu", "observed": 0, "points": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ], "unreported": "tailnet-only", "value": "string" } ], "processName": "string", "serviceId": "string" } ]}/api/v1/environments/{id}/logsAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Environment id.
Query Parameters
Opaque cursor from a previous response's nextCursor. Omit for the first page.
How many items to return.
int641 <= value <= 20050Restrict to one service. Omit for the whole environment.
Restrict to one pod. Omit for every pod.
Log query: words (all must appear), "exact phrase", -word to exclude, OR between terms, parentheses, level:error|warn|info|debug (exactly that level), service:, pod:, env: (environment-wide search only) and, for JSON lines, @field:value, @field:>=N, @field:N..M on dotted keys such as @http.status:>=500. Plain text is a case-insensitive substring. Omit to match everything.
Inclusive lower time bound. Omit for the start of retention.
date-timeExclusive upper time bound. Omit for now.
date-timeOnly lines at this level or worse (warn includes error). Omit for every line, including lines with no detectable level.
Value in
- "debug"
- "info"
- "warn"
- "error"
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/environments/string/logs"{ "$schema": "https://example.com/ListLogsOutputBody.json", "highlight": [ "string" ], "items": [ { "at": "2019-08-24T14:15:22Z", "gap": true, "gapReason": "string", "level": "debug", "podName": "string", "processName": "string", "serviceId": "string", "text": "string" } ], "nextCursor": "string"}/api/v1/environments/{id}/logs/streamAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Environment id.
Query Parameters
Restrict the tail to one service. Omit for the whole environment.
Restrict the tail to one pod. Omit for every pod.
Only lines at this level or worse (warn includes error). Omit for every line, including lines with no detectable level.
Value in
- "debug"
- "info"
- "warn"
- "error"
Only lines that satisfy this log query, in the syntax the search endpoint documents. A query the server cannot parse ends the stream with a refusal comment. Omit to tail everything.
Response Body
text/event-stream
application/problem+json
curl -X GET "https://example.com/api/v1/environments/string/logs/stream"[ { "data": { "at": "2019-08-24T14:15:22Z", "environmentId": "string", "level": "debug", "podName": "string", "processName": "string", "serviceId": "string", "text": "string" }, "event": "log", "id": 0, "retry": 0 }]/api/v1/environments/{id}/trafficAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Environment id.
Query Parameters
Trailing window to report. Defaults to 30m.
Value in
- "15m"
- "30m"
- "1h"
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/environments/string/traffic"{ "$schema": "https://example.com/EnvironmentTrafficOutputBody.json", "databases": [ { "engine": "postgres", "otherConnections": 0, "sampledAt": "2019-08-24T14:15:22Z", "serviceId": "string", "unreported": "engine-not-sampled" } ], "edges": [ { "connections": 0, "from": "string", "peak": 0, "sampledAt": "2019-08-24T14:15:22Z", "to": "string" } ], "services": [ { "errorRate": 0.1, "p95Milli": 0.1, "rpm": 0.1, "serviceId": "string", "unreported": { "errorRate": "not-http", "p95": "not-http", "rpm": "not-http" } } ], "window": "15m"}/api/v1/services/{id}/alert-rulesAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Service id.
Query Parameters
Environment whose last measurements to report.
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/services/string/alert-rules?environmentId=string"{ "$schema": "https://example.com/ListRulesOutputBody.json", "rules": [ { "customized": true, "defaultEnabled": true, "defaultThreshold": 0, "enabled": true, "kind": "volume_usage", "maxThreshold": 0, "minThreshold": 0, "status": { "evaluated": true, "evaluatedAt": "2019-08-24T14:15:22Z", "reason": "string", "value": 0 }, "threshold": 0, "title": "string", "unit": "percent", "windowSeconds": 0 } ]}/api/v1/services/{id}/alert-rules/{kind}An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Service id.
Rule.
Value in
- "volume_usage"
- "memory_usage"
- "restart_loop"
- "cpu_usage"
Response Body
application/json
application/problem+json
curl -X DELETE "https://example.com/api/v1/services/string/alert-rules/volume_usage"{ "$schema": "https://example.com/RuleResultOutputBody.json", "rules": [ { "customized": true, "defaultEnabled": true, "defaultThreshold": 0, "enabled": true, "kind": "volume_usage", "maxThreshold": 0, "minThreshold": 0, "status": { "evaluated": true, "evaluatedAt": "2019-08-24T14:15:22Z", "reason": "string", "value": 0 }, "threshold": 0, "title": "string", "unit": "percent", "windowSeconds": 0 } ]}/api/v1/services/{id}/alert-rules/{kind}An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Service id.
Rule.
Value in
- "volume_usage"
- "memory_usage"
- "restart_loop"
- "cpu_usage"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X PUT "https://example.com/api/v1/services/string/alert-rules/volume_usage" \ -H "Content-Type: application/json" \ -d '{ "enabled": true, "threshold": 0 }'{ "$schema": "https://example.com/RuleResultOutputBody.json", "rules": [ { "customized": true, "defaultEnabled": true, "defaultThreshold": 0, "enabled": true, "kind": "volume_usage", "maxThreshold": 0, "minThreshold": 0, "status": { "evaluated": true, "evaluatedAt": "2019-08-24T14:15:22Z", "reason": "string", "value": 0 }, "threshold": 0, "title": "string", "unit": "percent", "windowSeconds": 0 } ]}/api/v1/services/{id}/metricsAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Service id.
Query Parameters
Environment id.
Trailing window to report.
Value in
- "1h"
- "6h"
- "24h"
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/services/string/metrics"{ "$schema": "https://example.com/ServiceMetricsOutputBody.json", "pods": [ { "podName": "string", "samples": [ { "at": "2019-08-24T14:15:22Z", "cpuMilli": 0, "memoryBytes": 0 } ] } ]}/api/v1/services/{id}/metrics/summaryAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Service id.
Query Parameters
Environment id.
Trailing window to report. Defaults to 1h. Ignored when from and to are given.
Value in
- "1h"
- "24h"
- "7d"
Inclusive start of an explicit range, such as a zoomed chart. Give it with to, at most 7 days wide and at least a minute.
date-timeExclusive end of an explicit range. A later instant than now is read as now.
date-timeResponse Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/services/string/metrics/summary?environmentId=string"{ "$schema": "https://example.com/MetricsSummaryOutputBody.json", "bucketSeconds": 0, "cpu": { "limitMilli": 0, "limitPerInstanceMilli": 0, "points": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ], "unit": "percent" }, "deployMarkers": [ { "at": "2019-08-24T14:15:22Z", "commit": "string", "kind": "deploy", "releaseNumber": 0 } ], "disk": [ { "capacityBytes": 0, "mountPath": "string", "name": "string", "points": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ], "reason": "string", "sizeBytes": 0 } ], "errorRate": { "points": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ] }, "from": "2019-08-24T14:15:22Z", "instances": [ { "cpuMilli": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ], "memoryBytes": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ], "pod": "string" } ], "instancesTruncated": true, "memory": { "limitBytes": 0, "limitPerInstanceBytes": 0, "points": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ], "unit": "percent" }, "network": { "rxBytesPerSecond": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ], "txBytesPerSecond": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ] }, "p95Ms": { "points": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ] }, "requestsPerMinute": { "points": [ { "t": "2019-08-24T14:15:22Z", "v": 0.1 } ] }, "to": "2019-08-24T14:15:22Z", "trafficReported": true, "usageReported": true, "window": "1h"}/api/v1/services/{id}/runtimeAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Service id.
Query Parameters
Environment id.
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/services/string/runtime"{ "$schema": "https://example.com/ServiceRuntimeOutputBody.json", "clusterId": "string", "events": [ { "at": "2019-08-24T14:15:22Z", "kind": "string" } ], "observedAt": "2019-08-24T14:15:22Z", "pods": [ { "cpuMilli": 0, "lastExitCode": 0, "lastTerminationReason": "string", "memoryBytes": 0, "name": "string", "node": "string", "phase": "string", "processName": "string", "ready": true, "restarts": 0, "startedAt": "2019-08-24T14:15:22Z", "waitingMessage": "string", "waitingReason": "string" } ], "resources": [ { "name": "string", "of": "string" } ]}/api/v1/services/{id}/trafficAn API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.
In: header
Path Parameters
Service id.
Query Parameters
Environment id.
Trailing window to report.
Value in
- "1h"
- "6h"
- "24h"
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/api/v1/services/string/traffic"{ "$schema": "https://example.com/ServiceTrafficOutputBody.json", "points": [ { "at": "2019-08-24T14:15:22Z", "errors5xx": 0, "errors5xxShare": 0.1, "latencyP95Milli": 0, "requests": 0, "requestsPerMinute": 0.1 } ]}Mesh
The WireGuard mesh between machines, and the access grants between environments. Each operation lists its method and path, parameters, request body, responses and an example call.
Shell
Open a shell in a running instance from the browser, and list, download and upload its files. Administrators and owners only. Each operation lists its method and path, parameters, request body, responses and an example call.