@oneuptime/common 12.0.25 → 12.0.27
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/AnalyticsModels/Index.ts +2 -0
- package/Models/AnalyticsModels/ThreatIntelIndicator.ts +413 -0
- package/Models/DatabaseModels/AlertSeverity.ts +4 -1
- package/Models/DatabaseModels/CephClusterFeed.ts +625 -0
- package/Models/DatabaseModels/CloudResourceFeed.ts +625 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.ts +13 -0
- package/Models/DatabaseModels/DetectionRule.ts +9 -3
- package/Models/DatabaseModels/DockerHostFeed.ts +625 -0
- package/Models/DatabaseModels/DockerSwarmClusterFeed.ts +628 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +9 -3
- package/Models/DatabaseModels/HostFeed.ts +625 -0
- package/Models/DatabaseModels/IncidentSeverity.ts +4 -1
- package/Models/DatabaseModels/Index.ts +22 -0
- package/Models/DatabaseModels/KubernetesClusterFeed.ts +628 -0
- package/Models/DatabaseModels/Monitor.ts +87 -0
- package/Models/DatabaseModels/NetworkDevice.ts +96 -5
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +92 -6
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +301 -31
- package/Models/DatabaseModels/NetworkSite.ts +120 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +1 -0
- package/Models/DatabaseModels/PodmanHostFeed.ts +625 -0
- package/Models/DatabaseModels/ProxmoxClusterFeed.ts +626 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +67 -0
- package/Models/DatabaseModels/ServiceFeed.ts +625 -0
- package/Models/DatabaseModels/TelemetrySourceMap.ts +474 -0
- package/Models/DatabaseModels/ThreatIntelFeed.ts +758 -0
- package/Models/DatabaseModels/UserOnCallLog.ts +1 -0
- package/Models/DatabaseModels/UserTotpAuth.ts +1 -0
- package/Models/DatabaseModels/UserWebAuthn.ts +1 -0
- package/Server/API/AlertAPI.ts +23 -1
- package/Server/API/BaseAPI.ts +14 -3
- package/Server/API/IncidentAPI.ts +41 -1
- package/Server/API/IncidentEpisodeAPI.ts +23 -1
- package/Server/API/MicrosoftTeamsAPI.ts +31 -2
- package/Server/API/ScheduledMaintenanceAPI.ts +23 -1
- package/Server/API/SlackAPI.ts +48 -0
- package/Server/API/TelemetryAPI.ts +167 -42
- package/Server/API/UserOnCallLogTimelineAPI.ts +75 -61
- package/Server/API/UserTotpAuthAPI.ts +67 -1
- package/Server/API/UserWebAuthnAPI.ts +44 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.ts +57 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.ts +129 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.ts +54 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.ts +72 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.ts +489 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +18 -0
- package/Server/Middleware/IdentityRateLimit.ts +53 -3
- package/Server/Services/AIService.ts +181 -41
- package/Server/Services/CephClusterFeedService.ts +99 -0
- package/Server/Services/CephClusterLabelRuleEngineService.ts +29 -0
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +23 -0
- package/Server/Services/CephClusterOwnerTeamService.ts +129 -0
- package/Server/Services/CephClusterOwnerUserService.ts +123 -0
- package/Server/Services/CephClusterService.ts +223 -2
- package/Server/Services/CloudResourceFeedService.ts +99 -0
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +30 -0
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +33 -0
- package/Server/Services/CloudResourceOwnerTeamService.ts +129 -0
- package/Server/Services/CloudResourceOwnerUserService.ts +123 -0
- package/Server/Services/CloudResourceService.ts +227 -2
- package/Server/Services/DatabaseService.ts +265 -0
- package/Server/Services/DockerHostFeedService.ts +99 -0
- package/Server/Services/DockerHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/DockerHostOwnerTeamService.ts +129 -0
- package/Server/Services/DockerHostOwnerUserService.ts +123 -0
- package/Server/Services/DockerHostService.ts +227 -2
- package/Server/Services/DockerSwarmClusterFeedService.ts +102 -0
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/DockerSwarmClusterOwnerTeamService.ts +133 -0
- package/Server/Services/DockerSwarmClusterOwnerUserService.ts +127 -0
- package/Server/Services/DockerSwarmClusterService.ts +229 -2
- package/Server/Services/EnterpriseLicenseService.ts +15 -7
- package/Server/Services/ExceptionAggregationService.ts +12 -2
- package/Server/Services/HostFeedService.ts +99 -0
- package/Server/Services/HostLabelRuleEngineService.ts +29 -0
- package/Server/Services/HostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/HostOwnerTeamService.ts +129 -0
- package/Server/Services/HostOwnerUserService.ts +123 -0
- package/Server/Services/HostService.ts +215 -2
- package/Server/Services/IncidentService.ts +11 -0
- package/Server/Services/Index.ts +24 -0
- package/Server/Services/KubernetesClusterFeedService.ts +99 -0
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/KubernetesClusterOwnerTeamService.ts +133 -0
- package/Server/Services/KubernetesClusterOwnerUserService.ts +127 -0
- package/Server/Services/KubernetesClusterService.ts +231 -2
- package/Server/Services/LogAggregationService.ts +23 -280
- package/Server/Services/MetricAggregationService.ts +98 -1
- package/Server/Services/MonitorService.ts +177 -13
- package/Server/Services/MonitorTemplateService.ts +111 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +777 -86
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +199 -16
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +1055 -14
- package/Server/Services/NetworkDeviceService.ts +750 -4
- package/Server/Services/NetworkInterfaceService.ts +415 -0
- package/Server/Services/NetworkSiteService.ts +485 -52
- package/Server/Services/PodmanHostFeedService.ts +99 -0
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/PodmanHostOwnerTeamService.ts +129 -0
- package/Server/Services/PodmanHostOwnerUserService.ts +123 -0
- package/Server/Services/PodmanHostService.ts +227 -2
- package/Server/Services/ProjectService.ts +16 -10
- package/Server/Services/ProxmoxClusterFeedService.ts +99 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/ProxmoxClusterOwnerTeamService.ts +131 -0
- package/Server/Services/ProxmoxClusterOwnerUserService.ts +124 -0
- package/Server/Services/ProxmoxClusterService.ts +225 -2
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +61 -0
- package/Server/Services/ServiceFeedService.ts +99 -0
- package/Server/Services/ServiceLabelRuleEngineService.ts +29 -0
- package/Server/Services/ServiceOwnerRuleEngineService.ts +26 -0
- package/Server/Services/ServiceOwnerTeamService.ts +129 -0
- package/Server/Services/ServiceOwnerUserService.ts +123 -0
- package/Server/Services/ServiceService.ts +227 -3
- package/Server/Services/StatusPageSubscriberService.ts +7 -0
- package/Server/Services/TelemetryAttributeService.ts +13 -3
- package/Server/Services/TelemetrySourceMapService.ts +307 -0
- package/Server/Services/ThreatIntelFeedService.ts +222 -0
- package/Server/Services/ThreatIntelIndicatorService.ts +428 -0
- package/Server/Services/TraceAggregationService.ts +101 -11
- package/Server/Services/UserService.ts +13 -6
- package/Server/Services/UserTwoFactorBackupCodeService.ts +127 -0
- package/Server/Services/UserWebhookService.ts +11 -2
- package/Server/Static/Brand/README.md +38 -0
- package/Server/Static/Brand/favicons/apple-touch-icon.png +0 -0
- package/Server/Static/Brand/favicons/favicon-16x16.png +0 -0
- package/Server/Static/Brand/favicons/favicon-32x32.png +0 -0
- package/Server/Static/Brand/favicons/favicon.ico +0 -0
- package/Server/Static/Brand/favicons/safari-pinned-tab.svg +31 -0
- package/Server/Static/Brand/hou-wb.svg +1 -0
- package/Server/Static/Brand/oneuptime-logo.svg +1 -0
- package/Server/Static/Brand/ou-wb.svg +1 -0
- package/Server/Static/Vendor/README.md +4 -0
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +13 -3
- package/Server/Types/Database/AggregateBy.ts +83 -0
- package/Server/Types/Database/AggregateResultUtil.ts +126 -0
- package/Server/Types/Database/JSONColumnQuery.ts +18 -0
- package/Server/Types/Database/QueryHelper.ts +40 -0
- package/Server/Types/Database/QueryUtil.ts +26 -0
- package/Server/Types/Workflow/Components/API/Utils.ts +10 -1
- package/Server/Types/Workflow/Components/JavaScript.ts +8 -0
- package/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.ts +9 -0
- package/Server/Utils/AI/SRE/InvestigationGrader.ts +18 -0
- package/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.ts +422 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +176 -0
- package/Server/Utils/DataSource/HttpFetch.ts +18 -0
- package/Server/Utils/Database/RelationIdUtil.ts +42 -0
- package/Server/Utils/Marketing/MarketingEventUtil.ts +38 -9
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +34 -3
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +9 -1
- package/Server/Utils/Monitor/Criteria/SyntheticMonitor.ts +28 -10
- package/Server/Utils/Monitor/MonitorAlert.ts +541 -332
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +330 -64
- package/Server/Utils/Monitor/MonitorIncident.ts +640 -434
- package/Server/Utils/Monitor/MonitorResource.ts +226 -49
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +46 -3
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +23 -102
- package/Server/Utils/Monitor/PerEntityCriteriaFanOut.ts +329 -0
- package/Server/Utils/NetworkDevice/DeviceHealthAggregation.ts +427 -0
- package/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.ts +310 -0
- package/Server/Utils/OnCallNotificationContext.ts +686 -0
- package/Server/Utils/PrivateNetworkWebhookConfig.ts +549 -0
- package/Server/Utils/ResourceFeed/ResourceFeedUtil.ts +139 -0
- package/Server/Utils/Response.ts +11 -1
- package/Server/Utils/SSRFProtection.ts +230 -60
- package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +106 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +84 -284
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +47 -20
- package/Server/Utils/SecurityEvent/SecurityEventAlerting.ts +318 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.ts +199 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.ts +252 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +739 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.ts +533 -0
- package/Server/Utils/StartServer.ts +83 -56
- package/Server/Utils/StatusPageSubscriberWebhook.ts +3 -0
- package/Server/Utils/Telemetry/SourceMapResolver.ts +480 -0
- package/Server/Utils/TwoFactorBackupCodeNotification.ts +106 -0
- package/Server/Utils/VM/VMAPI.ts +3 -0
- package/Server/Utils/VM/VMRunner.ts +27 -1
- package/Server/Utils/VendorAssets.ts +42 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +136 -6
- package/Server/Views/AcknowledgeUserOnCallNotification.ejs +11 -9
- package/Server/Views/Partials/Head.ejs +9 -9
- package/Server/Views/Partials/OnCallNotificationDetails.ejs +48 -0
- package/Server/Views/ViewMessage.ejs +11 -9
- package/Tests/App/Accounts/LoginTwoFactorRecovery.test.tsx +972 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +401 -0
- package/Tests/App/Dashboard/DiscoveryScanEditForm.test.tsx +707 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +1908 -18
- package/Tests/App/Dashboard/ResourceFeed.test.tsx +230 -0
- package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +216 -0
- package/Tests/App/Dashboard/TopologyAddToMonitoring.test.tsx +192 -0
- package/Tests/App/Dashboard/WorkspaceNotificationRuleConditions.test.tsx +439 -0
- package/Tests/Models/DatabaseModels/DateColumnDeserialization.test.ts +182 -0
- package/Tests/Models/DatabaseModels/RelationColumnModelTypeCoverage.test.ts +82 -0
- package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +398 -0
- package/Tests/Models/DiscoveryScanNameColumn.test.ts +151 -16
- package/Tests/Models/DiscoveryScanSnmpEnabledColumn.test.ts +593 -0
- package/Tests/Models/NetworkDeviceCreateContract.test.ts +102 -0
- package/Tests/Server/API/AIGenerationProjectAIToggle.test.ts +607 -0
- package/Tests/Server/API/AIGenerationRequestBudget.test.ts +355 -0
- package/Tests/Server/API/AIKillSwitchBackstop.test.ts +602 -0
- package/Tests/Server/API/BaseAPIUpdateDateColumns.test.ts +154 -0
- package/Tests/Server/API/MicrosoftTeamsBotTestEndpoint.test.ts +335 -0
- package/Tests/Server/API/UserOnCallLogTimelineAcknowledgePage.test.ts +611 -0
- package/Tests/Server/API/UserTotpAuthAPI.test.ts +498 -4
- package/Tests/Server/API/UserWebAuthnBackupCodeMinting.test.ts +682 -0
- package/Tests/Server/Infrastructure/ExampleDockerfiles.test.ts +595 -0
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +9 -0
- package/Tests/Server/Services/AIServiceProjectAccess.test.ts +6 -0
- package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +18 -0
- package/Tests/Server/Services/DatabaseServiceAggregateBy.test.ts +590 -0
- package/Tests/Server/Services/DatabaseServiceUpdateWriteRouting.test.ts +12 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +162 -26
- package/Tests/Server/Services/EnterpriseLicenseServiceCreate.test.ts +292 -0
- package/Tests/Server/Services/FeedRetentionConsistency.test.ts +119 -12
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +109 -0
- package/Tests/Server/Services/MetricAggregationAttributeOperators.test.ts +170 -0
- package/Tests/Server/Services/MonitorTemplateServiceNetworkDeviceSync.test.ts +383 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +997 -3
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +830 -0
- package/Tests/Server/Services/NetworkDeviceAutoMonitorLifecycle.test.ts +528 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +3141 -1
- package/Tests/Server/Services/NetworkDeviceRegisteredHostnames.test.ts +1023 -0
- package/Tests/Server/Services/NetworkDeviceSiteAssignmentRuleSkip.test.ts +728 -0
- package/Tests/Server/Services/NetworkInterfaceServiceUpsert.test.ts +795 -0
- package/Tests/Server/Services/NetworkSiteRollupPolicyAndMaintenance.test.ts +903 -0
- package/Tests/Server/Services/NetworkSiteService.test.ts +165 -24
- package/Tests/Server/Services/ProjectServiceChangePlan.test.ts +5 -3
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +5 -2
- package/Tests/Server/Services/ResourceCreationFeedWrites.test.ts +304 -0
- package/Tests/Server/Services/ResourceFeedServices.test.ts +269 -0
- package/Tests/Server/Services/ResourceOwnerFeedWrites.test.ts +245 -0
- package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +792 -0
- package/Tests/Server/Services/TelemetrySourceMapService.test.ts +483 -0
- package/Tests/Server/Services/ThreatIntelFeedService.test.ts +351 -0
- package/Tests/Server/Services/ThreatIntelIndicatorService.test.ts +366 -0
- package/Tests/Server/Services/TraceAggregationAttributeOperators.test.ts +507 -0
- package/Tests/Server/Services/UserTwoFactorBackupCodeGenerateIfNone.test.ts +705 -0
- package/Tests/Server/Services/WorkspaceNotificationRuleOnCallDutyPolicy.test.ts +306 -0
- package/Tests/Server/Types/Database/AggregateResultUtil.test.ts +386 -0
- package/Tests/Server/Types/Database/Permissions/SelectRejectionMessageContract.test.ts +424 -0
- package/Tests/Server/Types/Database/QueryHelperWildcard.test.ts +142 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentPrivateNetwork.test.ts +163 -0
- package/Tests/Server/Types/Workflow/Components/JavaScriptPrivateNetwork.test.ts +124 -0
- package/Tests/Server/Utils/AI/CodeFixAgentCompletion.test.ts +5 -0
- package/Tests/Server/Utils/AI/InvestigationGrader.test.ts +39 -1
- package/Tests/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.test.ts +338 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorWildcard.test.ts +383 -0
- package/Tests/Server/Utils/Marketing/EmittedMarketingEvent.ts +23 -0
- package/Tests/Server/Utils/Marketing/MarketingEventUtil.test.ts +51 -0
- package/Tests/Server/Utils/Monitor/Criteria/SyntheticMonitorCriteria.test.ts +259 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPerSeriesFanout.test.ts +557 -0
- package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +12 -2
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkLogWritePath.test.ts +404 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +8 -2
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +125 -98
- package/Tests/Server/Utils/Monitor/PerEntityCriteriaFanOut.test.ts +444 -0
- package/Tests/Server/Utils/Monitor/PerSeriesSecondEntityAlerting.test.ts +1112 -0
- package/Tests/Server/Utils/NetworkDevice/DeviceHealthAggregation.test.ts +717 -0
- package/Tests/Server/Utils/NetworkDevice/RulePatternValidator.test.ts +78 -0
- package/Tests/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.test.ts +363 -0
- package/Tests/Server/Utils/OfflineAssetHygiene.test.ts +35 -0
- package/Tests/Server/Utils/OnCallNotificationContext.test.ts +908 -0
- package/Tests/Server/Utils/PrivateNetworkWebhookConfig.test.ts +423 -0
- package/Tests/Server/Utils/ResourceFeed/ResourceFeedUtil.test.ts +191 -0
- package/Tests/Server/Utils/SSRFProtectionPrivateNetwork.test.ts +597 -0
- package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +381 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +417 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventAlerting.test.ts +246 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.test.ts +282 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.test.ts +312 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.test.ts +854 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.test.ts +437 -0
- package/Tests/Server/Utils/StartServerErrorStatus.test.ts +225 -0
- package/Tests/Server/Utils/StatusPage/MonitorRulePatternValidator.test.ts +62 -0
- package/Tests/Server/Utils/StatusPageSubscriberWebhookPrivateNetwork.test.ts +119 -0
- package/Tests/Server/Utils/Telemetry/SourceMapResolver.test.ts +542 -0
- package/Tests/Server/Utils/TwoFactorBackupCodeNotification.test.ts +272 -0
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +111 -0
- package/Tests/Server/Utils/VendorAssets.test.ts +117 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelSend.test.ts +101 -4
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsInstallStateDiagnostics.test.ts +922 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsRosterDiagnosticMessages.test.ts +642 -0
- package/Tests/Server/Views/OnCallAcknowledgePage.test.ts +430 -0
- package/Tests/Types/API/HostnameAuthorityParsing.test.ts +1 -0
- package/Tests/Types/API/URLMailtoQueryString.test.ts +439 -0
- package/Tests/Types/API/URLQueryString.test.ts +481 -0
- package/Tests/Types/API/URLRouteQuerySeparation.test.ts +491 -0
- package/Tests/Types/BaseDatabase/Wildcard.test.ts +163 -0
- package/Tests/Types/BaseDatabase/WildcardPattern.test.ts +149 -0
- package/Tests/Types/Database/DateColumnValue.test.ts +265 -0
- package/Tests/Types/DateToIsoStringOrNull.test.ts +67 -0
- package/Tests/Types/Log/LogQueryToFilter.test.ts +218 -43
- package/Tests/Types/Monitor/KubernetesTemplateGroupByKeys.test.ts +225 -0
- package/Tests/Types/Monitor/TemplateGroupByKeys.test.ts +296 -0
- package/Tests/Types/NetworkAutomation/RuleRunResult.test.ts +102 -0
- package/Tests/Types/NetworkAutomation/RuleRunResultDescribe.test.ts +145 -0
- package/Tests/Types/NetworkSite/SiteHealthRollupPolicy.test.ts +58 -0
- package/Tests/Types/SerializableObjectDictionaryImportCycle.test.ts +15 -0
- package/Tests/Types/Telemetry/TelemetrySearchQuery.test.ts +620 -0
- package/Tests/Types/WhatsApp/WhatsAppTemplates.test.ts +110 -0
- package/Tests/Types/Workspace/NotificationRuleConditionUtil.test.ts +76 -6
- package/Tests/Types/Workspace/NotificationRules/NotificationRuleCondition.test.ts +16 -4
- package/Tests/Types/Workspace/NotificationRules/OnCallDutyPolicyConditions.test.ts +669 -0
- package/Tests/UI/Components/DictionaryFilterOperatorWildcard.test.ts +175 -0
- package/Tests/UI/Components/IconOpticalSize.test.tsx +377 -0
- package/Tests/UI/Components/LogsHistogramDragTooltip.test.tsx +393 -0
- package/Tests/UI/Components/LogsViewerHistogramZoom.test.tsx +248 -0
- package/Tests/UI/Components/TelemetryHistogramDragTooltip.test.tsx +205 -0
- package/Tests/UI/Components/UseHistogramZoom.test.tsx +262 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsChatsCardInstallGuidance.test.tsx +332 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsInstallGuidanceContent.test.tsx +643 -0
- package/Tests/Utils/Monitor/InterfaceInventoryUtil.test.ts +824 -0
- package/Tests/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.test.ts +626 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +718 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +59 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +287 -2
- package/Tests/Utils/NetworkDiscovery/DiscoveryImportEligibility.test.ts +73 -0
- package/Tests/Utils/NetworkDiscovery/PingMonitorBuilder.test.ts +317 -0
- package/Tests/Utils/NetworkDiscovery/RescanIntervalUtil.test.ts +262 -0
- package/Tests/Utils/NetworkDiscovery/ScanModeUtil.test.ts +474 -0
- package/Tests/Utils/NetworkDiscovery/SnmpScanConfigUtil.test.ts +2442 -0
- package/Tests/Utils/NetworkSite/SiteMaintenanceUtil.test.ts +188 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +522 -0
- package/Tests/Utils/NetworkSite/SiteUptimeUtil.test.ts +694 -0
- package/Tests/Utils/SecurityEvent/ThreatIntel/StixPatternParser.test.ts +281 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +87 -67
- package/Types/API/URL.ts +100 -28
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +8 -0
- package/Types/BaseDatabase/NotWildcard.ts +86 -0
- package/Types/BaseDatabase/Wildcard.ts +89 -0
- package/Types/BaseDatabase/WildcardPattern.ts +176 -0
- package/Types/Database/DateColumnValue.ts +184 -0
- package/Types/Database/TableColumn.ts +40 -5
- package/Types/Date.ts +37 -0
- package/Types/Email/EmailTemplateType.ts +1 -0
- package/Types/JSON.ts +8 -0
- package/Types/Log/LogQueryToFilter.ts +167 -129
- package/Types/Monitor/DockerAlertTemplates.ts +43 -12
- package/Types/Monitor/HostAlertTemplates.ts +31 -3
- package/Types/Monitor/KubernetesAlertTemplates.ts +98 -0
- package/Types/Monitor/MonitorStep.ts +49 -0
- package/Types/Monitor/PodmanAlertTemplates.ts +39 -12
- package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +14 -0
- package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +11 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +11 -4
- package/Types/NetworkAutomation/RuleRunResult.ts +191 -2
- package/Types/NetworkSite/SiteHealthRollupPolicy.ts +96 -0
- package/Types/Permission.ts +411 -0
- package/Types/Probe/ProbeApiIngestResponse.ts +42 -0
- package/Types/SecurityEvent/ThreatIntelConstants.ts +118 -0
- package/Types/SerializableObjectDictionary.ts +8 -0
- package/Types/Telemetry/SourceMap.ts +56 -0
- package/Types/Telemetry/TelemetrySearchQuery.ts +949 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +12 -1
- package/UI/Components/Charts/Utils/useHistogramZoom.ts +101 -0
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +83 -0
- package/UI/Components/Icon/Icon.tsx +28 -1
- package/UI/Components/LogsViewer/LogsViewer.tsx +19 -3
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +26 -4
- package/UI/Components/LogsViewer/components/LogSearchHelp.tsx +34 -16
- package/UI/Components/LogsViewer/components/LogsHistogram.tsx +52 -1
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +18 -2
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +52 -1
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +15 -2
- package/Utils/Metrics/MetricExplorerUrl.ts +77 -15
- package/Utils/Monitor/InterfaceInventoryUtil.ts +251 -0
- package/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.ts +333 -0
- package/Utils/Monitor/NetworkTopologyUtil.ts +249 -28
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +14 -6
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +2 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +49 -18
- package/Utils/NetworkDiscovery/PingMonitorBuilder.ts +215 -0
- package/Utils/NetworkDiscovery/RescanIntervalUtil.ts +148 -0
- package/Utils/NetworkDiscovery/ScanModeUtil.ts +105 -0
- package/Utils/NetworkDiscovery/SnmpScanConfigUtil.ts +827 -0
- package/Utils/NetworkSite/SiteMaintenanceUtil.ts +110 -0
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +350 -19
- package/Utils/NetworkSite/SiteUptimeUtil.ts +422 -21
- package/Utils/SecurityEvent/ThreatIntel/StixPatternParser.ts +383 -0
- package/Utils/Telemetry/CrossSignalScope.ts +37 -39
- package/build/dist/Models/AnalyticsModels/Index.js +2 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js +325 -0
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +11 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +9 -3
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +9 -3
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
- package/build/dist/Models/DatabaseModels/HostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/HostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +22 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Monitor.js +81 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +103 -7
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +91 -6
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +276 -31
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js +124 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +66 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ServiceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js +496 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +800 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js +1 -0
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js +1 -0
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +18 -1
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +8 -1
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +35 -1
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +18 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +30 -2
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +18 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +45 -0
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +100 -35
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +64 -59
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js +65 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js +42 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js +88 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js +61 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js +179 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +40 -3
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +177 -30
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterFeedService.js +89 -0
- package/build/dist/Server/Services/CephClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +175 -1
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceFeedService.js +89 -0
- package/build/dist/Server/Services/CloudResourceFeedService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +28 -3
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceService.js +177 -1
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +201 -0
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostFeedService.js +89 -0
- package/build/dist/Server/Services/DockerHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +177 -1
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js +90 -0
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +175 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseService.js +40 -30
- package/build/dist/Server/Services/EnterpriseLicenseService.js.map +1 -1
- package/build/dist/Server/Services/ExceptionAggregationService.js +8 -2
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostFeedService.js +89 -0
- package/build/dist/Server/Services/HostFeedService.js.map +1 -0
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/HostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/HostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +175 -1
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +10 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +24 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterFeedService.js +89 -0
- package/build/dist/Server/Services/KubernetesClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +177 -1
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +19 -196
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +59 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +115 -13
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +86 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +561 -67
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +130 -16
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +850 -8
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +594 -5
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkInterfaceService.js +306 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +408 -47
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostFeedService.js +89 -0
- package/build/dist/Server/Services/PodmanHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +177 -1
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +40 -30
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js +89 -0
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +175 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +56 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceFeedService.js +89 -0
- package/build/dist/Server/Services/ServiceFeedService.js.map +1 -0
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +24 -0
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ServiceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ServiceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +173 -2
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +7 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryAttributeService.js +9 -3
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Services/TelemetrySourceMapService.js +265 -0
- package/build/dist/Server/Services/TelemetrySourceMapService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js +157 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js +276 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js.map +1 -0
- package/build/dist/Server/Services/TraceAggregationService.js +62 -6
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +22 -13
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js +120 -0
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js.map +1 -1
- package/build/dist/Server/Services/UserWebhookService.js +11 -2
- package/build/dist/Server/Services/UserWebhookService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +12 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/AggregateBy.js +2 -0
- package/build/dist/Server/Types/Database/AggregateBy.js.map +1 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js +90 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js.map +1 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js +14 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +42 -0
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryUtil.js +18 -0
- package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js +10 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js +8 -0
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js +8 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js +15 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js +266 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +134 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/DataSource/HttpFetch.js +8 -0
- package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
- package/build/dist/Server/Utils/Database/RelationIdUtil.js +31 -0
- package/build/dist/Server/Utils/Database/RelationIdUtil.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js +26 -8
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +42 -17
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +9 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js +15 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +386 -271
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +278 -64
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +469 -350
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +183 -44
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +46 -3
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +18 -91
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js +194 -0
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js.map +1 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js +332 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js.map +1 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js +279 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js.map +1 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js +415 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js.map +1 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js +424 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js.map +1 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js +108 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js.map +1 -0
- package/build/dist/Server/Utils/Response.js +12 -1
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +160 -58
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +89 -0
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +75 -234
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +41 -16
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js +217 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js +103 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js +168 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +527 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js +376 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +70 -44
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js +3 -0
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js +327 -0
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js.map +1 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js +84 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +10 -1
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Server/Utils/VendorAssets.js +29 -0
- package/build/dist/Server/Utils/VendorAssets.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +121 -6
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/API/URL.js +88 -27
- package/build/dist/Types/API/URL.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +8 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/BaseDatabase/NotWildcard.js +72 -0
- package/build/dist/Types/BaseDatabase/NotWildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js +75 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js +137 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js.map +1 -0
- package/build/dist/Types/Database/DateColumnValue.js +125 -0
- package/build/dist/Types/Database/DateColumnValue.js.map +1 -0
- package/build/dist/Types/Database/TableColumn.js +18 -2
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Date.js +31 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +1 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/JSON.js +2 -0
- package/build/dist/Types/JSON.js.map +1 -1
- package/build/dist/Types/Log/LogQueryToFilter.js +111 -108
- package/build/dist/Types/Log/LogQueryToFilter.js.map +1 -1
- package/build/dist/Types/Monitor/DockerAlertTemplates.js +40 -16
- package/build/dist/Types/Monitor/DockerAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/HostAlertTemplates.js +29 -7
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +98 -4
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +40 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +36 -16
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -1
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js +90 -0
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js.map +1 -1
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js +84 -0
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +354 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js +100 -0
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js.map +1 -0
- package/build/dist/Types/SerializableObjectDictionary.js +8 -0
- package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
- package/build/dist/Types/Telemetry/SourceMap.js +9 -0
- package/build/dist/Types/Telemetry/SourceMap.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js +661 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +12 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/useHistogramZoom.js +47 -0
- package/build/dist/UI/Components/Charts/Utils/useHistogramZoom.js.map +1 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +67 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +28 -1
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +15 -3
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js +25 -4
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js +36 -16
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js +33 -5
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +33 -5
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js +54 -9
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -1
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js +128 -0
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js +190 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +206 -28
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +14 -7
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +34 -18
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js +163 -0
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js +99 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js +85 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js +560 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js +56 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +185 -10
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js +248 -21
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js.map +1 -1
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js +255 -0
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +27 -30
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/package.json +2 -1
- package/Tests/Types/Log/LogQueryParser.test.ts +0 -186
- package/Types/Log/LogQueryParser.ts +0 -252
- package/build/dist/Types/Log/LogQueryParser.js +0 -200
- package/build/dist/Types/Log/LogQueryParser.js.map +0 -1
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
import { describe, expect, test } from "@jest/globals";
|
|
2
|
+
import {
|
|
3
|
+
DEVICE_COUNT_AGGREGATE,
|
|
4
|
+
DEVICE_HEALTH_AGGREGATES,
|
|
5
|
+
DEVICE_HEALTH_GROUP_COLUMNS,
|
|
6
|
+
DEVICE_HEALTH_GROUP_COLUMNS_BY_SITE,
|
|
7
|
+
DEVICE_HEALTH_NOW_PARAMETER,
|
|
8
|
+
DeviceHealthGroup,
|
|
9
|
+
DeviceHealthGroupAlias,
|
|
10
|
+
INTERFACES_DOWN_AGGREGATE,
|
|
11
|
+
deviceHealthInputForGroup,
|
|
12
|
+
deviceRollupStateForGroup,
|
|
13
|
+
parseDeviceHealthGroup,
|
|
14
|
+
} from "../../../../Server/Utils/NetworkDevice/DeviceHealthAggregation";
|
|
15
|
+
import {
|
|
16
|
+
AggregateColumn,
|
|
17
|
+
AggregateRow,
|
|
18
|
+
} from "../../../../Server/Types/Database/AggregateBy";
|
|
19
|
+
import {
|
|
20
|
+
DeviceHealthStateInput,
|
|
21
|
+
NetworkDeviceHealthState,
|
|
22
|
+
deviceHealthState,
|
|
23
|
+
} from "../../../../Utils/NetworkDevice/DeviceHealthStateUtil";
|
|
24
|
+
import DeviceReachabilityUtil, {
|
|
25
|
+
DEFAULT_DEVICE_POLLING_INTERVAL_IN_MINUTES,
|
|
26
|
+
DEVICE_MIN_STALE_WINDOW_IN_MINUTES,
|
|
27
|
+
DEVICE_MISSED_POLL_ALLOWANCE,
|
|
28
|
+
} from "../../../../Utils/NetworkDevice/DeviceReachabilityUtil";
|
|
29
|
+
import SiteStatusRollupUtil, {
|
|
30
|
+
DeviceHealthState,
|
|
31
|
+
} from "../../../../Utils/NetworkSite/SiteStatusRollupUtil";
|
|
32
|
+
import OneUptimeDate from "../../../../Types/Date";
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
* The claim this whole module rests on: grouping devices by the facts the
|
|
36
|
+
* classifier reads, and then classifying the GROUPS, produces exactly the
|
|
37
|
+
* verdicts classifying every device individually would have produced.
|
|
38
|
+
*
|
|
39
|
+
* If that is not true the rollups are wrong in a way nothing on screen would
|
|
40
|
+
* reveal — a site card would print a number, and it would simply be a
|
|
41
|
+
* different number from the one the device list under it adds up to. So it is
|
|
42
|
+
* proved here exhaustively rather than sampled.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
const NOW: Date = OneUptimeDate.fromString("2026-08-27T12:00:00.000Z");
|
|
46
|
+
|
|
47
|
+
/** A device row as it exists in Postgres, before any grouping. */
|
|
48
|
+
interface DeviceRow {
|
|
49
|
+
monitorStatusIsOffline: boolean | undefined;
|
|
50
|
+
isReachable: boolean | null;
|
|
51
|
+
lastPolledAt: Date | null;
|
|
52
|
+
lastSeenAt: Date | null;
|
|
53
|
+
pollingIntervalInMinutes: number | null;
|
|
54
|
+
interfacesDown: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* What the SQL grouping computes, restated in TypeScript so a device row can
|
|
59
|
+
* be turned into the bucket it would land in.
|
|
60
|
+
*
|
|
61
|
+
* This is the ONE thing that exists twice — the predicate is evaluated by
|
|
62
|
+
* Postgres in production and here in the test — so it is written against the
|
|
63
|
+
* shared util rather than against a hard-coded window, and a separate test
|
|
64
|
+
* below pins the SQL to the same three constants.
|
|
65
|
+
*
|
|
66
|
+
* `guardStaleness` mirrors the CASE the SQL wraps the staleness predicate in:
|
|
67
|
+
* it is only computed for the one branch of the reachability rule that can
|
|
68
|
+
* read it. Being able to build a bucket both ways is what lets the test below
|
|
69
|
+
* prove that guard changes no verdict.
|
|
70
|
+
*/
|
|
71
|
+
function bucketFor(
|
|
72
|
+
device: DeviceRow,
|
|
73
|
+
now: Date,
|
|
74
|
+
guardStaleness: boolean = true,
|
|
75
|
+
): DeviceHealthGroup {
|
|
76
|
+
const contactTimes: Array<number> = [device.lastPolledAt, device.lastSeenAt]
|
|
77
|
+
.filter((value: Date | null): value is Date => {
|
|
78
|
+
return value !== null;
|
|
79
|
+
})
|
|
80
|
+
.map((value: Date): number => {
|
|
81
|
+
return value.getTime();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const lastContactAt: number | null =
|
|
85
|
+
contactTimes.length > 0 ? Math.max(...contactTimes) : null;
|
|
86
|
+
|
|
87
|
+
const staleWindowInMinutes: number =
|
|
88
|
+
DeviceReachabilityUtil.getStaleWindowInMinutes(
|
|
89
|
+
device.pollingIntervalInMinutes,
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
siteId: null,
|
|
94
|
+
// The bucket key stands for the status; the flag is passed alongside it.
|
|
95
|
+
monitorStatusId:
|
|
96
|
+
device.monitorStatusIsOffline === undefined ? null : "status-id",
|
|
97
|
+
monitoringMethod: null,
|
|
98
|
+
isReachable: device.isReachable,
|
|
99
|
+
hasBeenPolled: device.lastPolledAt !== null,
|
|
100
|
+
hasBeenSeen: device.lastSeenAt !== null,
|
|
101
|
+
isStale:
|
|
102
|
+
(!guardStaleness ||
|
|
103
|
+
(device.isReachable === null && device.lastSeenAt !== null)) &&
|
|
104
|
+
lastContactAt !== null &&
|
|
105
|
+
lastContactAt < now.getTime() - staleWindowInMinutes * 60 * 1000,
|
|
106
|
+
hasDownInterfaces: device.interfacesDown > 0,
|
|
107
|
+
deviceCount: 1,
|
|
108
|
+
interfacesDownTotal: device.interfacesDown,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function toClassifierInput(device: DeviceRow): DeviceHealthStateInput {
|
|
113
|
+
return {
|
|
114
|
+
monitorStatusIsOffline: device.monitorStatusIsOffline,
|
|
115
|
+
isReachable: device.isReachable,
|
|
116
|
+
lastPolledAt: device.lastPolledAt,
|
|
117
|
+
lastSeenAt: device.lastSeenAt,
|
|
118
|
+
pollingIntervalInMinutes: device.pollingIntervalInMinutes,
|
|
119
|
+
interfacesDown: device.interfacesDown,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/*
|
|
124
|
+
* Every device row the classifier can tell apart, built from the cross
|
|
125
|
+
* product of what it reads.
|
|
126
|
+
*
|
|
127
|
+
* The timestamps deliberately include a fresh one, a stale one and a value
|
|
128
|
+
* either side of a NON-default polling interval — that last pair is what
|
|
129
|
+
* catches a staleness rule that quietly uses a fixed window instead of each
|
|
130
|
+
* device's own.
|
|
131
|
+
*/
|
|
132
|
+
function everyDistinguishableDevice(): Array<DeviceRow> {
|
|
133
|
+
const rows: Array<DeviceRow> = [];
|
|
134
|
+
|
|
135
|
+
const monitorStates: Array<boolean | undefined> = [undefined, true, false];
|
|
136
|
+
const reachableStates: Array<boolean | null> = [null, true, false];
|
|
137
|
+
const intervals: Array<number | null> = [null, 5, 240];
|
|
138
|
+
const interfaceCounts: Array<number> = [0, 3];
|
|
139
|
+
|
|
140
|
+
// Well inside every window this suite can produce, and well outside them.
|
|
141
|
+
const fresh: Date = OneUptimeDate.addRemoveMinutes(NOW, -1);
|
|
142
|
+
const veryStale: Date = OneUptimeDate.addRemoveMinutes(NOW, -60 * 24 * 30);
|
|
143
|
+
/*
|
|
144
|
+
* Stale for a 5-minute device (window 60 min) and fresh for a 240-minute
|
|
145
|
+
* one (window 2,400 min). Nothing else in this matrix separates the two.
|
|
146
|
+
*/
|
|
147
|
+
const between: Date = OneUptimeDate.addRemoveMinutes(NOW, -600);
|
|
148
|
+
|
|
149
|
+
const timestamps: Array<Date | null> = [null, fresh, between, veryStale];
|
|
150
|
+
|
|
151
|
+
for (const monitorStatusIsOffline of monitorStates) {
|
|
152
|
+
for (const isReachable of reachableStates) {
|
|
153
|
+
for (const lastPolledAt of timestamps) {
|
|
154
|
+
for (const lastSeenAt of timestamps) {
|
|
155
|
+
for (const pollingIntervalInMinutes of intervals) {
|
|
156
|
+
for (const interfacesDown of interfaceCounts) {
|
|
157
|
+
rows.push({
|
|
158
|
+
monitorStatusIsOffline: monitorStatusIsOffline,
|
|
159
|
+
isReachable: isReachable,
|
|
160
|
+
lastPolledAt: lastPolledAt,
|
|
161
|
+
lastSeenAt: lastSeenAt,
|
|
162
|
+
pollingIntervalInMinutes: pollingIntervalInMinutes,
|
|
163
|
+
interfacesDown: interfacesDown,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return rows;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
describe("bucketing a device loses nothing the classifier reads", () => {
|
|
176
|
+
const devices: Array<DeviceRow> = everyDistinguishableDevice();
|
|
177
|
+
|
|
178
|
+
test("the matrix is big enough to be worth calling exhaustive", () => {
|
|
179
|
+
// 3 monitor states x 3 reachability x 4 x 4 timestamps x 3 intervals x 2.
|
|
180
|
+
expect(devices).toHaveLength(3 * 3 * 4 * 4 * 3 * 2);
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
test("every device classifies the same through its bucket as directly", () => {
|
|
184
|
+
const disagreements: Array<string> = [];
|
|
185
|
+
|
|
186
|
+
for (const device of devices) {
|
|
187
|
+
const direct: NetworkDeviceHealthState = deviceHealthState(
|
|
188
|
+
toClassifierInput(device),
|
|
189
|
+
NOW,
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
const viaBucket: NetworkDeviceHealthState = deviceHealthState(
|
|
193
|
+
deviceHealthInputForGroup({
|
|
194
|
+
group: bucketFor(device, NOW),
|
|
195
|
+
monitorStatusIsOffline: device.monitorStatusIsOffline,
|
|
196
|
+
now: NOW,
|
|
197
|
+
}),
|
|
198
|
+
NOW,
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
if (direct !== viaBucket) {
|
|
202
|
+
disagreements.push(
|
|
203
|
+
`${JSON.stringify(device)}: direct=${direct} bucket=${viaBucket}`,
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
expect(disagreements).toEqual([]);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
/*
|
|
212
|
+
* The assertion above would also pass if the classifier answered the same
|
|
213
|
+
* thing for everything. It does not — this is what proves the matrix is
|
|
214
|
+
* actually exercising the rule.
|
|
215
|
+
*/
|
|
216
|
+
test("the matrix reaches all four verdicts", () => {
|
|
217
|
+
const seen: Set<NetworkDeviceHealthState> =
|
|
218
|
+
new Set<NetworkDeviceHealthState>();
|
|
219
|
+
|
|
220
|
+
for (const device of devices) {
|
|
221
|
+
seen.add(deviceHealthState(toClassifierInput(device), NOW));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
expect(Array.from(seen).sort()).toEqual([
|
|
225
|
+
"degraded",
|
|
226
|
+
"down",
|
|
227
|
+
"healthy",
|
|
228
|
+
"unknown",
|
|
229
|
+
]);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
/*
|
|
233
|
+
* The SQL only computes staleness for the branch of the reachability rule
|
|
234
|
+
* that can read it (`isReachable IS NULL AND lastSeenAt IS NOT NULL`), so
|
|
235
|
+
* that the interval arithmetic is skipped for the rest of the fleet and the
|
|
236
|
+
* buckets do not split on a fact nothing consults.
|
|
237
|
+
*
|
|
238
|
+
* That is only safe if it changes no verdict. Proved here rather than
|
|
239
|
+
* argued: every device is classified through a bucket built with the guard
|
|
240
|
+
* and through one built without it, and the two must agree.
|
|
241
|
+
*/
|
|
242
|
+
test("guarding the staleness predicate changes no verdict", () => {
|
|
243
|
+
const disagreements: Array<string> = [];
|
|
244
|
+
|
|
245
|
+
for (const device of devices) {
|
|
246
|
+
const guarded: NetworkDeviceHealthState = deviceHealthState(
|
|
247
|
+
deviceHealthInputForGroup({
|
|
248
|
+
group: bucketFor(device, NOW, true),
|
|
249
|
+
monitorStatusIsOffline: device.monitorStatusIsOffline,
|
|
250
|
+
now: NOW,
|
|
251
|
+
}),
|
|
252
|
+
NOW,
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
const unguarded: NetworkDeviceHealthState = deviceHealthState(
|
|
256
|
+
deviceHealthInputForGroup({
|
|
257
|
+
group: bucketFor(device, NOW, false),
|
|
258
|
+
monitorStatusIsOffline: device.monitorStatusIsOffline,
|
|
259
|
+
now: NOW,
|
|
260
|
+
}),
|
|
261
|
+
NOW,
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
if (guarded !== unguarded) {
|
|
265
|
+
disagreements.push(
|
|
266
|
+
`${JSON.stringify(device)}: guarded=${guarded} unguarded=${unguarded}`,
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
expect(disagreements).toEqual([]);
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
/*
|
|
275
|
+
* ...and the guard is not vacuous: the matrix has to contain rows the two
|
|
276
|
+
* forms actually disagree about, or the test above proves nothing.
|
|
277
|
+
*/
|
|
278
|
+
test("the guard really does suppress staleness for some rows", () => {
|
|
279
|
+
const suppressed: Array<DeviceRow> = devices.filter(
|
|
280
|
+
(device: DeviceRow): boolean => {
|
|
281
|
+
return (
|
|
282
|
+
bucketFor(device, NOW, false).isStale &&
|
|
283
|
+
!bucketFor(device, NOW, true).isStale
|
|
284
|
+
);
|
|
285
|
+
},
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
expect(suppressed.length).toBeGreaterThan(0);
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
/*
|
|
292
|
+
* The site rollup reads the same buckets through a different rule, and it
|
|
293
|
+
* has to survive the round trip too — a rollup that disagreed with the
|
|
294
|
+
* device counts under it would colour a site by devices it does not have.
|
|
295
|
+
*/
|
|
296
|
+
test("the site rollup rule survives the round trip as well", () => {
|
|
297
|
+
const operational: { monitorStatusId: string; priority: number } = {
|
|
298
|
+
monitorStatusId: "operational",
|
|
299
|
+
priority: 1,
|
|
300
|
+
};
|
|
301
|
+
const offline: { monitorStatusId: string; priority: number } = {
|
|
302
|
+
monitorStatusId: "offline",
|
|
303
|
+
priority: 3,
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
const disagreements: Array<string> = [];
|
|
307
|
+
|
|
308
|
+
for (const device of devices) {
|
|
309
|
+
// Only the unstamped path: a stamped status is carried verbatim.
|
|
310
|
+
if (device.monitorStatusIsOffline !== undefined) {
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const directState: DeviceHealthState = {
|
|
315
|
+
isReachable: device.isReachable,
|
|
316
|
+
lastPolledAt: device.lastPolledAt,
|
|
317
|
+
lastSeenAt: device.lastSeenAt,
|
|
318
|
+
pollingIntervalInMinutes: device.pollingIntervalInMinutes,
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
const direct: string | null = SiteStatusRollupUtil.worstStatus({
|
|
322
|
+
deviceStates: [directState],
|
|
323
|
+
operationalStatus: operational,
|
|
324
|
+
offlineStatus: offline,
|
|
325
|
+
now: NOW,
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
const viaBucket: string | null = SiteStatusRollupUtil.worstStatus({
|
|
329
|
+
deviceStates: [
|
|
330
|
+
deviceRollupStateForGroup({
|
|
331
|
+
group: bucketFor(device, NOW),
|
|
332
|
+
now: NOW,
|
|
333
|
+
}),
|
|
334
|
+
],
|
|
335
|
+
operationalStatus: operational,
|
|
336
|
+
offlineStatus: offline,
|
|
337
|
+
now: NOW,
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
if (direct !== viaBucket) {
|
|
341
|
+
disagreements.push(
|
|
342
|
+
`${JSON.stringify(device)}: direct=${direct} bucket=${viaBucket}`,
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
expect(disagreements).toEqual([]);
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
/*
|
|
351
|
+
* A bucket carries "is it stale", not "when was it last seen" — so the
|
|
352
|
+
* synthetic timestamps have to land on the right side of the DEFAULT
|
|
353
|
+
* window, which is the one the classifier will re-derive from them. A
|
|
354
|
+
* sentinel that was only just outside it would work today and break the
|
|
355
|
+
* moment the allowance is tuned.
|
|
356
|
+
*/
|
|
357
|
+
test("the synthetic stale timestamp is far outside the default window", () => {
|
|
358
|
+
const staleInput: DeviceHealthStateInput = deviceHealthInputForGroup({
|
|
359
|
+
group: {
|
|
360
|
+
siteId: null,
|
|
361
|
+
monitorStatusId: null,
|
|
362
|
+
monitoringMethod: null,
|
|
363
|
+
isReachable: null,
|
|
364
|
+
hasBeenPolled: true,
|
|
365
|
+
hasBeenSeen: true,
|
|
366
|
+
isStale: true,
|
|
367
|
+
hasDownInterfaces: false,
|
|
368
|
+
deviceCount: 1,
|
|
369
|
+
interfacesDownTotal: 0,
|
|
370
|
+
},
|
|
371
|
+
now: NOW,
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
const defaultWindowInMinutes: number =
|
|
375
|
+
DeviceReachabilityUtil.getStaleWindowInMinutes(undefined);
|
|
376
|
+
|
|
377
|
+
const ageInMinutes: number =
|
|
378
|
+
(NOW.getTime() - new Date(staleInput.lastSeenAt as Date).getTime()) /
|
|
379
|
+
60000;
|
|
380
|
+
|
|
381
|
+
expect(ageInMinutes).toBeGreaterThan(defaultWindowInMinutes * 100);
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
test("a fresh bucket is judged fresh, not merely recent", () => {
|
|
385
|
+
const freshInput: DeviceHealthStateInput = deviceHealthInputForGroup({
|
|
386
|
+
group: {
|
|
387
|
+
siteId: null,
|
|
388
|
+
monitorStatusId: null,
|
|
389
|
+
monitoringMethod: null,
|
|
390
|
+
isReachable: null,
|
|
391
|
+
hasBeenPolled: true,
|
|
392
|
+
hasBeenSeen: true,
|
|
393
|
+
isStale: false,
|
|
394
|
+
hasDownInterfaces: false,
|
|
395
|
+
deviceCount: 1,
|
|
396
|
+
interfacesDownTotal: 0,
|
|
397
|
+
},
|
|
398
|
+
now: NOW,
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
expect(deviceHealthState(freshInput, NOW)).toBe("healthy");
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
/*
|
|
405
|
+
* A bucket says whether there are dark ports, not how many — the classifier
|
|
406
|
+
* only asks "> 0". Reconstructing a count of 1 is what makes that true, and
|
|
407
|
+
* a reconstruction that passed 0 would silently turn every degraded device
|
|
408
|
+
* healthy.
|
|
409
|
+
*/
|
|
410
|
+
test("a bucket with dark ports reconstructs as degraded", () => {
|
|
411
|
+
expect(
|
|
412
|
+
deviceHealthState(
|
|
413
|
+
deviceHealthInputForGroup({
|
|
414
|
+
group: {
|
|
415
|
+
siteId: null,
|
|
416
|
+
monitorStatusId: null,
|
|
417
|
+
monitoringMethod: null,
|
|
418
|
+
isReachable: true,
|
|
419
|
+
hasBeenPolled: true,
|
|
420
|
+
hasBeenSeen: true,
|
|
421
|
+
isStale: false,
|
|
422
|
+
hasDownInterfaces: true,
|
|
423
|
+
deviceCount: 40,
|
|
424
|
+
interfacesDownTotal: 91,
|
|
425
|
+
},
|
|
426
|
+
now: NOW,
|
|
427
|
+
}),
|
|
428
|
+
NOW,
|
|
429
|
+
),
|
|
430
|
+
).toBe("degraded");
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
/*
|
|
434
|
+
* `deviceHealthState` must not start reading the monitoring method: it does
|
|
435
|
+
* not today, and a bucket that carried it into the input would change every
|
|
436
|
+
* monitor-backed device's verdict on the site cards without touching a
|
|
437
|
+
* single line of the classifier.
|
|
438
|
+
*/
|
|
439
|
+
test("carrying the monitoring method does not change the health verdict", () => {
|
|
440
|
+
const base: DeviceHealthGroup = {
|
|
441
|
+
siteId: null,
|
|
442
|
+
monitorStatusId: null,
|
|
443
|
+
monitoringMethod: null,
|
|
444
|
+
isReachable: true,
|
|
445
|
+
hasBeenPolled: true,
|
|
446
|
+
hasBeenSeen: true,
|
|
447
|
+
isStale: false,
|
|
448
|
+
hasDownInterfaces: false,
|
|
449
|
+
deviceCount: 1,
|
|
450
|
+
interfacesDownTotal: 0,
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
const withMethod: DeviceHealthGroup = {
|
|
454
|
+
...base,
|
|
455
|
+
monitoringMethod: "Monitor",
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
expect(
|
|
459
|
+
deviceHealthState(
|
|
460
|
+
deviceHealthInputForGroup({ group: withMethod, now: NOW }),
|
|
461
|
+
NOW,
|
|
462
|
+
),
|
|
463
|
+
).toBe(
|
|
464
|
+
deviceHealthState(
|
|
465
|
+
deviceHealthInputForGroup({ group: base, now: NOW }),
|
|
466
|
+
NOW,
|
|
467
|
+
),
|
|
468
|
+
);
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
describe("the SQL the buckets are built from", () => {
|
|
473
|
+
function expressionFor(
|
|
474
|
+
alias: string,
|
|
475
|
+
columns: Array<AggregateColumn>,
|
|
476
|
+
): string {
|
|
477
|
+
const column: AggregateColumn | undefined = columns.find(
|
|
478
|
+
(candidate: AggregateColumn): boolean => {
|
|
479
|
+
return candidate.alias === alias;
|
|
480
|
+
},
|
|
481
|
+
);
|
|
482
|
+
|
|
483
|
+
if (!column) {
|
|
484
|
+
throw new Error(`No aggregate column aliased "${alias}"`);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return column.expression;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
const staleExpression: string = expressionFor(
|
|
491
|
+
DeviceHealthGroupAlias.IsStale,
|
|
492
|
+
DEVICE_HEALTH_GROUP_COLUMNS,
|
|
493
|
+
);
|
|
494
|
+
|
|
495
|
+
/*
|
|
496
|
+
* The staleness window is the one rule that IS evaluated in SQL rather than
|
|
497
|
+
* by the shared util, so the numbers in it have to come from the util's own
|
|
498
|
+
* constants. Interpolated, they cannot drift; hard-coded, the database and
|
|
499
|
+
* the pill would disagree about the same device the day either moves.
|
|
500
|
+
*/
|
|
501
|
+
test("the stale window is built from the shared constants, not literals", () => {
|
|
502
|
+
expect(staleExpression).toContain(
|
|
503
|
+
`${DEFAULT_DEVICE_POLLING_INTERVAL_IN_MINUTES}`,
|
|
504
|
+
);
|
|
505
|
+
expect(staleExpression).toContain(`* ${DEVICE_MISSED_POLL_ALLOWANCE}`);
|
|
506
|
+
expect(staleExpression).toContain(`${DEVICE_MIN_STALE_WINDOW_IN_MINUTES}`);
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
/*
|
|
510
|
+
* GREATEST over both timestamps, because `newerOf` in the shared util does
|
|
511
|
+
* the same: lastPolledAt alone is wrong for rows written before that column
|
|
512
|
+
* existed, and lastSeenAt alone calls a device that is being polled and
|
|
513
|
+
* failing "out of contact" when it is very much in contact.
|
|
514
|
+
*/
|
|
515
|
+
test("staleness measures the newer of the two contact timestamps", () => {
|
|
516
|
+
expect(staleExpression).toContain(
|
|
517
|
+
`GREATEST("NetworkDevice"."lastPolledAt", "NetworkDevice"."lastSeenAt")`,
|
|
518
|
+
);
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
/*
|
|
522
|
+
* "Now" is bound rather than taken from the database clock, so every bucket
|
|
523
|
+
* on a response — and the classifier that reads them — is measured against
|
|
524
|
+
* one instant.
|
|
525
|
+
*/
|
|
526
|
+
/*
|
|
527
|
+
* The guard itself. Without it every row in the fleet pays a GREATEST() and
|
|
528
|
+
* a make_interval(), and — worse — buckets split on a staleness flag that,
|
|
529
|
+
* for all but the legacy rows, no classifier will ever read.
|
|
530
|
+
*/
|
|
531
|
+
test("staleness is only computed for the branch that can read it", () => {
|
|
532
|
+
expect(staleExpression).toContain(
|
|
533
|
+
`CASE WHEN "NetworkDevice"."isReachable" IS NULL`,
|
|
534
|
+
);
|
|
535
|
+
expect(staleExpression).toContain(
|
|
536
|
+
`"NetworkDevice"."lastSeenAt" IS NOT NULL`,
|
|
537
|
+
);
|
|
538
|
+
expect(staleExpression).toContain("ELSE false END");
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
/*
|
|
542
|
+
* No `make_interval`, and that is a correctness rule rather than a style one.
|
|
543
|
+
*
|
|
544
|
+
* Its `mins` parameter is an `int`, and `pollingIntervalInMinutes` is an
|
|
545
|
+
* unbounded `integer` column with no CHECK behind it — so an interval above
|
|
546
|
+
* 214,748,364 overflows on the allowance multiply and Postgres ABORTS THE
|
|
547
|
+
* STATEMENT. One absurd row would 500 the overview, the hierarchy
|
|
548
|
+
* drill-down and every site rollup in the project. The TypeScript twin is a
|
|
549
|
+
* double with no such ceiling, so it was a divergence, not a shared limit.
|
|
550
|
+
*
|
|
551
|
+
* The subtraction form has no ceiling either, which is why it is the one
|
|
552
|
+
* used — and why an edit back to `make_interval` has to fail here.
|
|
553
|
+
*/
|
|
554
|
+
test("the window is compared by subtraction, not by building an interval", () => {
|
|
555
|
+
expect(staleExpression).not.toContain("make_interval");
|
|
556
|
+
expect(staleExpression).toContain("EXTRACT(");
|
|
557
|
+
// The cast is what keeps the allowance multiply out of int4.
|
|
558
|
+
expect(staleExpression).toContain("::numeric");
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
test('"now" is a bound parameter, not NOW()', () => {
|
|
562
|
+
expect(staleExpression).toContain(`:${DEVICE_HEALTH_NOW_PARAMETER}`);
|
|
563
|
+
expect(staleExpression).not.toContain("NOW()");
|
|
564
|
+
expect(staleExpression).not.toContain("CURRENT_TIMESTAMP");
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
/*
|
|
568
|
+
* Every fact the classifier reads has to be a group key. One missing and
|
|
569
|
+
* devices that classify differently share a bucket, so one of them gets the
|
|
570
|
+
* other's verdict — with no error anywhere.
|
|
571
|
+
*/
|
|
572
|
+
test("the group keys cover every input the classifiers read", () => {
|
|
573
|
+
const aliases: Array<string> = DEVICE_HEALTH_GROUP_COLUMNS.map(
|
|
574
|
+
(column: AggregateColumn): string => {
|
|
575
|
+
return column.alias;
|
|
576
|
+
},
|
|
577
|
+
);
|
|
578
|
+
|
|
579
|
+
expect(aliases.sort()).toEqual(
|
|
580
|
+
[
|
|
581
|
+
DeviceHealthGroupAlias.MonitorStatusId,
|
|
582
|
+
DeviceHealthGroupAlias.MonitoringMethod,
|
|
583
|
+
DeviceHealthGroupAlias.IsReachable,
|
|
584
|
+
DeviceHealthGroupAlias.HasBeenPolled,
|
|
585
|
+
DeviceHealthGroupAlias.HasBeenSeen,
|
|
586
|
+
DeviceHealthGroupAlias.IsStale,
|
|
587
|
+
DeviceHealthGroupAlias.HasDownInterfaces,
|
|
588
|
+
].sort(),
|
|
589
|
+
);
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
test("the per-site grouping adds the site and changes nothing else", () => {
|
|
593
|
+
expect(DEVICE_HEALTH_GROUP_COLUMNS_BY_SITE).toHaveLength(
|
|
594
|
+
DEVICE_HEALTH_GROUP_COLUMNS.length + 1,
|
|
595
|
+
);
|
|
596
|
+
expect(DEVICE_HEALTH_GROUP_COLUMNS_BY_SITE[0]?.alias).toBe(
|
|
597
|
+
DeviceHealthGroupAlias.SiteId,
|
|
598
|
+
);
|
|
599
|
+
expect(DEVICE_HEALTH_GROUP_COLUMNS_BY_SITE.slice(1)).toEqual(
|
|
600
|
+
DEVICE_HEALTH_GROUP_COLUMNS,
|
|
601
|
+
);
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
/*
|
|
605
|
+
* Interfaces are SUMmed, not counted. A switch with three dark ports has to
|
|
606
|
+
* contribute three, or the fleet's "interfaces down" figure silently becomes
|
|
607
|
+
* "devices with an interface down" — a smaller number that looks just as
|
|
608
|
+
* plausible.
|
|
609
|
+
*/
|
|
610
|
+
test("dark ports are summed, and the bucket count is a count", () => {
|
|
611
|
+
expect(INTERFACES_DOWN_AGGREGATE.expression).toContain(
|
|
612
|
+
`SUM("NetworkDevice"."interfacesDown")`,
|
|
613
|
+
);
|
|
614
|
+
// SUM over no rows is NULL in SQL; the tile must print 0.
|
|
615
|
+
expect(INTERFACES_DOWN_AGGREGATE.expression).toContain("COALESCE");
|
|
616
|
+
expect(DEVICE_COUNT_AGGREGATE.expression).toBe("COUNT(*)");
|
|
617
|
+
expect(DEVICE_HEALTH_AGGREGATES).toEqual([
|
|
618
|
+
DEVICE_COUNT_AGGREGATE,
|
|
619
|
+
INTERFACES_DOWN_AGGREGATE,
|
|
620
|
+
]);
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
/*
|
|
624
|
+
* Grouping by the raw `interfacesDown` value would produce a bucket per
|
|
625
|
+
* distinct port count — close to one per device on a real fleet, which is
|
|
626
|
+
* the whole cost this exists to remove.
|
|
627
|
+
*/
|
|
628
|
+
test("interface counts are grouped as a boolean, not by value", () => {
|
|
629
|
+
expect(
|
|
630
|
+
expressionFor(
|
|
631
|
+
DeviceHealthGroupAlias.HasDownInterfaces,
|
|
632
|
+
DEVICE_HEALTH_GROUP_COLUMNS,
|
|
633
|
+
),
|
|
634
|
+
).toContain("> 0");
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
test("every column is qualified with the model alias", () => {
|
|
638
|
+
for (const column of [
|
|
639
|
+
...DEVICE_HEALTH_GROUP_COLUMNS_BY_SITE,
|
|
640
|
+
...DEVICE_HEALTH_AGGREGATES,
|
|
641
|
+
]) {
|
|
642
|
+
if (column.expression.includes('"')) {
|
|
643
|
+
expect(column.expression).toContain(`"NetworkDevice"."`);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
describe("reading a bucket back off the wire", () => {
|
|
650
|
+
/*
|
|
651
|
+
* Postgres hands COUNT and SUM back as strings. A parser that trusted the
|
|
652
|
+
* runtime type would give the site cards numbers that render fine and then
|
|
653
|
+
* add by concatenating.
|
|
654
|
+
*/
|
|
655
|
+
test("counts arrive as strings and come back as numbers", () => {
|
|
656
|
+
const row: AggregateRow = {
|
|
657
|
+
[DeviceHealthGroupAlias.SiteId]: "site-1",
|
|
658
|
+
[DeviceHealthGroupAlias.MonitorStatusId]: null,
|
|
659
|
+
[DeviceHealthGroupAlias.MonitoringMethod]: "SNMP",
|
|
660
|
+
[DeviceHealthGroupAlias.IsReachable]: true,
|
|
661
|
+
[DeviceHealthGroupAlias.HasBeenPolled]: true,
|
|
662
|
+
[DeviceHealthGroupAlias.HasBeenSeen]: true,
|
|
663
|
+
[DeviceHealthGroupAlias.IsStale]: false,
|
|
664
|
+
[DeviceHealthGroupAlias.HasDownInterfaces]: true,
|
|
665
|
+
[DeviceHealthGroupAlias.DeviceCount]: "1204",
|
|
666
|
+
[DeviceHealthGroupAlias.InterfacesDownTotal]: "3311",
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
const group: DeviceHealthGroup = parseDeviceHealthGroup(row);
|
|
670
|
+
|
|
671
|
+
expect(group.deviceCount).toBe(1204);
|
|
672
|
+
expect(group.interfacesDownTotal).toBe(3311);
|
|
673
|
+
expect(group.siteId).toBe("site-1");
|
|
674
|
+
expect(group.monitoringMethod).toBe("SNMP");
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
/*
|
|
678
|
+
* `isReachable` is three-state and NULL is a real answer — "never polled".
|
|
679
|
+
* Collapsing it to false would turn every unpolled device into a down one.
|
|
680
|
+
*/
|
|
681
|
+
test("a null isReachable stays null rather than becoming false", () => {
|
|
682
|
+
const group: DeviceHealthGroup = parseDeviceHealthGroup({
|
|
683
|
+
[DeviceHealthGroupAlias.IsReachable]: null,
|
|
684
|
+
[DeviceHealthGroupAlias.DeviceCount]: "7",
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
expect(group.isReachable).toBeNull();
|
|
688
|
+
expect(group.deviceCount).toBe(7);
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
test("booleans in Postgres's short form are read correctly", () => {
|
|
692
|
+
const group: DeviceHealthGroup = parseDeviceHealthGroup({
|
|
693
|
+
[DeviceHealthGroupAlias.IsStale]: "t",
|
|
694
|
+
[DeviceHealthGroupAlias.HasBeenPolled]: "f",
|
|
695
|
+
[DeviceHealthGroupAlias.IsReachable]: "t",
|
|
696
|
+
[DeviceHealthGroupAlias.DeviceCount]: "1",
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
expect(group.isStale).toBe(true);
|
|
700
|
+
expect(group.hasBeenPolled).toBe(false);
|
|
701
|
+
expect(group.isReachable).toBe(true);
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
/*
|
|
705
|
+
* Devices with no site group under a NULL key. They belong to no level of
|
|
706
|
+
* the hierarchy, and a parser that turned that into the empty string would
|
|
707
|
+
* bucket them all under whichever site happened to have "" as an id.
|
|
708
|
+
*/
|
|
709
|
+
test("a bucket with no site is null, not an empty string", () => {
|
|
710
|
+
const group: DeviceHealthGroup = parseDeviceHealthGroup({
|
|
711
|
+
[DeviceHealthGroupAlias.SiteId]: null,
|
|
712
|
+
[DeviceHealthGroupAlias.DeviceCount]: "3",
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
expect(group.siteId).toBeNull();
|
|
716
|
+
});
|
|
717
|
+
});
|