diff --git a/client/package-lock.json b/client/package-lock.json index f6adb320d..ef226f507 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "client", - "version": "3.11.0", + "version": "3.12.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "client", - "version": "3.11.0", + "version": "3.12.0", "dependencies": { "@csstools/css-tokenizer": "^3.0.4", "@emotion/react": "^11.13.3", diff --git a/client/package.json b/client/package.json index 16f06aced..a9e53f93c 100644 --- a/client/package.json +++ b/client/package.json @@ -1,7 +1,7 @@ { "name": "client", "private": true, - "version": "3.11.0", + "version": "3.12.0", "type": "module", "scripts": { "lockfile": "docker run --rm -v \"$PWD\":/w -w /w $(grep -m1 -o 'node:[^ ]*' ../docker/Dockerfile) npm install --package-lock-only", diff --git a/server/openapi.json b/server/openapi.json index cf058ec4c..4b4faf896 100644 --- a/server/openapi.json +++ b/server/openapi.json @@ -422,9 +422,6 @@ "secret": { "type": "string" }, - "sshPrivateKey": { - "type": "string" - }, "cpuAlertThreshold": { "type": "number" }, @@ -466,6 +463,18 @@ "geoCheckInterval": { "type": "number" }, + "dockerLogsEnabled": { + "type": "boolean" + }, + "dockerTlsCa": { + "type": "string" + }, + "dockerTlsCert": { + "type": "string" + }, + "dockerTlsKeySet": { + "type": "boolean" + }, "dnsServer": { "type": "string" }, @@ -513,6 +522,7 @@ "geoCheckEnabled", "geoCheckLocations", "geoCheckInterval", + "dockerLogsEnabled", "teamId", "userId", "createdAt", @@ -640,9 +650,6 @@ "secret": { "type": "string" }, - "sshPrivateKey": { - "type": "string" - }, "cpuAlertThreshold": { "type": "number" }, @@ -684,6 +691,18 @@ "geoCheckInterval": { "type": "number" }, + "dockerLogsEnabled": { + "type": "boolean" + }, + "dockerTlsCa": { + "type": "string" + }, + "dockerTlsCert": { + "type": "string" + }, + "dockerTlsKeySet": { + "type": "boolean" + }, "dnsServer": { "type": "string" }, @@ -733,6 +752,7 @@ "geoCheckEnabled", "geoCheckLocations", "geoCheckInterval", + "dockerLogsEnabled", "teamId", "userId", "createdAt", @@ -929,6 +949,9 @@ { "$ref": "#/components/schemas/PushoverNotification" }, + { + "$ref": "#/components/schemas/SignalgridNotification" + }, { "$ref": "#/components/schemas/TwilioNotification" }, @@ -949,6 +972,7 @@ "teams": "#/components/schemas/TeamsNotification", "telegram": "#/components/schemas/TelegramNotification", "pushover": "#/components/schemas/PushoverNotification", + "signalgrid": "#/components/schemas/SignalgridNotification", "twilio": "#/components/schemas/TwilioNotification", "ntfy": "#/components/schemas/NtfyNotification" } @@ -1380,6 +1404,34 @@ "accessToken": "a1234567890abcdef" } }, + "SignalgridNotification": { + "type": "object", + "properties": { + "notificationName": { + "type": "string", + "minLength": 1 + }, + "type": { + "type": "string", + "enum": ["signalgrid"] + }, + "address": { + "type": "string", + "minLength": 1 + }, + "accessToken": { + "type": "string", + "minLength": 1 + } + }, + "required": ["notificationName", "type", "address", "accessToken"], + "example": { + "notificationName": "Signalgrid", + "type": "signalgrid", + "address": "your-channel", + "accessToken": "your-client-key" + } + }, "TwilioNotification": { "type": "object", "properties": { @@ -7090,9 +7142,6 @@ "secret": { "type": "string" }, - "sshPrivateKey": { - "type": "string" - }, "cpuAlertThreshold": { "type": "number" }, @@ -7134,6 +7183,18 @@ "geoCheckInterval": { "type": "number" }, + "dockerLogsEnabled": { + "type": "boolean" + }, + "dockerTlsCa": { + "type": "string" + }, + "dockerTlsCert": { + "type": "string" + }, + "dockerTlsKeySet": { + "type": "boolean" + }, "dnsServer": { "type": "string" }, @@ -7183,6 +7244,7 @@ "geoCheckEnabled", "geoCheckLocations", "geoCheckInterval", + "dockerLogsEnabled", "teamId", "userId", "createdAt", @@ -7655,9 +7717,6 @@ "secret": { "type": "string" }, - "sshPrivateKey": { - "type": "string" - }, "cpuAlertThreshold": { "type": "number" }, @@ -7699,6 +7758,18 @@ "geoCheckInterval": { "type": "number" }, + "dockerLogsEnabled": { + "type": "boolean" + }, + "dockerTlsCa": { + "type": "string" + }, + "dockerTlsCert": { + "type": "string" + }, + "dockerTlsKeySet": { + "type": "boolean" + }, "dnsServer": { "type": "string" }, @@ -7748,6 +7819,7 @@ "geoCheckEnabled", "geoCheckLocations", "geoCheckInterval", + "dockerLogsEnabled", "teamId", "userId", "createdAt", @@ -7984,6 +8056,231 @@ } } }, + "/monitors/docker/details/{monitorId}/containers/{containerName}/logs": { + "get": { + "tags": ["monitors"], + "summary": "Get stored log lines for one container on a Docker host monitor, newest first", + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true, + "name": "monitorId", + "in": "path" + }, + { + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true, + "name": "containerName", + "in": "path" + }, + { + "schema": { + "type": "string", + "format": "date-time" + }, + "required": false, + "name": "before", + "in": "query" + }, + { + "schema": { + "type": "string", + "format": "date-time" + }, + "required": false, + "name": "after", + "in": "query" + }, + { + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 50, + "default": 20 + }, + "required": false, + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [true] + }, + "msg": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "monitorId": { + "type": "string" + }, + "teamId": { + "type": "string" + }, + "containerId": { + "type": "string" + }, + "containerName": { + "type": "string" + } + }, + "required": ["monitorId", "teamId", "containerId", "containerName"] + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ts": { + "type": "string" + }, + "stream": { + "type": "string", + "enum": ["stdout", "stderr"] + }, + "text": { + "type": "string" + } + }, + "required": ["ts", "stream", "text"] + } + }, + "gap": { + "type": "boolean" + }, + "checkedAt": { + "type": "string" + }, + "expiry": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": ["id", "metadata", "lines", "gap", "checkedAt", "expiry", "createdAt", "updatedAt"] + } + }, + "nextCursor": { + "type": "string", + "nullable": true + } + }, + "required": ["logs", "nextCursor"] + } + }, + "required": ["success", "msg", "data"] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [false] + }, + "msg": { + "type": "string" + }, + "data": { + "nullable": true + } + }, + "required": ["success", "msg"] + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [false] + }, + "msg": { + "type": "string" + }, + "data": { + "nullable": true + } + }, + "required": ["success", "msg"] + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [false] + }, + "msg": { + "type": "string" + }, + "data": { + "nullable": true + } + }, + "required": ["success", "msg"] + } + } + } + } + } + } + }, "/monitors/pagespeed/details/{monitorId}": { "get": { "tags": ["monitors"], @@ -8908,9 +9205,6 @@ "secret": { "type": "string" }, - "sshPrivateKey": { - "type": "string" - }, "jsonPath": { "anyOf": [ { @@ -9011,6 +9305,42 @@ "type": "number", "minimum": 300000 }, + "dockerLogsEnabled": { + "type": "boolean" + }, + "dockerTlsCa": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [""] + } + ] + }, + "dockerTlsCert": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [""] + } + ] + }, + "dockerTlsKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [""] + } + ] + }, "dnsServer": { "type": "string", "minLength": 1 @@ -9604,9 +9934,6 @@ "secret": { "type": "string" }, - "sshPrivateKey": { - "type": "string" - }, "cpuAlertThreshold": { "type": "number", "default": 100 @@ -9702,6 +10029,10 @@ "minimum": 300000, "default": 300000 }, + "dockerLogsEnabled": { + "type": "boolean", + "default": false + }, "dnsServer": { "type": "string", "minLength": 1 @@ -10137,9 +10468,6 @@ "secret": { "type": "string" }, - "sshPrivateKey": { - "type": "string" - }, "ignoreTlsErrors": { "type": "boolean" }, @@ -10269,6 +10597,42 @@ "type": "number", "minimum": 300000 }, + "dockerLogsEnabled": { + "type": "boolean" + }, + "dockerTlsCa": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [""] + } + ] + }, + "dockerTlsCert": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [""] + } + ] + }, + "dockerTlsKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [""] + } + ] + }, "dnsServer": { "type": "string", "minLength": 1 diff --git a/server/src/config/services.worker.ts b/server/src/config/services.worker.ts index 8b2f4de07..acd4a944a 100644 --- a/server/src/config/services.worker.ts +++ b/server/src/config/services.worker.ts @@ -16,7 +16,7 @@ import { SharedServices } from "@/config/services.shared.js"; import { INetworkService, NetworkService } from "@/service/networkService.js"; import { IBufferService, BufferService } from "@/service/bufferService.js"; import { IStatusService, StatusService } from "@/service/statusService.js"; -import { ISecretsRotationService, SecretsRotationService } from "@/service/encryption/secretsRotationService.js"; +import { SecretsRotationService } from "@/service/encryption/secretsRotationService.js"; import { IQueueWorker } from "@/worker/worker.interface.js"; import { MonitorStatusPolicy } from "@/worker/worker.monitor-status-policy.js"; import { WorkerHelper } from "@/worker/worker.helper.js";