diff --git a/Common/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts b/Common/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts index 242992ab57..c8d92742e5 100644 --- a/Common/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +++ b/Common/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts @@ -61,7 +61,7 @@ export default class ServerMonitorCriteria { input.criteriaFilter.evaluateOverTimeOptions ) { offlineIfNotCheckedInMinutes = - input.criteriaFilter.evaluateOverTimeOptions.timeValueInMinutes || 2; + input.criteriaFilter.evaluateOverTimeOptions.timeValueInMinutes || 3; } if ( diff --git a/ProbeIngest/API/ServerMonitor.ts b/ProbeIngest/API/ServerMonitor.ts index 0dd347e345..38cf68e693 100644 --- a/ProbeIngest/API/ServerMonitor.ts +++ b/ProbeIngest/API/ServerMonitor.ts @@ -15,6 +15,7 @@ import Express, { import MonitorResourceUtil from "Common/Server/Utils/Monitor/MonitorResource"; import Response from "Common/Server/Utils/Response"; import Monitor from "Common/Models/DatabaseModels/Monitor"; +import OneUptimeDate from "Common/Types/Date"; const router: ExpressRouter = Express.getRouter(); @@ -107,6 +108,8 @@ router.post( serverMonitorResponse.monitorId = monitor.id; + serverMonitorResponse.requestReceivedAt = OneUptimeDate.getCurrentDate(); + // process probe response here. const probeApiIngestResponse: ProbeApiIngestResponse = await MonitorResourceUtil.monitorResource(serverMonitorResponse); diff --git a/Worker/Jobs/ServerMonitor/CheckOnlineStatus.ts b/Worker/Jobs/ServerMonitor/CheckOnlineStatus.ts index 8a7f8bb816..a7bd584d20 100644 --- a/Worker/Jobs/ServerMonitor/CheckOnlineStatus.ts +++ b/Worker/Jobs/ServerMonitor/CheckOnlineStatus.ts @@ -16,7 +16,7 @@ RunCron( { schedule: EVERY_MINUTE, runOnStartup: false }, async () => { try { - const threeMinsAgo: Date = OneUptimeDate.getSomeMinutesAgo(3); + const threeMinsAgo: Date = OneUptimeDate.getSomeMinutesAgo(2); const serverMonitors: Array = await MonitorService.findBy({ query: {