@oneuptime/common 14.0.110 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
- package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
- package/Models/DatabaseModels/AIRunRecording.js +181 -0
- package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
- package/Models/DatabaseModels/Alert.js +18 -2
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/EmailLog.js +2 -2
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +4 -4
- package/Models/DatabaseModels/GlobalConfig.js +46 -45
- package/Models/DatabaseModels/Incident.js +18 -2
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/Index.js +4 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +51 -17
- package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
- package/Models/DatabaseModels/MonitorProbe.js +22 -5
- package/Models/DatabaseModels/NetworkDevice.js +23 -7
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
- package/Models/DatabaseModels/NetworkInterface.js +5 -5
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +1 -0
- package/Models/DatabaseModels/Project.d.ts +1 -0
- package/Models/DatabaseModels/Project.js +46 -3
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
- package/Server/Services/DatabaseService.d.mts +4 -1
- package/Server/Services/DatabaseService.d.ts +4 -1
- package/Server/Types/Database/CountBy.d.mts +1 -0
- package/Server/Types/Database/CountBy.d.ts +1 -0
- package/Server/Types/Database/UpdateLimit.d.mts +6 -0
- package/Server/Types/Database/UpdateLimit.d.ts +6 -0
- package/Types/AI/AIActionWords.d.mts +25 -1
- package/Types/AI/AIActionWords.d.ts +25 -1
- package/Types/AI/AIActionWords.js +166 -3
- package/Types/AI/AIActionWords.mjs +6 -0
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AiOutcomes.d.mts +57 -0
- package/Types/AI/AiOutcomes.d.ts +57 -0
- package/Types/AI/AiOutcomes.js +67 -0
- package/Types/AI/AiOutcomes.mjs +10 -0
- package/Types/AI/AiRunRefusal.d.mts +45 -0
- package/Types/AI/AiRunRefusal.d.ts +45 -0
- package/Types/AI/AiRunRefusal.js +187 -0
- package/Types/AI/AiRunRefusal.mjs +12 -0
- package/Types/AI/InvestigationRecording.d.mts +46 -0
- package/Types/AI/InvestigationRecording.d.ts +46 -0
- package/Types/AI/InvestigationRecording.js +42 -0
- package/Types/AI/InvestigationRecording.mjs +7 -0
- package/Types/API/HTTPResponse.d.mts +3 -0
- package/Types/API/HTTPResponse.d.ts +3 -0
- package/Types/API/HTTPResponse.js +15 -0
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
- package/Types/BaseDatabase/ListResult.d.mts +1 -0
- package/Types/BaseDatabase/ListResult.d.ts +1 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
- package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
- package/Types/Date.d.mts +6 -1
- package/Types/Date.d.ts +6 -1
- package/Types/Date.js +39 -7
- package/Types/Date.mjs +1 -0
- package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
- package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
- package/Types/Email/ServerEmailEnvironment.js +793 -0
- package/Types/Email/ServerEmailEnvironment.mjs +14 -0
- package/Types/Exception/AiRunRefusalException.d.mts +6 -0
- package/Types/Exception/AiRunRefusalException.d.ts +6 -0
- package/Types/Exception/AiRunRefusalException.js +23 -0
- package/Types/Exception/AiRunRefusalException.mjs +2 -0
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
- package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
- package/Types/Monitor/UptimeHistoryLabels.js +2 -2
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
- package/Types/Permission.js +2 -2
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +10 -0
- package/Types/ReaderLanguage.d.mts +1 -0
- package/Types/ReaderLanguage.d.ts +1 -0
- package/Types/ReaderLanguage.js +13 -1
- package/Types/ReaderLanguage.mjs +1 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
- package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
- package/Types/ServerSending/ServerSendingStatus.js +49 -2
- package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
- package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
- package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
- package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
- package/Types/Telemetry/CompatibleIngest.js +123 -0
- package/Types/Telemetry/CompatibleIngest.mjs +21 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
- package/Types/TimezoneAlias.d.mts +1 -0
- package/Types/TimezoneAlias.d.ts +1 -0
- package/Types/TimezoneAlias.js +13 -0
- package/Types/Translator.js +374 -48
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +2 -2
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
- package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
- package/Utils/HostAddressUtil.d.mts +1 -0
- package/Utils/HostAddressUtil.d.ts +1 -0
- package/Utils/HostAddressUtil.js +30 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/Milliseconds.d.mts +7 -0
- package/Utils/Milliseconds.d.ts +7 -0
- package/Utils/Milliseconds.js +60 -0
- package/Utils/Milliseconds.mjs +4 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
- package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
- package/Utils/Monitor/MonitoringOff.d.mts +2 -0
- package/Utils/Monitor/MonitoringOff.d.ts +2 -0
- package/Utils/Monitor/MonitoringOff.js +21 -0
- package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
- package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
- package/Utils/Monitor/ProbeFailureReading.js +137 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
- package/Utils/Project/NextNumber.js +1 -1
- package/Utils/PromQL/PromQLAst.d.mts +159 -0
- package/Utils/PromQL/PromQLAst.d.ts +159 -0
- package/Utils/PromQL/PromQLAst.js +118 -0
- package/Utils/PromQL/PromQLAst.mjs +12 -0
- package/Utils/PromQL/PromQLDuration.d.mts +2 -0
- package/Utils/PromQL/PromQLDuration.d.ts +2 -0
- package/Utils/PromQL/PromQLDuration.js +78 -0
- package/Utils/PromQL/PromQLDuration.mjs +3 -0
- package/Utils/PromQL/PromQLEngine.d.mts +15 -0
- package/Utils/PromQL/PromQLEngine.d.ts +15 -0
- package/Utils/PromQL/PromQLEngine.js +965 -0
- package/Utils/PromQL/PromQLEngine.mjs +7 -0
- package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.js +10 -0
- package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
- package/Utils/PromQL/PromQLError.d.mts +11 -0
- package/Utils/PromQL/PromQLError.d.ts +11 -0
- package/Utils/PromQL/PromQLError.js +27 -0
- package/Utils/PromQL/PromQLError.mjs +3 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
- package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
- package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
- package/Utils/PromQL/PromQLFunctions.js +127 -0
- package/Utils/PromQL/PromQLFunctions.mjs +4 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +218 -0
- package/Utils/PromQL/PromQLLabels.mjs +9 -0
- package/Utils/PromQL/PromQLLexer.d.mts +39 -0
- package/Utils/PromQL/PromQLLexer.d.ts +39 -0
- package/Utils/PromQL/PromQLLexer.js +391 -0
- package/Utils/PromQL/PromQLLexer.mjs +3 -0
- package/Utils/PromQL/PromQLMath.d.mts +19 -0
- package/Utils/PromQL/PromQLMath.d.ts +19 -0
- package/Utils/PromQL/PromQLMath.js +200 -0
- package/Utils/PromQL/PromQLMath.mjs +9 -0
- package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
- package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
- package/Utils/PromQL/PromQLMetricNames.js +199 -0
- package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
- package/Utils/PromQL/PromQLParser.d.mts +4 -0
- package/Utils/PromQL/PromQLParser.d.ts +4 -0
- package/Utils/PromQL/PromQLParser.js +831 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +9 -0
- package/Utils/PromQL/PromQLRegex.d.ts +9 -0
- package/Utils/PromQL/PromQLRegex.js +74 -0
- package/Utils/PromQL/PromQLRegex.mjs +2 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +90 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/Rum/PathInSentence.d.mts +5 -0
- package/Utils/Rum/PathInSentence.d.ts +5 -0
- package/Utils/Rum/PathInSentence.js +46 -0
- package/Utils/Rum/PathInSentence.mjs +6 -0
- package/Utils/Rum/UrlScrubber.d.mts +4 -0
- package/Utils/Rum/UrlScrubber.d.ts +4 -0
- package/Utils/Rum/UrlScrubber.js +143 -3
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +180 -25
- package/Utils/Rum/UserFlow.mjs +1 -1
- package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.js +30 -0
- package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
- package/Utils/Schema/TypeSchemas.js +6 -0
- package/Utils/Slo/SloDuration.d.mts +5 -2
- package/Utils/Slo/SloDuration.d.ts +5 -2
- package/Utils/Slo/SloDuration.js +11 -6
- package/Utils/Slo/SloHealth.js +1 -1
- package/Utils/StateOrder.js +1 -4
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/package.json +1 -1
|
@@ -3,13 +3,89 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.INTERFACE_SATURATION_THRESHOLD_PERCENT = exports.INTERFACE_ERRORS_FLOOR_PER_SECOND = exports.INTERFACE_UTILIZATION_FLOOR_PERCENT = exports.INTERFACE_RATE_FLOOR_MBPS_WITHOUT_SPEED = exports.INTERFACE_RATE_FLOOR_SHARE_OF_SPEED = exports.INTERFACE_READING_RELATIVE_CHANGE = exports.INTERFACE_REFRESH_GROUPS = exports.INTERFACE_LAST_SEEN_REFRESH_MS = void 0;
|
|
6
7
|
const ColumnLength_1 = __importDefault(require("../../Types/Database/ColumnLength"));
|
|
8
|
+
/*
|
|
9
|
+
* Pure helpers that turn ONE device's IF-MIB walk into the exact rows the
|
|
10
|
+
* NetworkInterface inventory should insert and update, plus the set of
|
|
11
|
+
* interface indexes the user has muted. Everything here is deterministic and
|
|
12
|
+
* side-effect free so the column-by-column contract can be tested without a
|
|
13
|
+
* database; the batched SQL that applies it lives in NetworkInterfaceService.
|
|
14
|
+
*
|
|
15
|
+
* This mirrors EndpointAttachmentUtil.decideUpsert / NetworkEndpointService:
|
|
16
|
+
* the decision is pure, the persistence is one statement per chunk - and, as
|
|
17
|
+
* there, a row the walk would leave as it is costs no write at all.
|
|
18
|
+
*/
|
|
19
|
+
/*
|
|
20
|
+
* How long a stored interface may go unwritten before a walk that found
|
|
21
|
+
* nothing new about it writes it anyway, to move its lastSeenAt.
|
|
22
|
+
*
|
|
23
|
+
* A walk used to rewrite every interface it saw, on every poll: 3 million
|
|
24
|
+
* interfaces on five-minute polls is 10,000 new row versions a second, each
|
|
25
|
+
* one WAL, a dead tuple and vacuum work, for rows that had not changed.
|
|
26
|
+
* Now an interface whose inventory and state are as stored, and whose rates
|
|
27
|
+
* have not moved noticeably (ratesMoved), is written once per this window:
|
|
28
|
+
* once in every three polls at the default five minutes.
|
|
29
|
+
*
|
|
30
|
+
* Nothing in the product reads an interface's lastSeenAt: the device list,
|
|
31
|
+
* the Interfaces tab, the topology and the alerting all read the device's
|
|
32
|
+
* own lastSeenAt / lastSnmpSeenAt, and the interface's state. So an
|
|
33
|
+
* interface's lastSeenAt is accurate to this window (and one poll), and the
|
|
34
|
+
* API says so.
|
|
35
|
+
*/
|
|
36
|
+
exports.INTERFACE_LAST_SEEN_REFRESH_MS = 15 * 60 * 1000;
|
|
37
|
+
/*
|
|
38
|
+
* The refresh is spread across the window, not taken all at once: each
|
|
39
|
+
* interface counts its window on a clock of its own, offset by its ifIndex
|
|
40
|
+
* in steps of a fifteenth of the window (refreshSlot). A switch's ports then
|
|
41
|
+
* come due a few at a time - a third of them on each five-minute poll -
|
|
42
|
+
* rather than all of them on every third poll.
|
|
43
|
+
*
|
|
44
|
+
* That is what lets the refresh be a HOT update. A walk writes a device's
|
|
45
|
+
* ports in one statement, and its rows sit together on a page or two. A
|
|
46
|
+
* page takes a HOT update only into room it has free while the statement
|
|
47
|
+
* runs, because the rows it replaces are not dead until the statement
|
|
48
|
+
* commits: rewriting every port on a page at once needed half the page
|
|
49
|
+
* free, so most of each refresh left the page, wrote an entry into every
|
|
50
|
+
* index, and left dead ones for vacuum. A third of the ports needs a
|
|
51
|
+
* quarter of the page, which is about the room the table keeps (fillfactor,
|
|
52
|
+
* SetNetworkInterfaceFillfactor1809164000000).
|
|
53
|
+
*/
|
|
54
|
+
exports.INTERFACE_REFRESH_GROUPS = 15;
|
|
55
|
+
/*
|
|
56
|
+
* When a walk writes an interface's readings again (ratesMoved). The stored
|
|
57
|
+
* readings are what the Interfaces tab, the device's interface preview and
|
|
58
|
+
* the topology's links show; their history is in the interface metrics,
|
|
59
|
+
* written on every poll. A reading is written again when it moves by at
|
|
60
|
+
* least a tenth of the larger of the two readings AND by more than noise:
|
|
61
|
+
*
|
|
62
|
+
* in / out rate 1% of the link's speed, 1 Mbps when it reports none
|
|
63
|
+
* utilization one percentage point
|
|
64
|
+
* errors / second 0.01, the resolution it is stored at
|
|
65
|
+
*
|
|
66
|
+
* and always when it crosses a line a reader draws: utilization reaching or
|
|
67
|
+
* leaving INTERFACE_SATURATION_THRESHOLD_PERCENT (a saturated link on the
|
|
68
|
+
* map, a highlighted row in the preview), errors starting or stopping (the
|
|
69
|
+
* preview's attention order), and a reading appearing or going away (a dash
|
|
70
|
+
* in the table).
|
|
71
|
+
*/
|
|
72
|
+
exports.INTERFACE_READING_RELATIVE_CHANGE = 0.1;
|
|
73
|
+
exports.INTERFACE_RATE_FLOOR_SHARE_OF_SPEED = 0.01;
|
|
74
|
+
exports.INTERFACE_RATE_FLOOR_MBPS_WITHOUT_SPEED = 1;
|
|
75
|
+
exports.INTERFACE_UTILIZATION_FLOOR_PERCENT = 1;
|
|
76
|
+
exports.INTERFACE_ERRORS_FLOOR_PER_SECOND = 0.01;
|
|
77
|
+
/*
|
|
78
|
+
* Utilization at or above this reads as saturated: the topology's link state
|
|
79
|
+
* (LINK_SATURATION_THRESHOLD_PERCENT in the dashboard) and the interface
|
|
80
|
+
* preview's highlight both draw the line here.
|
|
81
|
+
*/
|
|
82
|
+
exports.INTERFACE_SATURATION_THRESHOLD_PERCENT = 80;
|
|
7
83
|
// Bits/sec on the wire; Mbps in the inventory.
|
|
8
84
|
const BITS_PER_MEGABIT = 1000000;
|
|
9
85
|
/*
|
|
10
86
|
* Rate columns are stored rounded to three decimals (kbps resolution). The
|
|
11
|
-
* rounding is part of the stored value, not presentation
|
|
12
|
-
*
|
|
87
|
+
* rounding is part of the stored value, not presentation. Whether a moved
|
|
88
|
+
* rate is written at all is ratesMoved's call.
|
|
13
89
|
*/
|
|
14
90
|
const RATE_DECIMAL_SCALE = 1000;
|
|
15
91
|
/*
|
|
@@ -30,17 +106,21 @@ function truncateShortText(value) {
|
|
|
30
106
|
class InterfaceInventoryUtil {
|
|
31
107
|
/*
|
|
32
108
|
* (walked interfaces, stored rows, walk timestamp) -> (rows to insert,
|
|
33
|
-
* rows to update, muted indexes).
|
|
109
|
+
* rows to update, rows left as they are, muted indexes).
|
|
34
110
|
*
|
|
35
111
|
* lastSeenAt is stamped from the caller's single `now` for every row, so a
|
|
36
112
|
* 400-port chassis does not end up with 400 slightly different timestamps
|
|
37
113
|
* that make "which ports answered on this walk" unanswerable.
|
|
114
|
+
*
|
|
115
|
+
* A known interface is updated only when needsWrite says so; otherwise it
|
|
116
|
+
* is listed as unchanged and costs nothing. `refreshMs` is for tests.
|
|
38
117
|
*/
|
|
39
118
|
static planWalkUpsert(data) {
|
|
40
119
|
var _a, _b, _c, _d;
|
|
41
120
|
const plan = {
|
|
42
121
|
inserts: [],
|
|
43
122
|
updates: [],
|
|
123
|
+
unchangedInterfaceIndexes: [],
|
|
44
124
|
unmonitoredInterfaceIndexes: [],
|
|
45
125
|
};
|
|
46
126
|
/*
|
|
@@ -75,7 +155,7 @@ class InterfaceInventoryUtil {
|
|
|
75
155
|
plan.unmonitoredInterfaceIndexes.push(walked.interfaceIndex);
|
|
76
156
|
}
|
|
77
157
|
if (existing) {
|
|
78
|
-
|
|
158
|
+
const update = {
|
|
79
159
|
interfaceIndex: walked.interfaceIndex,
|
|
80
160
|
name: InterfaceInventoryUtil.interfaceName(walked),
|
|
81
161
|
alias: truncateShortText(walked.alias),
|
|
@@ -89,7 +169,18 @@ class InterfaceInventoryUtil {
|
|
|
89
169
|
utilizationPercent: (_b = walked.utilizationPercent) !== null && _b !== void 0 ? _b : null,
|
|
90
170
|
errorsPerSecond: (_c = walked.errorsPerSecond) !== null && _c !== void 0 ? _c : null,
|
|
91
171
|
lastSeenAt: data.now,
|
|
92
|
-
}
|
|
172
|
+
};
|
|
173
|
+
if (InterfaceInventoryUtil.needsWrite({
|
|
174
|
+
stored: existing,
|
|
175
|
+
update: update,
|
|
176
|
+
now: data.now,
|
|
177
|
+
refreshMs: data.refreshMs,
|
|
178
|
+
})) {
|
|
179
|
+
plan.updates.push(update);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
plan.unchangedInterfaceIndexes.push(walked.interfaceIndex);
|
|
183
|
+
}
|
|
93
184
|
}
|
|
94
185
|
else {
|
|
95
186
|
plan.inserts.push({
|
|
@@ -108,6 +199,127 @@ class InterfaceInventoryUtil {
|
|
|
108
199
|
}
|
|
109
200
|
return plan;
|
|
110
201
|
}
|
|
202
|
+
/*
|
|
203
|
+
* Whether a walk writes a stored interface again, given the row the walk
|
|
204
|
+
* would write. In order:
|
|
205
|
+
*
|
|
206
|
+
* 1. Never when the row was last seen at or after this walk. A newer walk
|
|
207
|
+
* wrote it, and the UPDATE's own WHERE would refuse it anyway (an older
|
|
208
|
+
* poll processed after a newer one, OneUptime issue #7389).
|
|
209
|
+
* 2. Always when the row has no lastSeenAt, or was last written in an
|
|
210
|
+
* earlier refresh slot of its own (refreshSlot: a window of
|
|
211
|
+
* INTERFACE_LAST_SEEN_REFRESH_MS, offset by its ifIndex): its
|
|
212
|
+
* lastSeenAt moves, and so does any reading that moved too little to
|
|
213
|
+
* be written on its own. So an answering interface's lastSeenAt is
|
|
214
|
+
* never more than one window and one poll old.
|
|
215
|
+
* 3. Always when anything the walk reads about the port changed: its
|
|
216
|
+
* name, alias, MAC, type, speed, or its operational or administrative
|
|
217
|
+
* state. Compared exactly, after the same truncation and unit
|
|
218
|
+
* conversion the write applies.
|
|
219
|
+
* 4. When a reading moved noticeably (ratesMoved).
|
|
220
|
+
*
|
|
221
|
+
* Otherwise the row is left as it is. isMonitored plays no part: the walk
|
|
222
|
+
* never writes it.
|
|
223
|
+
*/
|
|
224
|
+
static needsWrite(data) {
|
|
225
|
+
var _a;
|
|
226
|
+
const stored = data.stored;
|
|
227
|
+
const update = data.update;
|
|
228
|
+
const lastSeenAt = InterfaceInventoryUtil.toTime(stored.lastSeenAt);
|
|
229
|
+
if (lastSeenAt !== null && lastSeenAt >= data.now.getTime()) {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
if (lastSeenAt === null) {
|
|
233
|
+
return true;
|
|
234
|
+
}
|
|
235
|
+
const refreshMs = (_a = data.refreshMs) !== null && _a !== void 0 ? _a : exports.INTERFACE_LAST_SEEN_REFRESH_MS;
|
|
236
|
+
if (InterfaceInventoryUtil.refreshSlot({
|
|
237
|
+
time: data.now.getTime(),
|
|
238
|
+
interfaceIndex: update.interfaceIndex,
|
|
239
|
+
refreshMs: refreshMs,
|
|
240
|
+
}) >
|
|
241
|
+
InterfaceInventoryUtil.refreshSlot({
|
|
242
|
+
time: lastSeenAt,
|
|
243
|
+
interfaceIndex: update.interfaceIndex,
|
|
244
|
+
refreshMs: refreshMs,
|
|
245
|
+
})) {
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
if (!InterfaceInventoryUtil.isSame(stored.name, update.name) ||
|
|
249
|
+
!InterfaceInventoryUtil.isSame(stored.alias, update.alias) ||
|
|
250
|
+
!InterfaceInventoryUtil.isSame(stored.macAddress, update.macAddress) ||
|
|
251
|
+
!InterfaceInventoryUtil.isSame(stored.interfaceType, update.interfaceType) ||
|
|
252
|
+
!InterfaceInventoryUtil.isSame(stored.isOperationallyUp, update.isOperationallyUp) ||
|
|
253
|
+
!InterfaceInventoryUtil.isSame(stored.isAdministrativelyUp, update.isAdministrativelyUp) ||
|
|
254
|
+
!InterfaceInventoryUtil.isSame(stored.speedInMbps, update.speedInMbps)) {
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
return InterfaceInventoryUtil.ratesMoved({ stored, update });
|
|
258
|
+
}
|
|
259
|
+
/*
|
|
260
|
+
* Which refresh window of its own a time falls in, for one interface:
|
|
261
|
+
* windows of `refreshMs`, offset by the interface's ifIndex in steps of
|
|
262
|
+
* 1/INTERFACE_REFRESH_GROUPS of a window. Interfaces whose ifIndex differs
|
|
263
|
+
* by one come due a fifteenth of a window apart, so a device's ports are
|
|
264
|
+
* spread evenly across it (see INTERFACE_REFRESH_GROUPS for why).
|
|
265
|
+
*/
|
|
266
|
+
static refreshSlot(data) {
|
|
267
|
+
const group = ((Math.trunc(data.interfaceIndex) % exports.INTERFACE_REFRESH_GROUPS) +
|
|
268
|
+
exports.INTERFACE_REFRESH_GROUPS) %
|
|
269
|
+
exports.INTERFACE_REFRESH_GROUPS;
|
|
270
|
+
return Math.floor((data.time + (group * data.refreshMs) / exports.INTERFACE_REFRESH_GROUPS) /
|
|
271
|
+
data.refreshMs);
|
|
272
|
+
}
|
|
273
|
+
/*
|
|
274
|
+
* Whether any of the four readings moved enough to be written on its own
|
|
275
|
+
* (see INTERFACE_READING_RELATIVE_CHANGE for the rule and why).
|
|
276
|
+
*/
|
|
277
|
+
static ratesMoved(data) {
|
|
278
|
+
const stored = data.stored;
|
|
279
|
+
const update = data.update;
|
|
280
|
+
const rateFloorMbps = update.speedInMbps !== null && update.speedInMbps > 0
|
|
281
|
+
? update.speedInMbps * exports.INTERFACE_RATE_FLOOR_SHARE_OF_SPEED
|
|
282
|
+
: exports.INTERFACE_RATE_FLOOR_MBPS_WITHOUT_SPEED;
|
|
283
|
+
const isSaturated = (utilization) => {
|
|
284
|
+
return (utilization !== null && utilization !== void 0 ? utilization : 0) >= exports.INTERFACE_SATURATION_THRESHOLD_PERCENT;
|
|
285
|
+
};
|
|
286
|
+
const hasErrors = (errorsPerSecond) => {
|
|
287
|
+
return (errorsPerSecond !== null && errorsPerSecond !== void 0 ? errorsPerSecond : 0) > 0;
|
|
288
|
+
};
|
|
289
|
+
return (InterfaceInventoryUtil.readingMoved(stored.inRateMbps, update.inRateMbps, rateFloorMbps) ||
|
|
290
|
+
InterfaceInventoryUtil.readingMoved(stored.outRateMbps, update.outRateMbps, rateFloorMbps) ||
|
|
291
|
+
InterfaceInventoryUtil.readingMoved(stored.utilizationPercent, update.utilizationPercent, exports.INTERFACE_UTILIZATION_FLOOR_PERCENT) ||
|
|
292
|
+
isSaturated(stored.utilizationPercent) !==
|
|
293
|
+
isSaturated(update.utilizationPercent) ||
|
|
294
|
+
InterfaceInventoryUtil.readingMoved(stored.errorsPerSecond, update.errorsPerSecond, exports.INTERFACE_ERRORS_FLOOR_PER_SECOND) ||
|
|
295
|
+
hasErrors(stored.errorsPerSecond) !== hasErrors(update.errorsPerSecond));
|
|
296
|
+
}
|
|
297
|
+
/*
|
|
298
|
+
* A reading that appeared or went away moved; two readings moved when
|
|
299
|
+
* they are at least `floor` apart and at least a tenth of the larger one.
|
|
300
|
+
*/
|
|
301
|
+
static readingMoved(stored, current, floor) {
|
|
302
|
+
const before = stored !== null && stored !== void 0 ? stored : null;
|
|
303
|
+
if (before === null || current === null) {
|
|
304
|
+
return before !== current;
|
|
305
|
+
}
|
|
306
|
+
const change = Math.abs(current - before);
|
|
307
|
+
return (change >= floor &&
|
|
308
|
+
change >=
|
|
309
|
+
exports.INTERFACE_READING_RELATIVE_CHANGE *
|
|
310
|
+
Math.max(Math.abs(before), Math.abs(current)));
|
|
311
|
+
}
|
|
312
|
+
// Null and undefined are both "nothing stored".
|
|
313
|
+
static isSame(stored, current) {
|
|
314
|
+
return (stored !== null && stored !== void 0 ? stored : null) === current;
|
|
315
|
+
}
|
|
316
|
+
static toTime(value) {
|
|
317
|
+
if (value === null || value === undefined) {
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
const time = new Date(value).getTime();
|
|
321
|
+
return isNaN(time) ? null : time;
|
|
322
|
+
}
|
|
111
323
|
/*
|
|
112
324
|
* `name` is NOT NULL in the schema, and some agents return an empty
|
|
113
325
|
* ifDescr for tunnel/loopback pseudo-interfaces — hence the empty-string
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
import commonJsModule from "./InterfaceInventoryUtil.js";
|
|
2
2
|
export default commonJsModule.default;
|
|
3
|
+
export const INTERFACE_ERRORS_FLOOR_PER_SECOND = commonJsModule.INTERFACE_ERRORS_FLOOR_PER_SECOND;
|
|
4
|
+
export const INTERFACE_LAST_SEEN_REFRESH_MS = commonJsModule.INTERFACE_LAST_SEEN_REFRESH_MS;
|
|
5
|
+
export const INTERFACE_RATE_FLOOR_MBPS_WITHOUT_SPEED = commonJsModule.INTERFACE_RATE_FLOOR_MBPS_WITHOUT_SPEED;
|
|
6
|
+
export const INTERFACE_RATE_FLOOR_SHARE_OF_SPEED = commonJsModule.INTERFACE_RATE_FLOOR_SHARE_OF_SPEED;
|
|
7
|
+
export const INTERFACE_READING_RELATIVE_CHANGE = commonJsModule.INTERFACE_READING_RELATIVE_CHANGE;
|
|
8
|
+
export const INTERFACE_REFRESH_GROUPS = commonJsModule.INTERFACE_REFRESH_GROUPS;
|
|
9
|
+
export const INTERFACE_SATURATION_THRESHOLD_PERCENT = commonJsModule.INTERFACE_SATURATION_THRESHOLD_PERCENT;
|
|
10
|
+
export const INTERFACE_UTILIZATION_FLOOR_PERCENT = commonJsModule.INTERFACE_UTILIZATION_FLOOR_PERCENT;
|
|
@@ -43,12 +43,14 @@ const CriteriaFilter_1 = require("../../Types/Monitor/CriteriaFilter");
|
|
|
43
43
|
const MonitorType_1 = __importDefault(require("../../Types/Monitor/MonitorType"));
|
|
44
44
|
const SloDuration_1 = require("../Slo/SloDuration");
|
|
45
45
|
const Translator_1 = require("../../Types/Translator");
|
|
46
|
+
const Milliseconds_1 = require("../Milliseconds");
|
|
46
47
|
const MonitorCheckScheduleUtil_1 = __importStar(require("./MonitorCheckScheduleUtil"));
|
|
47
48
|
const MonitorOverviewCriteriaUtil_1 = __importDefault(require("./MonitorOverviewCriteriaUtil"));
|
|
48
49
|
const MonitorOverviewFamily_1 = __importStar(require("./MonitorOverviewFamily"));
|
|
49
50
|
const MonitorStatusHistoryUtil_1 = __importDefault(require("./MonitorStatusHistoryUtil"));
|
|
50
51
|
const ProbeStatusMonitorUtil_1 = __importDefault(require("./ProbeStatusMonitorUtil"));
|
|
51
52
|
const MonitorOverviewTargetUtil_1 = __importDefault(require("./MonitorOverviewTargetUtil"));
|
|
53
|
+
const ProbeFailureReading_1 = require("./ProbeFailureReading");
|
|
52
54
|
/*
|
|
53
55
|
* The monitor overview's hero, facts, pulse and section switches, decided in
|
|
54
56
|
* one pure function so every per-type and per-state rule is unit-tested
|
|
@@ -67,6 +69,13 @@ const MonitorOverviewTargetUtil_1 = __importDefault(require("./MonitorOverviewTa
|
|
|
67
69
|
* for word as it always has. What a monitor's owner named - a probe, a
|
|
68
70
|
* host - goes in as written; a status's name is drawn as StatusBadge draws
|
|
69
71
|
* it, in the reader's words when it is one of OneUptime's own.
|
|
72
|
+
*
|
|
73
|
+
* Its figures are the reader's too: a count goes into its sentence as
|
|
74
|
+
* translator.formatNumber writes it ("۲ از ۳" in Persian, never "2 از 3"),
|
|
75
|
+
* a response time through the shared formatMilliseconds ("182 ms", "۱۸۲
|
|
76
|
+
* میلیثانیه", "182 ملي ث"), and the facts of one line are set apart as the
|
|
77
|
+
* reader's language sets them (formatInline: " · ", or " • " in Persian,
|
|
78
|
+
* whose zero is a dot).
|
|
70
79
|
*/
|
|
71
80
|
var MonitorOverviewRunState;
|
|
72
81
|
(function (MonitorOverviewRunState) {
|
|
@@ -95,7 +104,7 @@ const PAUSED_EXPLANATION = {
|
|
|
95
104
|
incident: (0, Translator_1.translationKey)("Checks resume when the incident that paused this monitor is resolved."),
|
|
96
105
|
maintenance: (0, Translator_1.translationKey)("Checks resume automatically when the maintenance event ends."),
|
|
97
106
|
};
|
|
98
|
-
const MANUAL_EXPLANATION = (0, Translator_1.translationKey)("Manual monitor: OneUptime runs no checks. The status changes when someone sets it, or when an incident or
|
|
107
|
+
const MANUAL_EXPLANATION = (0, Translator_1.translationKey)("Manual monitor: OneUptime runs no checks. The status changes when someone sets it, or when an incident or maintenance event changes it.");
|
|
99
108
|
/*
|
|
100
109
|
* What an empty evaluation log says once the monitor is older than the
|
|
101
110
|
* log keeps rows (MONITOR_LOG_MINIMUM_RETENTION_SECONDS): not "never".
|
|
@@ -1479,15 +1488,15 @@ class MonitorOverviewPresentationUtil {
|
|
|
1479
1488
|
return Object.assign(Object.assign({}, base), { value: total === 1
|
|
1480
1489
|
? t.translateTemplate("Disconnected")
|
|
1481
1490
|
: t.translateTemplate("{{disconnected}} of {{total}} disconnected", {
|
|
1482
|
-
disconnected: disconnected,
|
|
1483
|
-
total: total,
|
|
1491
|
+
disconnected: t.formatNumber(disconnected),
|
|
1492
|
+
total: t.formatNumber(total),
|
|
1484
1493
|
}), secondary: ProbeStatusMonitorUtil_1.default.joinProbeNames(ProbeStatusMonitorUtil_1.default.getDisconnectedProbes({ probes: probes })), tone: "danger" });
|
|
1485
1494
|
}
|
|
1486
1495
|
return Object.assign(Object.assign({}, base), { value: total === 1
|
|
1487
1496
|
? t.translateTemplate("Connected")
|
|
1488
1497
|
: t.translateTemplate("{{connected}} of {{total}} connected", {
|
|
1489
|
-
connected: total,
|
|
1490
|
-
total: total,
|
|
1498
|
+
connected: t.formatNumber(total),
|
|
1499
|
+
total: t.formatNumber(total),
|
|
1491
1500
|
}),
|
|
1492
1501
|
// One probe is named; several connected need no list.
|
|
1493
1502
|
secondary: total === 1 ? ProbeStatusMonitorUtil_1.default.joinProbeNames(probes) : undefined, tone: "good" });
|
|
@@ -1517,44 +1526,62 @@ class MonitorOverviewPresentationUtil {
|
|
|
1517
1526
|
if (upCount > 0 && downCount > 0) {
|
|
1518
1527
|
return Object.assign(Object.assign({}, base), { value: isScripted
|
|
1519
1528
|
? t.translateTemplate("Mixed · {{up}} passed, {{down}} failed", {
|
|
1520
|
-
up: upCount,
|
|
1521
|
-
down: downCount,
|
|
1529
|
+
up: t.formatNumber(upCount),
|
|
1530
|
+
down: t.formatNumber(downCount),
|
|
1522
1531
|
})
|
|
1523
1532
|
: t.translateTemplate("Mixed · {{up}} up, {{down}} down", {
|
|
1524
|
-
up: upCount,
|
|
1525
|
-
down: downCount,
|
|
1533
|
+
up: t.formatNumber(upCount),
|
|
1534
|
+
down: t.formatNumber(downCount),
|
|
1526
1535
|
}), tone: "warning" });
|
|
1527
1536
|
}
|
|
1528
1537
|
/*
|
|
1529
|
-
* The verdict in the reader's words, then the
|
|
1530
|
-
*
|
|
1538
|
+
* The verdict in the reader's words, then the response time in the
|
|
1539
|
+
* reader's digits and unit, then the status code every language writes
|
|
1540
|
+
* alike: "Up · 120 ms · HTTP 200", "Up · 120 ms · HTTP 200" in German,
|
|
1541
|
+
* "فعال • ۱۲۰ میلیثانیه • HTTP 200" in Persian.
|
|
1531
1542
|
*/
|
|
1532
|
-
let
|
|
1543
|
+
let verdict = t.translateTemplate("Reported");
|
|
1533
1544
|
let tone = "neutral";
|
|
1534
1545
|
if (result.isOnline === true) {
|
|
1535
|
-
|
|
1546
|
+
verdict = isScripted
|
|
1536
1547
|
? t.translateTemplate("Passed")
|
|
1537
1548
|
: t.translateTemplate("Up");
|
|
1538
1549
|
tone = "good";
|
|
1539
1550
|
}
|
|
1540
1551
|
else if (result.isOnline === false) {
|
|
1541
|
-
|
|
1552
|
+
verdict = isScripted
|
|
1542
1553
|
? t.translateTemplate("Failed")
|
|
1543
1554
|
: t.translateTemplate("Down");
|
|
1544
1555
|
tone = "danger";
|
|
1545
1556
|
}
|
|
1557
|
+
const parts = [verdict];
|
|
1546
1558
|
if (result.responseTimeInMs !== undefined) {
|
|
1547
|
-
|
|
1559
|
+
parts.push((0, Milliseconds_1.formatMilliseconds)(t, result.responseTimeInMs, {
|
|
1560
|
+
maximumFractionDigits: 0,
|
|
1561
|
+
}));
|
|
1548
1562
|
}
|
|
1549
1563
|
if (result.responseCode !== undefined &&
|
|
1550
1564
|
(input.monitorType === MonitorType_1.default.API ||
|
|
1551
1565
|
input.monitorType === MonitorType_1.default.Website)) {
|
|
1552
|
-
|
|
1566
|
+
// A protocol's status code, as the server answered it.
|
|
1567
|
+
parts.push(`HTTP ${result.responseCode}`);
|
|
1553
1568
|
}
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1569
|
+
/*
|
|
1570
|
+
* A failure cause as every monitor summary draws it: the probe's own
|
|
1571
|
+
* timeout sentence in the reader's words and digits, and any other
|
|
1572
|
+
* message - the network's, a server's - as the probe wrote it
|
|
1573
|
+
* (getProbeFailureCauseText). The hero draws a message that reads the
|
|
1574
|
+
* other way from the page in its own direction (readAsWritten). A
|
|
1575
|
+
* cause that is only space names the probe instead.
|
|
1576
|
+
*/
|
|
1577
|
+
const failureCause = result.isOnline === false
|
|
1578
|
+
? (0, ProbeFailureReading_1.getProbeFailureCauseText)({
|
|
1579
|
+
translator: t,
|
|
1580
|
+
failureCause: result.failureCause,
|
|
1581
|
+
})
|
|
1582
|
+
: "";
|
|
1583
|
+
return Object.assign(Object.assign({}, base), { value: (0, Translator_1.formatInline)(parts, t), secondary: failureCause ||
|
|
1584
|
+
t.translateTemplate("from {{probe}}", { probe: result.probeName }), tone: tone });
|
|
1558
1585
|
}
|
|
1559
1586
|
static getProbesFact(input, context) {
|
|
1560
1587
|
const t = context.t;
|
|
@@ -1568,20 +1595,23 @@ class MonitorOverviewPresentationUtil {
|
|
|
1568
1595
|
}
|
|
1569
1596
|
const probes = input.probes;
|
|
1570
1597
|
const downCount = probes.downCount || 0;
|
|
1571
|
-
|
|
1598
|
+
/*
|
|
1599
|
+
* Each part is a phrase of its own, so what stands between them is no
|
|
1600
|
+
* word: " · ", or " • " in a language whose zero is a dot (formatInline).
|
|
1601
|
+
*/
|
|
1572
1602
|
const connectionParts = [];
|
|
1573
1603
|
if (probes.disabledCount > 0) {
|
|
1574
1604
|
connectionParts.push(t.translateTemplate("{{count}} disabled", {
|
|
1575
|
-
count: probes.disabledCount,
|
|
1605
|
+
count: t.formatNumber(probes.disabledCount),
|
|
1576
1606
|
}));
|
|
1577
1607
|
}
|
|
1578
1608
|
if (probes.disconnectedCount > 0) {
|
|
1579
1609
|
connectionParts.push(t.translateTemplate("{{count}} disconnected", {
|
|
1580
|
-
count: probes.disconnectedCount,
|
|
1610
|
+
count: t.formatNumber(probes.disconnectedCount),
|
|
1581
1611
|
}));
|
|
1582
1612
|
}
|
|
1583
1613
|
const joinParts = (parts) => {
|
|
1584
|
-
return parts.length > 0 ?
|
|
1614
|
+
return parts.length > 0 ? (0, Translator_1.formatInline)(parts, t) : undefined;
|
|
1585
1615
|
};
|
|
1586
1616
|
if (probes.enabledCount === 0) {
|
|
1587
1617
|
return Object.assign(Object.assign({}, base), { value: t.translateTemplate("None enabled"), secondary: joinParts(connectionParts), tone: "danger" });
|
|
@@ -1592,7 +1622,7 @@ class MonitorOverviewPresentationUtil {
|
|
|
1592
1622
|
*/
|
|
1593
1623
|
if (context.isPaused) {
|
|
1594
1624
|
return Object.assign(Object.assign({}, base), { value: t.translateTemplate("{{count}} enabled", {
|
|
1595
|
-
count: probes.enabledCount,
|
|
1625
|
+
count: t.formatNumber(probes.enabledCount),
|
|
1596
1626
|
}), secondary: joinParts([
|
|
1597
1627
|
t.translateTemplate("Checks paused"),
|
|
1598
1628
|
...connectionParts,
|
|
@@ -1610,11 +1640,15 @@ class MonitorOverviewPresentationUtil {
|
|
|
1610
1640
|
input.monitorType === MonitorType_1.default.CustomJavaScriptCode;
|
|
1611
1641
|
// A probe that reports Down is reporting, but it is not fine.
|
|
1612
1642
|
const downPart = isScripted
|
|
1613
|
-
? t.translateTemplate("{{count}} failing", {
|
|
1614
|
-
|
|
1643
|
+
? t.translateTemplate("{{count}} failing", {
|
|
1644
|
+
count: t.formatNumber(downCount),
|
|
1645
|
+
})
|
|
1646
|
+
: t.translateTemplate("{{count}} down", {
|
|
1647
|
+
count: t.formatNumber(downCount),
|
|
1648
|
+
});
|
|
1615
1649
|
return Object.assign(Object.assign({}, base), { value: t.translateTemplate("{{reporting}} of {{enabled}} reporting", {
|
|
1616
|
-
reporting: probes.reportingCount,
|
|
1617
|
-
enabled: probes.enabledCount,
|
|
1650
|
+
reporting: t.formatNumber(probes.reportingCount),
|
|
1651
|
+
enabled: t.formatNumber(probes.enabledCount),
|
|
1618
1652
|
}), secondary: joinParts(downCount > 0 ? [downPart, ...connectionParts] : connectionParts), tone: tone });
|
|
1619
1653
|
}
|
|
1620
1654
|
static getPercentFact(data) {
|
|
@@ -335,7 +335,9 @@ class MonitorOverviewProbeUtil {
|
|
|
335
335
|
* after its result is further back than the grace, so a schedule with
|
|
336
336
|
* gaps does not mark every probe late through the gap. `isScheduled`
|
|
337
337
|
* false (monitoring is paused) means no probe is expected to check, so
|
|
338
|
-
* none is late: each keeps the verdict of its last result
|
|
338
|
+
* none is late: each keeps the verdict of its last result, and none has
|
|
339
|
+
* a next check (nextPingAt, nextCheckAt and latestNextCheckAt are left
|
|
340
|
+
* out).
|
|
339
341
|
*/
|
|
340
342
|
static summarizeProbes(data) {
|
|
341
343
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -392,7 +394,16 @@ class MonitorOverviewProbeUtil {
|
|
|
392
394
|
? connectionStatus !== Probe_1.ProbeConnectionStatus.Disconnected
|
|
393
395
|
: null,
|
|
394
396
|
lastPingAt: MonitorCheckScheduleUtil_1.default.parseDate(monitorProbe.lastPingAt),
|
|
395
|
-
|
|
397
|
+
/*
|
|
398
|
+
* A paused monitor has no next check to promise, whatever the row
|
|
399
|
+
* says: the probes' claim sets the rows of a monitor nothing may
|
|
400
|
+
* probe aside, a quarter of an hour at a time
|
|
401
|
+
* (Server/Utils/Probe/ClaimSetAside), so their nextPingAt is when
|
|
402
|
+
* the claim looks at them again, not a check that will happen.
|
|
403
|
+
*/
|
|
404
|
+
nextPingAt: isScheduled
|
|
405
|
+
? MonitorCheckScheduleUtil_1.default.parseDate(monitorProbe.nextPingAt)
|
|
406
|
+
: undefined,
|
|
396
407
|
latestResult: latestResult,
|
|
397
408
|
health: health,
|
|
398
409
|
});
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const FeedMarkdown_1 = __importStar(require("../Markdown/FeedMarkdown"));
|
|
37
37
|
const EvaluationSentence_1 = require("../../Types/Monitor/EvaluationSentence");
|
|
38
38
|
const Translator_1 = require("../../Types/Translator");
|
|
39
|
+
const ProbeFailureReading_1 = require("./ProbeFailureReading");
|
|
39
40
|
/*
|
|
40
41
|
* THE ROOT CAUSE A MONITOR WROTE, IN THE READER'S LANGUAGE (issue #6542).
|
|
41
42
|
*
|
|
@@ -61,6 +62,12 @@ const Translator_1 = require("../../Types/Translator");
|
|
|
61
62
|
* written. A root cause somebody edited reads as they wrote it, but for a
|
|
62
63
|
* line that is still OneUptime's own.
|
|
63
64
|
*
|
|
65
|
+
* Two of the check's values are OneUptime's own words too, and read in the
|
|
66
|
+
* reader's language when the whole value is exactly them: the probe's
|
|
67
|
+
* timeout sentence after **Cause** ("Request was tried 3 times and it
|
|
68
|
+
* timed out.", ProbeFailureReading), and the phase after "- Failed Phase:"
|
|
69
|
+
* (DNS Resolution, TLS Handshake).
|
|
70
|
+
*
|
|
64
71
|
* Line by line, and only a whole line, or a label at a line's start, is
|
|
65
72
|
* ever replaced: nothing else in the text is read as one of OneUptime's.
|
|
66
73
|
* A line that is replaced is written with mdText, as the engine wrote it:
|
|
@@ -129,6 +136,10 @@ const FACT_LABEL_SET = new Set(FACT_LABELS);
|
|
|
129
136
|
// What an All criteria's root cause says before its findings.
|
|
130
137
|
const ALL_FILTERS_MET = (0, Translator_1.translationKey)("All filters met.");
|
|
131
138
|
const FILTER_CONDITIONS_MET = "Filter Conditions Met";
|
|
139
|
+
// "**Cause**: <why the check failed>" - the probe's failure cause.
|
|
140
|
+
const CAUSE = "Cause";
|
|
141
|
+
// "- Failed Phase: <the phase a request broke in>".
|
|
142
|
+
const FAILED_PHASE = "Failed Phase";
|
|
132
143
|
/*
|
|
133
144
|
* "**Label**" or "**Label**: rest" - a label of at most 80 characters with
|
|
134
145
|
* no asterisk or line break in it, so the match is linear in the line.
|
|
@@ -177,6 +188,13 @@ class MonitorRootCauseWording {
|
|
|
177
188
|
const stored = boldLabel[3] || "";
|
|
178
189
|
// What follows the label: as stored, unless this language words it.
|
|
179
190
|
let rest = FeedMarkdown_1.default.asMarkdown(stored);
|
|
191
|
+
// "**Cause**: <the probe's timeout sentence>", worded with its count.
|
|
192
|
+
if (label === CAUSE && stored.startsWith(" ")) {
|
|
193
|
+
const worded = MonitorRootCauseWording.wordProbeTimeout(stored.slice(1), translator);
|
|
194
|
+
if (worded !== null) {
|
|
195
|
+
rest = (0, FeedMarkdown_1.mdText) ` ${worded}`;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
180
198
|
// "**Filter Conditions Met**: <the finding, or All filters met.>"
|
|
181
199
|
if (label === FILTER_CONDITIONS_MET && stored.startsWith(" ")) {
|
|
182
200
|
const said = stored.slice(1);
|
|
@@ -199,10 +217,18 @@ class MonitorRootCauseWording {
|
|
|
199
217
|
if (fact && FACT_LABEL_SET.has(fact[1])) {
|
|
200
218
|
const label = fact[1];
|
|
201
219
|
const stored = fact[2] || "";
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
220
|
+
/*
|
|
221
|
+
* OneUptime's own yes or no, and the phase a request broke in, are
|
|
222
|
+
* worded; any other value is as stored.
|
|
223
|
+
*/
|
|
224
|
+
let value = FeedMarkdown_1.default.asMarkdown(stored);
|
|
225
|
+
if (YES_NO_FACTS.has(label) &&
|
|
226
|
+
(stored === "Yes" || stored === "No")) {
|
|
227
|
+
value = MonitorRootCauseWording.word(stored, translator);
|
|
228
|
+
}
|
|
229
|
+
else if (label === FAILED_PHASE) {
|
|
230
|
+
value = MonitorRootCauseWording.wordFailedPhase(stored, translator);
|
|
231
|
+
}
|
|
206
232
|
return (0, FeedMarkdown_1.mdText) `- ${MonitorRootCauseWording.word(label, translator)}: ${value}`.toString();
|
|
207
233
|
}
|
|
208
234
|
// "- <a finding>", under All filters met.
|
|
@@ -223,6 +249,34 @@ class MonitorRootCauseWording {
|
|
|
223
249
|
static word(text, translator) {
|
|
224
250
|
return translator.translateText(text) || text;
|
|
225
251
|
}
|
|
252
|
+
/*
|
|
253
|
+
* The probe's timeout sentence, as the engine placed it after **Cause**
|
|
254
|
+
* (written with mdText, so compared written the same way), in the
|
|
255
|
+
* reader's language with its count in the reader's digits. Null for any
|
|
256
|
+
* other cause, and when the reader's language does not word it.
|
|
257
|
+
*/
|
|
258
|
+
static wordProbeTimeout(stored, translator) {
|
|
259
|
+
const triedCount = (0, ProbeFailureReading_1.readProbeTimeoutFailureCause)(stored);
|
|
260
|
+
if (triedCount === null ||
|
|
261
|
+
asMarkdownText((0, ProbeFailureReading_1.writeProbeTimeoutFailureCause)(triedCount)).toString() !==
|
|
262
|
+
stored ||
|
|
263
|
+
!translator.hasTranslation(ProbeFailureReading_1.PROBE_TIMEOUT_FAILURE_CAUSE.other)) {
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
return translator.translatePlural(ProbeFailureReading_1.PROBE_TIMEOUT_FAILURE_CAUSE, triedCount);
|
|
267
|
+
}
|
|
268
|
+
/*
|
|
269
|
+
* The phase a request broke in: a phase the probe names, in the reader's
|
|
270
|
+
* word; any other value as stored.
|
|
271
|
+
*/
|
|
272
|
+
static wordFailedPhase(stored, translator) {
|
|
273
|
+
const phase = stored.trim();
|
|
274
|
+
const worded = (0, ProbeFailureReading_1.getRequestFailedPhaseText)({
|
|
275
|
+
translator: translator,
|
|
276
|
+
failedPhase: phase,
|
|
277
|
+
});
|
|
278
|
+
return phase && worded !== phase ? worded : FeedMarkdown_1.default.asMarkdown(stored);
|
|
279
|
+
}
|
|
226
280
|
// Each finding with a sentence its reader's language words.
|
|
227
281
|
static getWordedFindings(data) {
|
|
228
282
|
const worded = [];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Monitor from "../../Models/DatabaseModels/Monitor.mjs";
|
|
2
2
|
import Query from "../../Types/BaseDatabase/Query.mjs";
|
|
3
|
+
import MonitorNotCheckedReason from "../../Types/Monitor/MonitorNotCheckedReason.mjs";
|
|
3
4
|
export declare const MONITORING_OFF_SELECT: {
|
|
4
5
|
disableActiveMonitoring: true;
|
|
5
6
|
};
|
|
@@ -17,4 +18,5 @@ export default class MonitoringOff {
|
|
|
17
18
|
static isOff(monitor: MonitoringOffFlags | null | undefined): boolean;
|
|
18
19
|
static getMonitoredQuery(): Query<Monitor>;
|
|
19
20
|
static isMonitored(monitor: MonitoredFlags | null | undefined): boolean;
|
|
21
|
+
static getNotCheckedReason(monitor: MonitoredFlags | null | undefined): MonitorNotCheckedReason | null;
|
|
20
22
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Monitor from "../../Models/DatabaseModels/Monitor";
|
|
2
2
|
import Query from "../../Types/BaseDatabase/Query";
|
|
3
|
+
import MonitorNotCheckedReason from "../../Types/Monitor/MonitorNotCheckedReason";
|
|
3
4
|
export declare const MONITORING_OFF_SELECT: {
|
|
4
5
|
disableActiveMonitoring: true;
|
|
5
6
|
};
|
|
@@ -17,4 +18,5 @@ export default class MonitoringOff {
|
|
|
17
18
|
static isOff(monitor: MonitoringOffFlags | null | undefined): boolean;
|
|
18
19
|
static getMonitoredQuery(): Query<Monitor>;
|
|
19
20
|
static isMonitored(monitor: MonitoredFlags | null | undefined): boolean;
|
|
21
|
+
static getNotCheckedReason(monitor: MonitoredFlags | null | undefined): MonitorNotCheckedReason | null;
|
|
20
22
|
}
|