diff --git a/server/src/db/models/monitors/Monitor.ts b/server/src/db/models/monitors/Monitor.ts index 670401917..7ea98de26 100644 --- a/server/src/db/models/monitors/Monitor.ts +++ b/server/src/db/models/monitors/Monitor.ts @@ -39,7 +39,7 @@ export interface LatestCheck { responseTime: number; checkedAt: Date; // Snapshot of containers from the latest docker check (array from payload.data) - containerSnapshot?: IDockerContainerSummary[]; + dockerContainers?: IDockerContainerSummary[]; } export interface IMonitor extends Document { _id: Types.ObjectId; @@ -108,7 +108,7 @@ const MonitorSchema = new Schema( }, responseTime: { type: Number, required: true }, checkedAt: { type: Date, required: true }, - containerSnapshot: { + dockerContainers: { type: [ { container_id: { type: String }, diff --git a/server/src/services/infrastructure/StatusService.ts b/server/src/services/infrastructure/StatusService.ts index 3ba851480..a61101a1d 100644 --- a/server/src/services/infrastructure/StatusService.ts +++ b/server/src/services/infrastructure/StatusService.ts @@ -83,7 +83,7 @@ class StatusService implements IStatusService { // If this is a docker type, add the snapshot if (monitor.type === "docker") { const payload: any = statusResponse.payload; - nextCheck.containerSnapshot = payload.data; + nextCheck.dockerContainers = payload.data; } monitor.latestChecks.push(nextCheck);