@oneuptime/common 12.0.32 → 12.0.33
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/Span.ts +14 -0
- package/Models/DatabaseModels/EnterpriseLicense.ts +56 -0
- package/Models/DatabaseModels/Index.ts +10 -0
- package/Models/DatabaseModels/Monitor.ts +76 -0
- package/Models/DatabaseModels/NetworkAlertPolicy.ts +690 -0
- package/Models/DatabaseModels/NetworkDevice.ts +176 -1
- package/Models/DatabaseModels/NetworkSite.ts +201 -2
- package/Models/DatabaseModels/NetworkSiteType.ts +102 -3
- package/Models/DatabaseModels/NetworkSnmpCredentialProfile.ts +841 -0
- package/Models/DatabaseModels/TelemetryException.ts +119 -0
- package/Models/DatabaseModels/UserNotificationEmailRollupBatch.ts +334 -0
- package/Models/DatabaseModels/UserNotificationEmailRollupItem.ts +370 -0
- package/Models/DatabaseModels/UserNotificationEmailRollupSetting.ts +282 -0
- package/Server/API/EnterpriseLicenseAPI.ts +391 -64
- package/Server/API/LlmProviderAPI.ts +137 -22
- package/Server/EnvironmentConfig.ts +14 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790700000000-AddNetworkSiteTypeParentHierarchy.ts +55 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddEnterpriseLicenseUsageProvenance.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddTelemetryExceptionErrorClass.ts +124 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791000000000-AddUserNotificationEmailRollup.ts +132 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791100000000-AddUserNotificationEmailRollupSetting.ts +79 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791200000000-AddNetworkSnmpCredentialProfilesAndAlertPolicies.ts +191 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +12 -0
- package/Server/Infrastructure/QueueWorker.ts +38 -8
- package/Server/Middleware/BearerTokenAuthorization.ts +12 -0
- package/Server/Middleware/ProjectAuthorization.ts +11 -0
- package/Server/Middleware/SCIMAuthorization.ts +12 -0
- package/Server/Middleware/TelemetryIngest.ts +11 -0
- package/Server/Services/AIBillingService.ts +101 -27
- package/Server/Services/EnterpriseLicenseInstanceService.ts +197 -0
- package/Server/Services/EnterpriseLicenseService.ts +55 -0
- package/Server/Services/Index.ts +10 -0
- package/Server/Services/MonitorService.ts +143 -21
- package/Server/Services/MonitorStatusTimelineService.ts +150 -8
- package/Server/Services/MonitorTemplateService.ts +217 -1
- package/Server/Services/NetworkAlertPolicyEngineService.ts +2159 -0
- package/Server/Services/NetworkAlertPolicyService.ts +944 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +9 -10
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +60 -15
- package/Server/Services/NetworkDeviceService.ts +1032 -73
- package/Server/Services/NetworkSiteService.ts +1502 -129
- package/Server/Services/NetworkSiteTypeService.ts +1216 -0
- package/Server/Services/NetworkSnmpCredentialProfileService.ts +238 -0
- package/Server/Services/NotificationService.ts +118 -28
- package/Server/Services/ProjectService.ts +105 -48
- package/Server/Services/StatusPagePrivateUserService.ts +103 -3
- package/Server/Services/UserNotificationEmailRollupBatchService.ts +78 -0
- package/Server/Services/UserNotificationEmailRollupItemService.ts +79 -0
- package/Server/Services/UserNotificationEmailRollupSettingService.ts +113 -0
- package/Server/Services/UserNotificationSettingService.ts +62 -25
- package/Server/Services/UserService.ts +95 -0
- package/Server/Types/Database/QueryHelper.ts +2 -2
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +14 -3
- package/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.ts +10 -0
- package/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.ts +10 -0
- package/Server/Utils/AI/SRE/Insights/InsightTriageRunner.ts +62 -1
- package/Server/Utils/AI/Toolbox/AlertTools.ts +15 -1
- package/Server/Utils/Billing/BillingFailureNoticeThrottle.ts +80 -0
- package/Server/Utils/DataSource/HttpFetch.ts +9 -2
- package/Server/Utils/EmailRollup/EmailRollupConstants.ts +98 -0
- package/Server/Utils/EmailRollup/EmailRollupFlushRunner.ts +872 -0
- package/Server/Utils/EmailRollup/EmailRollupRenderer.ts +781 -0
- package/Server/Utils/EmailRollup/EmailRollupWriter.ts +368 -0
- package/Server/Utils/LLM/LLMService.ts +78 -0
- package/Server/Utils/LogRedaction.ts +8 -0
- package/Server/Utils/Logger.ts +79 -1
- package/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.ts +190 -0
- package/Server/Utils/Monitor/Criteria/EvaluateOverTime.ts +9 -2
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +61 -1
- package/Server/Utils/Monitor/MonitorCriteriaDataExtractor.ts +14 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +49 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +255 -4
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +41 -0
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +43 -0
- package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +499 -19
- package/Server/Utils/Monitor/NetworkDeviceMetricUtil.ts +66 -10
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +238 -44
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +146 -39
- package/Server/Utils/NetworkDevice/DeviceHealthAggregation.ts +31 -18
- package/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.ts +213 -0
- package/Server/Utils/OutboundUserAgent.ts +152 -0
- package/Server/Utils/StartServer.ts +51 -19
- package/Server/Utils/Telemetry/CaptureSpan.ts +32 -8
- package/Server/Utils/Telemetry/ErrorClassResolver.ts +120 -0
- package/Server/Utils/Telemetry/SpanUtil.ts +33 -0
- package/Server/Utils/Telemetry.ts +198 -51
- package/Server/Views/Partials/SensitiveUrlToken.ejs +140 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +134 -33
- package/Tests/App/Dashboard/AskAiSuggestedPrompts.test.ts +279 -0
- package/Tests/App/Dashboard/DashboardEditPermissions.test.tsx +517 -0
- package/Tests/App/Dashboard/DashboardVariablesDiscard.test.tsx +26 -0
- package/Tests/App/Dashboard/DeviceStatusHero.test.tsx +588 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +18 -9
- package/Tests/App/Dashboard/MonitorCreateFromMonitorBackedDevice.test.tsx +632 -0
- package/Tests/App/Dashboard/MonitorRecommendationCreateProgress.test.tsx +682 -0
- package/Tests/App/Dashboard/MonitorTypePicker.test.tsx +4 -2
- package/Tests/App/Dashboard/NetworkDeviceCreateFormMonitorBinding.test.tsx +676 -0
- package/Tests/App/Dashboard/NetworkDeviceCreateFormPingMonitor.test.tsx +791 -0
- package/Tests/App/Dashboard/NetworkDeviceCreateFormProbeAndSnmp.test.tsx +833 -0
- package/Tests/App/Dashboard/NetworkDeviceCriteriaFilter.test.ts +161 -0
- package/Tests/App/Dashboard/NetworkDeviceSettingsMonitoringSection.test.tsx +458 -0
- package/Tests/App/Dashboard/NetworkSideMenu.test.tsx +41 -5
- package/Tests/App/Dashboard/PingMonitorProvisioning.test.ts +368 -0
- package/Tests/App/Dashboard/RecommendationCard.test.tsx +796 -0
- package/Tests/App/Dashboard/RecommendationToolbar.test.tsx +519 -0
- package/Tests/App/Dashboard/RecommendationsList.test.tsx +661 -0
- package/Tests/App/Dashboard/UseBulkCreatePingMonitors.test.tsx +899 -0
- package/Tests/App/Dashboard/UseBulkSnmpCredentialProfileActions.test.tsx +732 -0
- package/Tests/App/SensitiveUrlTokenBootstrap.test.ts +256 -0
- package/Tests/App/StatusPage/StatusPageIndexPageRobotsMeta.test.ts +11 -1
- package/Tests/App/StatusPage/StatusPageLoginCodeBootstrap.test.ts +9 -4
- package/Tests/Models/NetworkSiteHierarchy.test.ts +41 -4
- package/Tests/Server/API/EnterpriseLicenseReportUserCount.test.ts +951 -7
- package/Tests/Server/API/LlmProviderConnectionTest.test.ts +522 -0
- package/Tests/Server/Infrastructure/Postgres/NetworkSnmpCredentialProfilesAndAlertPoliciesMigration.test.ts +854 -0
- package/Tests/Server/Infrastructure/Postgres/SchemaMigrationsOrdering.test.ts +18 -0
- package/Tests/Server/Infrastructure/Postgres/UserNotificationEmailRollupTableMigration.test.ts +535 -0
- package/Tests/Server/Services/AIChatPrivacyPin.test.ts +560 -0
- package/Tests/Server/Services/BillingRechargeOwnerEmailGuards.test.ts +783 -0
- package/Tests/Server/Services/EnterpriseLicenseInstanceServiceDeletionUsage.test.ts +707 -0
- package/Tests/Server/Services/EnterpriseLicenseServiceUsageAggregationLock.test.ts +329 -0
- package/Tests/Server/Services/MonitorServiceDeleteNetworkDeviceCleanup.test.ts +294 -0
- package/Tests/Server/Services/MonitorStatusBridgeProbePath.test.ts +802 -0
- package/Tests/Server/Services/MonitorStatusTimelineService.test.ts +72 -2
- package/Tests/Server/Services/NetworkAlertPolicyEngineHooks.test.ts +752 -0
- package/Tests/Server/Services/NetworkAlertPolicyEngineService.test.ts +1849 -0
- package/Tests/Server/Services/NetworkAlertPolicyModel.test.ts +1793 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +47 -4
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +97 -12
- package/Tests/Server/Services/NetworkDeviceAutoMonitorLifecycle.test.ts +148 -3
- package/Tests/Server/Services/NetworkDeviceMonitorBindingUpdateGuard.test.ts +514 -0
- package/Tests/Server/Services/NetworkDeviceMonitorStatusStamp.test.ts +447 -58
- package/Tests/Server/Services/NetworkDeviceMonitoringMethodTransition.test.ts +739 -0
- package/Tests/Server/Services/NetworkDevicePollingTenancy.test.ts +501 -0
- package/Tests/Server/Services/NetworkDeviceSiteDefaultProbe.test.ts +432 -0
- package/Tests/Server/Services/NetworkSiteMonitoringDefaults.test.ts +498 -0
- package/Tests/Server/Services/NetworkSiteRollupPolicyAndMaintenance.test.ts +337 -55
- package/Tests/Server/Services/NetworkSiteService.test.ts +1868 -131
- package/Tests/Server/Services/NetworkSiteTypeService.test.ts +1109 -0
- package/Tests/Server/Services/NetworkSnmpCredentialProfileModel.test.ts +926 -0
- package/Tests/Server/Services/NetworkSnmpCredentialProfileService.test.ts +796 -0
- package/Tests/Server/Services/ProjectServiceNetworkSiteTypeDefaults.test.ts +214 -0
- package/Tests/Server/Services/StatusPagePrivateUserEmailChangePasswordResetExpiry.test.ts +269 -0
- package/Tests/Server/Services/UserEmailChangePasswordResetExpiry.test.ts +472 -0
- package/Tests/Server/Services/UserNotificationEmailRollupModels.test.ts +569 -0
- package/Tests/Server/Services/UserNotificationEmailRollupSettingModel.test.ts +314 -0
- package/Tests/Server/Services/UserNotificationEmailRollupSettingService.test.ts +409 -0
- package/Tests/Server/Services/UserNotificationSettingRollupRouting.test.ts +856 -0
- package/Tests/Server/Services/UserNotificationSettingWorkspaceChannels.test.ts +102 -1
- package/Tests/Server/Types/Database/Permissions/DashboardAccessPermission.test.ts +321 -0
- package/Tests/Server/Types/Database/QueryHelperOperators.test.ts +17 -0
- package/Tests/Server/Utils/AI/AlertMonitorFilters.test.ts +124 -0
- package/Tests/Server/Utils/AI/Insights/InsightTriageRunner.test.ts +208 -0
- package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +235 -0
- package/Tests/Server/Utils/AI/ObservabilityChatPrompt.test.ts +253 -0
- package/Tests/Server/Utils/Captcha.test.ts +422 -0
- package/Tests/Server/Utils/DataSource/HttpFetch.test.ts +96 -2
- package/Tests/Server/Utils/Database/MigrationFailureLog.test.ts +466 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupFlushRunnerBehaviour.test.ts +1096 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupFlushRunnerClaim.test.ts +466 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupRenderer.test.ts +1428 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupTestHarness.ts +752 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupWriter.test.ts +864 -0
- package/Tests/Server/Utils/LoggerFaultDemotion.test.ts +346 -0
- package/Tests/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.test.ts +633 -0
- package/Tests/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.test.ts +196 -0
- package/Tests/Server/Utils/Monitor/DatabaseMetricWrite.test.ts +367 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaObservationBuilderUnits.test.ts +100 -0
- package/Tests/Server/Utils/Monitor/MonitorStepResourceIdentity.test.ts +5 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceHydrationUtil.test.ts +512 -31
- package/Tests/Server/Utils/Monitor/NetworkDeviceMetricUtil.test.ts +252 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +479 -42
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +351 -5
- package/Tests/Server/Utils/NetworkDevice/DeviceHealthAggregation.test.ts +136 -12
- package/Tests/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.test.ts +306 -0
- package/Tests/Server/Utils/OutboundUserAgent.test.ts +266 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClientUserAgent.test.ts +141 -0
- package/Tests/Server/Utils/Telemetry/ErrorClassResolver.test.ts +298 -0
- package/Tests/Server/Utils/Telemetry.test.ts +456 -66
- package/Tests/Types/Monitor/DatabaseMetricCatalog.test.ts +388 -0
- package/Tests/Types/Monitor/MonitorStepDatabaseMonitor.test.ts +243 -0
- package/Tests/Types/Monitor/MonitorStepDefaultTelemetryConfig.test.ts +1 -0
- package/Tests/Types/Monitor/MonitorType.test.ts +1 -0
- package/Tests/Types/Monitor/MonitorTypeKeywords.test.ts +16 -7
- package/Tests/Types/Monitor/NetworkDeviceAlertPack.test.ts +60 -0
- package/Tests/Types/NetworkDevice/NetworkAlertPolicyScope.test.ts +655 -0
- package/Tests/Types/NetworkDevice/NetworkDeviceMonitoringMethod.test.ts +115 -26
- package/Tests/Types/NetworkSite/DefaultNetworkSiteType.test.ts +39 -0
- package/Tests/Types/NotificationSetting/NotificationEmailRollupPolicy.test.ts +299 -0
- package/Tests/Types/Telemetry/ErrorClass.test.ts +483 -0
- package/Tests/UI/Components/BasicRadioButtons.test.tsx +336 -0
- package/Tests/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.test.ts +15 -0
- package/Tests/UI/Components/ProgressBar.test.tsx +38 -2
- package/Tests/UI/Components/SideMenuItem.test.tsx +226 -4
- package/Tests/UI/Components/SideMenuSection.test.tsx +310 -0
- package/Tests/UI/Components/SideOverSubmitState.test.tsx +335 -0
- package/Tests/UI/Utils/PageScrollLock.test.tsx +377 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +78 -0
- package/Tests/UI/Utils/SensitiveUrlToken.test.ts +140 -0
- package/Tests/Utils/EnterpriseLicenseSeats.test.ts +69 -0
- package/Tests/Utils/EnterpriseLicenseSync.test.ts +7 -1
- package/Tests/Utils/EnterpriseLicenseUsage.test.ts +433 -2
- package/Tests/Utils/Monitor/MonitorMetricType.test.ts +280 -1
- package/Tests/Utils/Monitor/MonitorSummarySnapshotUtil.test.ts +1 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +38 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +284 -23
- package/Tests/Utils/NetworkDevice/DeviceReachabilityUtil.test.ts +177 -0
- package/Tests/Utils/NetworkDevice/MonitoringMethodThreadedClassifiers.test.ts +992 -0
- package/Tests/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.test.ts +427 -0
- package/Tests/Utils/NetworkDevice/ReachabilityStampConsistency.test.ts +185 -0
- package/Tests/Utils/NetworkDevice/SnmpCredentialUtil.test.ts +268 -0
- package/Tests/Utils/NetworkDiscovery/AutoImportRuleMatcher.test.ts +55 -5
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +98 -21
- package/Tests/Utils/NetworkDiscovery/DiscoveryImportEligibility.test.ts +98 -20
- package/Tests/Utils/NetworkDiscovery/DiscoveryReverseDnsChain.test.ts +8 -7
- package/Tests/Utils/NetworkDiscovery/PingMonitorBuilderForAddress.test.ts +274 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +230 -51
- package/Tests/Utils/NetworkSite/TypeHierarchyUtil.test.ts +209 -0
- package/Tests/Utils/Telemetry/CaptureSpanExportGating.test.ts +145 -0
- package/Types/AI/ExceptionAIClassification.ts +10 -24
- package/Types/Email/EmailTemplateType.ts +2 -0
- package/Types/EnterpriseLicense/EnterpriseLicenseInstanceSummary.ts +5 -0
- package/Types/EnterpriseLicense/EnterpriseLicenseUsageSnapshot.ts +13 -0
- package/Types/EnterpriseLicense/EnterpriseLicenseUserCountSource.ts +6 -0
- package/Types/Exception/ApiException.ts +10 -0
- package/Types/Exception/BadDataException.ts +11 -0
- package/Types/Exception/BadRequestException.ts +11 -0
- package/Types/Exception/Exception.ts +65 -0
- package/Types/Exception/ForbiddenException.ts +10 -0
- package/Types/Exception/NotAuthenticatedException.ts +10 -0
- package/Types/Exception/NotAuthorizedException.ts +10 -0
- package/Types/Exception/NotFoundException.ts +11 -0
- package/Types/Exception/PayloadTooLargeException.ts +11 -0
- package/Types/Exception/PaymentRequiredException.ts +10 -0
- package/Types/Exception/ServiceUnavailableException.ts +10 -0
- package/Types/Exception/SsoAuthorizationException.ts +10 -0
- package/Types/Exception/TenantNotFoundException.ts +11 -0
- package/Types/Exception/TimeoutException.ts +10 -0
- package/Types/Exception/TooManyRequestsException.ts +10 -0
- package/Types/Exception/UnableToReachServer.ts +10 -0
- package/Types/Exception/WebsiteRequestException.ts +10 -0
- package/Types/Monitor/CriteriaFilter.ts +60 -2
- package/Types/Monitor/DatabaseMetricCatalog.ts +693 -0
- package/Types/Monitor/DatabaseMonitor/DatabaseMonitorResponse.ts +83 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +76 -0
- package/Types/Monitor/MonitorMetricType.ts +71 -0
- package/Types/Monitor/MonitorStep.ts +76 -0
- package/Types/Monitor/MonitorStepDatabaseMonitor.ts +171 -0
- package/Types/Monitor/MonitorStepSqlMonitor.ts +2 -20
- package/Types/Monitor/MonitorType.ts +47 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.ts +22 -1
- package/Types/Monitor/SqlConnectionConfig.ts +31 -0
- package/Types/NetworkDevice/NetworkAlertPolicyScope.ts +343 -0
- package/Types/NetworkDevice/NetworkDeviceMonitoringMethod.ts +42 -22
- package/Types/NetworkSite/DefaultNetworkSiteTypeHierarchy.ts +30 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.ts +255 -0
- package/Types/NotificationSetting/NotificationEmailRollupPolicy.ts +104 -0
- package/Types/Permission.ts +90 -0
- package/Types/Probe/ProbeMonitorResponse.ts +16 -0
- package/Types/Telemetry/ErrorClass.ts +274 -0
- package/Types/Telemetry/UnitOfWork.ts +59 -0
- package/UI/Components/CommandPalette/CommandPalette.tsx +2 -8
- package/UI/Components/EditionLabel/EditionLabel.tsx +4 -0
- package/UI/Components/Modal/Modal.tsx +2 -8
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +44 -0
- package/UI/Components/ProgressBar/ProgressBar.tsx +12 -1
- package/UI/Components/RadioButtons/BasicRadioButtons.tsx +37 -7
- package/UI/Components/SideMenu/SideMenu.tsx +123 -5
- package/UI/Components/SideMenu/SideMenuItem.tsx +76 -84
- package/UI/Components/SideMenu/SideMenuSection.tsx +55 -23
- package/UI/Components/SideOver/SideOver.tsx +21 -20
- package/UI/Utils/PageScrollLock.ts +79 -3
- package/UI/Utils/PermissionGate.ts +61 -0
- package/UI/Utils/SensitiveUrlToken.ts +112 -0
- package/UI/Utils/TestLLMProvider.ts +11 -0
- package/Utils/EnterpriseLicense/EnterpriseLicenseSeats.ts +16 -0
- package/Utils/EnterpriseLicense/EnterpriseLicenseUsage.ts +191 -11
- package/Utils/Monitor/MonitorMetricType.ts +153 -1
- package/Utils/Monitor/NetworkTopologyUtil.ts +23 -3
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +65 -14
- package/Utils/NetworkDevice/DeviceReachabilityUtil.ts +43 -14
- package/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.ts +247 -0
- package/Utils/NetworkDevice/SnmpCredentialUtil.ts +68 -0
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +15 -7
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +52 -17
- package/Utils/NetworkDiscovery/DiscoveryImportEligibility.ts +55 -23
- package/Utils/NetworkDiscovery/PingMonitorBuilder.ts +115 -13
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +66 -20
- package/Utils/NetworkSite/TypeHierarchyUtil.ts +313 -0
- package/build/dist/Models/AnalyticsModels/Span.js +14 -0
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/DatabaseModels/EnterpriseLicense.js +59 -0
- package/build/dist/Models/DatabaseModels/EnterpriseLicense.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +10 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Monitor.js +75 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkAlertPolicy.js +713 -0
- package/build/dist/Models/DatabaseModels/NetworkAlertPolicy.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +180 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js +200 -2
- package/build/dist/Models/DatabaseModels/NetworkSite.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSiteType.js +102 -3
- package/build/dist/Models/DatabaseModels/NetworkSiteType.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSnmpCredentialProfile.js +878 -0
- package/build/dist/Models/DatabaseModels/NetworkSnmpCredentialProfile.js.map +1 -0
- package/build/dist/Models/DatabaseModels/TelemetryException.js +123 -0
- package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupBatch.js +363 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupBatch.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupItem.js +402 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupItem.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupSetting.js +296 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupSetting.js.map +1 -0
- package/build/dist/Server/API/EnterpriseLicenseAPI.js +273 -60
- package/build/dist/Server/API/EnterpriseLicenseAPI.js.map +1 -1
- package/build/dist/Server/API/LlmProviderAPI.js +108 -13
- package/build/dist/Server/API/LlmProviderAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +12 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790700000000-AddNetworkSiteTypeParentHierarchy.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790700000000-AddNetworkSiteTypeParentHierarchy.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddEnterpriseLicenseUsageProvenance.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddEnterpriseLicenseUsageProvenance.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddTelemetryExceptionErrorClass.js +111 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddTelemetryExceptionErrorClass.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791000000000-AddUserNotificationEmailRollup.js +77 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791000000000-AddUserNotificationEmailRollup.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791100000000-AddUserNotificationEmailRollupSetting.js +50 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791100000000-AddUserNotificationEmailRollupSetting.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791200000000-AddNetworkSnmpCredentialProfilesAndAlertPolicies.js +83 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791200000000-AddNetworkSnmpCredentialProfilesAndAlertPolicies.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/QueueWorker.js +33 -5
- package/build/dist/Server/Infrastructure/QueueWorker.js.map +1 -1
- package/build/dist/Server/Middleware/BearerTokenAuthorization.js +12 -0
- package/build/dist/Server/Middleware/BearerTokenAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/ProjectAuthorization.js +11 -0
- package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/SCIMAuthorization.js +12 -0
- package/build/dist/Server/Middleware/SCIMAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +11 -0
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AIBillingService.js +70 -16
- package/build/dist/Server/Services/AIBillingService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseInstanceService.js +167 -0
- package/build/dist/Server/Services/EnterpriseLicenseInstanceService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseService.js +39 -0
- package/build/dist/Server/Services/EnterpriseLicenseService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +10 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +119 -21
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorStatusTimelineService.js +127 -8
- package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +162 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/NetworkAlertPolicyEngineService.js +1683 -0
- package/build/dist/Server/Services/NetworkAlertPolicyEngineService.js.map +1 -0
- package/build/dist/Server/Services/NetworkAlertPolicyService.js +732 -0
- package/build/dist/Server/Services/NetworkAlertPolicyService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +10 -9
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +54 -11
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +841 -70
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +1145 -107
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteTypeService.js +863 -0
- package/build/dist/Server/Services/NetworkSiteTypeService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSnmpCredentialProfileService.js +217 -0
- package/build/dist/Server/Services/NetworkSnmpCredentialProfileService.js.map +1 -0
- package/build/dist/Server/Services/NotificationService.js +80 -17
- package/build/dist/Server/Services/NotificationService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +66 -30
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/StatusPagePrivateUserService.js +92 -2
- package/build/dist/Server/Services/StatusPagePrivateUserService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationEmailRollupBatchService.js +76 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupBatchService.js.map +1 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupItemService.js +77 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupItemService.js.map +1 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupSettingService.js +111 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupSettingService.js.map +1 -0
- package/build/dist/Server/Services/UserNotificationSettingService.js +46 -20
- package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +90 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +14 -3
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.js +10 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.js +10 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightTriageRunner.js +54 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightTriageRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js +18 -4
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js.map +1 -1
- package/build/dist/Server/Utils/Billing/BillingFailureNoticeThrottle.js +59 -0
- package/build/dist/Server/Utils/Billing/BillingFailureNoticeThrottle.js.map +1 -0
- package/build/dist/Server/Utils/DataSource/HttpFetch.js +2 -1
- package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
- package/build/dist/Server/Utils/EmailRollup/EmailRollupConstants.js +91 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupConstants.js.map +1 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js +691 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js.map +1 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupRenderer.js +497 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupRenderer.js.map +1 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupWriter.js +257 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupWriter.js.map +1 -0
- package/build/dist/Server/Utils/LLM/LLMService.js +64 -1
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/LogRedaction.js +8 -0
- package/build/dist/Server/Utils/LogRedaction.js.map +1 -1
- package/build/dist/Server/Utils/Logger.js +63 -1
- package/build/dist/Server/Utils/Logger.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.js +141 -0
- package/build/dist/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js +8 -1
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +51 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js +7 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +37 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +158 -6
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +33 -0
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +32 -0
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +330 -21
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js +55 -10
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +178 -49
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +119 -29
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js +30 -17
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js.map +1 -1
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.js +158 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.js.map +1 -0
- package/build/dist/Server/Utils/OutboundUserAgent.js +123 -0
- package/build/dist/Server/Utils/OutboundUserAgent.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +38 -14
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/CaptureSpan.js +28 -8
- package/build/dist/Server/Utils/Telemetry/CaptureSpan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ErrorClassResolver.js +95 -0
- package/build/dist/Server/Utils/Telemetry/ErrorClassResolver.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js +29 -0
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry.js +162 -46
- package/build/dist/Server/Utils/Telemetry.js.map +1 -1
- package/build/dist/Types/AI/ExceptionAIClassification.js +10 -24
- package/build/dist/Types/AI/ExceptionAIClassification.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/EnterpriseLicense/EnterpriseLicenseUsageSnapshot.js +2 -0
- package/build/dist/Types/EnterpriseLicense/EnterpriseLicenseUsageSnapshot.js.map +1 -0
- package/build/dist/Types/EnterpriseLicense/EnterpriseLicenseUserCountSource.js +7 -0
- package/build/dist/Types/EnterpriseLicense/EnterpriseLicenseUserCountSource.js.map +1 -0
- package/build/dist/Types/Exception/ApiException.js +9 -0
- package/build/dist/Types/Exception/ApiException.js.map +1 -1
- package/build/dist/Types/Exception/BadDataException.js +10 -0
- package/build/dist/Types/Exception/BadDataException.js.map +1 -1
- package/build/dist/Types/Exception/BadRequestException.js +10 -0
- package/build/dist/Types/Exception/BadRequestException.js.map +1 -1
- package/build/dist/Types/Exception/Exception.js +56 -0
- package/build/dist/Types/Exception/Exception.js.map +1 -1
- package/build/dist/Types/Exception/ForbiddenException.js +9 -0
- package/build/dist/Types/Exception/ForbiddenException.js.map +1 -1
- package/build/dist/Types/Exception/NotAuthenticatedException.js +9 -0
- package/build/dist/Types/Exception/NotAuthenticatedException.js.map +1 -1
- package/build/dist/Types/Exception/NotAuthorizedException.js +9 -0
- package/build/dist/Types/Exception/NotAuthorizedException.js.map +1 -1
- package/build/dist/Types/Exception/NotFoundException.js +10 -0
- package/build/dist/Types/Exception/NotFoundException.js.map +1 -1
- package/build/dist/Types/Exception/PayloadTooLargeException.js +10 -0
- package/build/dist/Types/Exception/PayloadTooLargeException.js.map +1 -1
- package/build/dist/Types/Exception/PaymentRequiredException.js +9 -0
- package/build/dist/Types/Exception/PaymentRequiredException.js.map +1 -1
- package/build/dist/Types/Exception/ServiceUnavailableException.js +9 -0
- package/build/dist/Types/Exception/ServiceUnavailableException.js.map +1 -1
- package/build/dist/Types/Exception/SsoAuthorizationException.js +9 -0
- package/build/dist/Types/Exception/SsoAuthorizationException.js.map +1 -1
- package/build/dist/Types/Exception/TenantNotFoundException.js +10 -0
- package/build/dist/Types/Exception/TenantNotFoundException.js.map +1 -1
- package/build/dist/Types/Exception/TimeoutException.js +9 -0
- package/build/dist/Types/Exception/TimeoutException.js.map +1 -1
- package/build/dist/Types/Exception/TooManyRequestsException.js +9 -0
- package/build/dist/Types/Exception/TooManyRequestsException.js.map +1 -1
- package/build/dist/Types/Exception/UnableToReachServer.js +9 -0
- package/build/dist/Types/Exception/UnableToReachServer.js.map +1 -1
- package/build/dist/Types/Exception/WebsiteRequestException.js +9 -0
- package/build/dist/Types/Exception/WebsiteRequestException.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +45 -2
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/DatabaseMetricCatalog.js +594 -0
- package/build/dist/Types/Monitor/DatabaseMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/DatabaseMonitor/DatabaseMonitorResponse.js +21 -0
- package/build/dist/Types/Monitor/DatabaseMonitor/DatabaseMonitorResponse.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +70 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorMetricType.js +61 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +54 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepDatabaseMonitor.js +122 -0
- package/build/dist/Types/Monitor/MonitorStepDatabaseMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +45 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +21 -1
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js.map +1 -1
- package/build/dist/Types/Monitor/SqlConnectionConfig.js +2 -0
- package/build/dist/Types/Monitor/SqlConnectionConfig.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkAlertPolicyScope.js +172 -0
- package/build/dist/Types/NetworkDevice/NetworkAlertPolicyScope.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceMonitoringMethod.js +40 -22
- package/build/dist/Types/NetworkDevice/NetworkDeviceMonitoringMethod.js.map +1 -1
- package/build/dist/Types/NetworkSite/DefaultNetworkSiteTypeHierarchy.js +26 -0
- package/build/dist/Types/NetworkSite/DefaultNetworkSiteTypeHierarchy.js.map +1 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupCategory.js +186 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupCategory.js.map +1 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupPolicy.js +87 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +80 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Telemetry/ErrorClass.js +216 -0
- package/build/dist/Types/Telemetry/ErrorClass.js.map +1 -0
- package/build/dist/Types/Telemetry/UnitOfWork.js +59 -0
- package/build/dist/Types/Telemetry/UnitOfWork.js.map +1 -0
- package/build/dist/UI/Components/CommandPalette/CommandPalette.js +2 -7
- package/build/dist/UI/Components/CommandPalette/CommandPalette.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +3 -0
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +2 -7
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +39 -0
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js +12 -1
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/dist/UI/Components/RadioButtons/BasicRadioButtons.js +6 -6
- package/build/dist/UI/Components/RadioButtons/BasicRadioButtons.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenu.js +67 -5
- package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js +49 -53
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuSection.js +25 -7
- package/build/dist/UI/Components/SideMenu/SideMenuSection.js.map +1 -1
- package/build/dist/UI/Components/SideOver/SideOver.js +5 -20
- package/build/dist/UI/Components/SideOver/SideOver.js.map +1 -1
- package/build/dist/UI/Utils/PageScrollLock.js +31 -3
- package/build/dist/UI/Utils/PageScrollLock.js.map +1 -1
- package/build/dist/UI/Utils/PermissionGate.js +42 -1
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -1
- package/build/dist/UI/Utils/SensitiveUrlToken.js +97 -0
- package/build/dist/UI/Utils/SensitiveUrlToken.js.map +1 -0
- package/build/dist/UI/Utils/TestLLMProvider.js +4 -5
- package/build/dist/UI/Utils/TestLLMProvider.js.map +1 -1
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js +15 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js.map +1 -1
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js +111 -9
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js +109 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +8 -3
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +27 -7
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js +7 -5
- package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.js +180 -0
- package/build/dist/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDevice/SnmpCredentialUtil.js +12 -0
- package/build/dist/Utils/NetworkDevice/SnmpCredentialUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js +15 -5
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +44 -15
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveryImportEligibility.js +52 -23
- package/build/dist/Utils/NetworkDiscovery/DiscoveryImportEligibility.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js +85 -13
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +30 -15
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/NetworkSite/TypeHierarchyUtil.js +191 -0
- package/build/dist/Utils/NetworkSite/TypeHierarchyUtil.js.map +1 -0
- package/package.json +2 -2
|
@@ -4,6 +4,8 @@ import SortOrder from "../../../../../../Types/BaseDatabase/SortOrder";
|
|
|
4
4
|
import InBetween from "../../../../../../Types/BaseDatabase/InBetween";
|
|
5
5
|
import PositiveNumber from "../../../../../../Types/PositiveNumber";
|
|
6
6
|
import { JSONObject } from "../../../../../../Types/JSON";
|
|
7
|
+
import IncludesNone from "../../../../../../Types/BaseDatabase/IncludesNone";
|
|
8
|
+
import { NON_ACTIONABLE_ERROR_CLASSES } from "../../../../../../Types/Telemetry/ErrorClass";
|
|
7
9
|
import { LIMIT_PER_PROJECT } from "../../../../../../Types/Database/LimitMax";
|
|
8
10
|
import AIInsightType from "../../../../../../Types/AI/AIInsightType";
|
|
9
11
|
import AIInsightSeverity from "../../../../../../Types/AI/AIInsightSeverity";
|
|
@@ -176,6 +178,14 @@ export default class ExceptionSpikeDetector implements InsightDetector {
|
|
|
176
178
|
firstSeenAt: QueryHelper.lessThan(establishedBefore),
|
|
177
179
|
isResolved: false,
|
|
178
180
|
isArchived: false,
|
|
181
|
+
/*
|
|
182
|
+
* Muted fault domains never file an insight. A spike in rejected
|
|
183
|
+
* logins or malformed input is a traffic story, not a code defect —
|
|
184
|
+
* and each candidate costs two ClickHouse counts before it can even
|
|
185
|
+
* be dropped, so excluding them here saves the scan as well as the
|
|
186
|
+
* LLM budget. Mirrors the Issues list scope.
|
|
187
|
+
*/
|
|
188
|
+
errorClass: new IncludesNone([...NON_ACTIONABLE_ERROR_CLASSES]),
|
|
179
189
|
};
|
|
180
190
|
|
|
181
191
|
const exceptions: Array<TelemetryException> =
|
|
@@ -2,6 +2,8 @@ import ObjectID from "../../../../../../Types/ObjectID";
|
|
|
2
2
|
import OneUptimeDate from "../../../../../../Types/Date";
|
|
3
3
|
import SortOrder from "../../../../../../Types/BaseDatabase/SortOrder";
|
|
4
4
|
import { JSONObject } from "../../../../../../Types/JSON";
|
|
5
|
+
import IncludesNone from "../../../../../../Types/BaseDatabase/IncludesNone";
|
|
6
|
+
import { NON_ACTIONABLE_ERROR_CLASSES } from "../../../../../../Types/Telemetry/ErrorClass";
|
|
5
7
|
import AIInsightType from "../../../../../../Types/AI/AIInsightType";
|
|
6
8
|
import AIInsightSeverity from "../../../../../../Types/AI/AIInsightSeverity";
|
|
7
9
|
import TelemetryException from "../../../../../../Models/DatabaseModels/TelemetryException";
|
|
@@ -171,6 +173,14 @@ export default class NewExceptionDetector implements InsightDetector {
|
|
|
171
173
|
firstSeenAt: QueryHelper.greaterThanEqualTo(firstSeenSince),
|
|
172
174
|
isResolved: false,
|
|
173
175
|
isArchived: false,
|
|
176
|
+
/*
|
|
177
|
+
* Muted fault domains never file an insight. A user-error or an
|
|
178
|
+
* expected-denial group is not a defect in this code, so triaging it
|
|
179
|
+
* would spend an LLM budget grant to be told exactly what the
|
|
180
|
+
* emitting code already declared. Mirrors the Issues list scope, so
|
|
181
|
+
* the inbox and the list agree on what counts as a real failure.
|
|
182
|
+
*/
|
|
183
|
+
errorClass: new IncludesNone([...NON_ACTIONABLE_ERROR_CLASSES]),
|
|
174
184
|
occuranceCount: QueryHelper.greaterThanEqualTo(
|
|
175
185
|
NEW_EXCEPTION_MIN_OCCURRENCE_COUNT,
|
|
176
186
|
),
|
|
@@ -215,7 +215,9 @@ export default class InsightTriageRunner {
|
|
|
215
215
|
*
|
|
216
216
|
* 1. Stamp the verdict onto the exception group row (aiClassification)
|
|
217
217
|
* so the exceptions list can filter on it and the fix lane can skip
|
|
218
|
-
* known-non-defects without re-triaging
|
|
218
|
+
* known-non-defects without re-triaging, and PROMOTE it into the
|
|
219
|
+
* platform-wide errorClass when nothing better has claimed that field
|
|
220
|
+
* yet (see below).
|
|
219
221
|
* 2. code-fault → route the automatic fix (InsightFixRouting owns every
|
|
220
222
|
* gate: enableAi, enableInsightFixTasks, budget, readiness, dedupe)
|
|
221
223
|
* and flip the insight to FixOpened when a run was queued.
|
|
@@ -244,6 +246,12 @@ export default class InsightTriageRunner {
|
|
|
244
246
|
* meantime gets no PR and keeps its terminal status.
|
|
245
247
|
*/
|
|
246
248
|
if (insight.telemetryExceptionId) {
|
|
249
|
+
/*
|
|
250
|
+
* aiClassification is the AUDIT RECORD of what the LLM said and is
|
|
251
|
+
* written unconditionally — it must stay readable even when a
|
|
252
|
+
* stronger source owns errorClass, so a human comparing the two can
|
|
253
|
+
* see where the model disagreed.
|
|
254
|
+
*/
|
|
247
255
|
await TelemetryExceptionService.updateOneById({
|
|
248
256
|
id: insight.telemetryExceptionId,
|
|
249
257
|
data: {
|
|
@@ -251,6 +259,59 @@ export default class InsightTriageRunner {
|
|
|
251
259
|
},
|
|
252
260
|
props: { isRoot: true },
|
|
253
261
|
});
|
|
262
|
+
|
|
263
|
+
/*
|
|
264
|
+
* errorClass is the ACTED-ON field (Issues scope, emit-path
|
|
265
|
+
* suppression, fix routing), and its precedence is
|
|
266
|
+
* declared > manual > ai > default. A class the throwing code
|
|
267
|
+
* declared for itself is a site-level statement by a developer, and
|
|
268
|
+
* 'manual' is a human's verdict on this exact group; a probabilistic
|
|
269
|
+
* LLM answer outranks neither. So the promotion is guarded on the
|
|
270
|
+
* source still being 'default' — nobody has classified this group.
|
|
271
|
+
*
|
|
272
|
+
* The guard is a WHERE clause rather than a read-then-write: the
|
|
273
|
+
* triage run has been in flight for minutes, so a 'declared' event
|
|
274
|
+
* ingesting or a human reclassifying between a read and this write
|
|
275
|
+
* is a real race, and a conditional UPDATE cannot clobber either.
|
|
276
|
+
* (Same conditional-flip idiom as the ActionRequired -> FixOpened
|
|
277
|
+
* write below.)
|
|
278
|
+
*/
|
|
279
|
+
try {
|
|
280
|
+
const promotedRowCount: number =
|
|
281
|
+
await TelemetryExceptionService.updateOneBy({
|
|
282
|
+
query: {
|
|
283
|
+
_id: insight.telemetryExceptionId.toString(),
|
|
284
|
+
errorClassSource: "default",
|
|
285
|
+
},
|
|
286
|
+
data: {
|
|
287
|
+
errorClass: classification,
|
|
288
|
+
errorClassSource: "ai",
|
|
289
|
+
},
|
|
290
|
+
props: { isRoot: true },
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
if (promotedRowCount === 0) {
|
|
294
|
+
logger.debug(
|
|
295
|
+
`AI insights: kept the existing error class on exception ${insight.telemetryExceptionId.toString()} — a declared or manual classification outranks the AI verdict ${classification}.`,
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
} catch (err) {
|
|
299
|
+
/*
|
|
300
|
+
* Non-fatal on purpose. This is a secondary, self-healing write: the
|
|
301
|
+
* audit record above already landed, and live traffic re-stamps
|
|
302
|
+
* errorClass from the declared class on the group's next occurrence.
|
|
303
|
+
*
|
|
304
|
+
* The auto-archive decision below IS user-visible and irreversible by
|
|
305
|
+
* comparison, so it must not be lost to a failure here. Without this
|
|
306
|
+
* guard the two are coupled only by statement order, which is exactly
|
|
307
|
+
* the kind of coupling nobody notices until an incident.
|
|
308
|
+
*/
|
|
309
|
+
logger.warn(
|
|
310
|
+
`AI insights: could not promote the error class on exception ${insight.telemetryExceptionId.toString()}: ${
|
|
311
|
+
err instanceof Error ? err.message : String(err)
|
|
312
|
+
}`,
|
|
313
|
+
);
|
|
314
|
+
}
|
|
254
315
|
}
|
|
255
316
|
|
|
256
317
|
const currentInsight: AIInsight | null = await AIInsightService.findOneById(
|
|
@@ -42,7 +42,7 @@ type AlertStateFilter = "active" | "resolved" | "any";
|
|
|
42
42
|
export const QueryAlertsTool: ObservabilityTool = {
|
|
43
43
|
name: "query_alerts",
|
|
44
44
|
description:
|
|
45
|
-
"Query alerts in this project with their current state and severity. To answer 'which alerts are active/firing right now?' pass state='active' — it returns every unresolved alert regardless of age (no time window unless createdWithinHours is passed explicitly). state='resolved' returns only resolved alerts; the default 'any' returns both, limited to the createdWithinHours window. Results are newest-first; the result reports the total match count — pass skip to page through more. Pass alertId to get full details of one alert, including its description and its owners (teams and users).",
|
|
45
|
+
"Query alerts in this project with their current state and severity. Every row also carries the monitor the alert was raised for, so counting rows by monitor answers 'which monitor or source is the noisiest?'. To answer 'which alerts are active/firing right now?' pass state='active' — it returns every unresolved alert regardless of age (no time window unless createdWithinHours is passed explicitly). state='resolved' returns only resolved alerts; the default 'any' returns both, limited to the createdWithinHours window. Results are newest-first; the result reports the total match count — pass skip to page through more. Pass alertId to get full details of one alert, including its description and its owners (teams and users).",
|
|
46
46
|
inputSchema: {
|
|
47
47
|
type: "object",
|
|
48
48
|
properties: {
|
|
@@ -97,6 +97,9 @@ export const QueryAlertsTool: ObservabilityTool = {
|
|
|
97
97
|
alertSeverity: {
|
|
98
98
|
name: true,
|
|
99
99
|
},
|
|
100
|
+
monitor: {
|
|
101
|
+
name: true,
|
|
102
|
+
},
|
|
100
103
|
},
|
|
101
104
|
props: ctx.props,
|
|
102
105
|
});
|
|
@@ -177,6 +180,7 @@ export const QueryAlertsTool: ObservabilityTool = {
|
|
|
177
180
|
description: alert.description,
|
|
178
181
|
state: alert.currentAlertState?.name,
|
|
179
182
|
severity: alert.alertSeverity?.name,
|
|
183
|
+
monitor: alert.monitor?.name,
|
|
180
184
|
createdAt: alert.createdAt,
|
|
181
185
|
ownerTeams: ownerTeamNames || undefined,
|
|
182
186
|
ownerUsers: ownerUserNames || undefined,
|
|
@@ -286,6 +290,15 @@ export const QueryAlertsTool: ObservabilityTool = {
|
|
|
286
290
|
alertSeverity: {
|
|
287
291
|
name: true,
|
|
288
292
|
},
|
|
293
|
+
/*
|
|
294
|
+
* The monitor an alert was raised for is what turns a list of alerts
|
|
295
|
+
* into "which source is noisiest" — the question the alerts page
|
|
296
|
+
* offers as a first-class suggested prompt. Without it the model can
|
|
297
|
+
* only guess a source from alert titles.
|
|
298
|
+
*/
|
|
299
|
+
monitor: {
|
|
300
|
+
name: true,
|
|
301
|
+
},
|
|
289
302
|
},
|
|
290
303
|
sort: {
|
|
291
304
|
createdAt: SortOrder.Descending,
|
|
@@ -309,6 +322,7 @@ export const QueryAlertsTool: ObservabilityTool = {
|
|
|
309
322
|
title: alert.title,
|
|
310
323
|
state: alert.currentAlertState?.name,
|
|
311
324
|
severity: alert.alertSeverity?.name,
|
|
325
|
+
monitor: alert.monitor?.name,
|
|
312
326
|
createdAt: alert.createdAt,
|
|
313
327
|
};
|
|
314
328
|
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import GlobalCache from "../../Infrastructure/GlobalCache";
|
|
2
|
+
import logger from "../Logger";
|
|
3
|
+
import OneUptimeDate from "../../../Types/Date";
|
|
4
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Why this file exists.
|
|
8
|
+
*
|
|
9
|
+
* The auto-recharge paths in NotificationService and AIBillingService run
|
|
10
|
+
* inline on every notification attempt, so when a card is declined they used
|
|
11
|
+
* to mail every project owner once per paging attempt - a genuine mail bomb
|
|
12
|
+
* arriving during the exact outage the pages were about.
|
|
13
|
+
*
|
|
14
|
+
* The obvious fix - gate the mail on the project's existing
|
|
15
|
+
* failed...NotificationSentToOwners boolean, which is only cleared by a
|
|
16
|
+
* SUCCESSFUL recharge - trades a storm for something worse: permanent silence.
|
|
17
|
+
* A project with no payment method mails once and latches; the owner adds a
|
|
18
|
+
* card; the card is declined; the recharge can therefore never succeed, so the
|
|
19
|
+
* latch can never clear, and the owner is never told the new card failed. SMS
|
|
20
|
+
* and voice paging simply stops working and nobody hears about it.
|
|
21
|
+
*
|
|
22
|
+
* So this is a WINDOW, not a latch. At most one failure notice per project per
|
|
23
|
+
* day, per kind of failure, and the window expires on its own whether or not
|
|
24
|
+
* anything is ever fixed. A storm collapses to one email a day; a new and
|
|
25
|
+
* newly-actionable failure is still reported within a day.
|
|
26
|
+
*
|
|
27
|
+
* It FAILS OPEN. If Redis is unreachable the notice is sent, which is the same
|
|
28
|
+
* behaviour the product had before any of this existed. Failing closed would
|
|
29
|
+
* mean a Redis blip could silently suppress "we cannot page anyone for you",
|
|
30
|
+
* and there is no worse thing for a monitoring product to lose.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
const BILLING_FAILURE_NOTICE_NAMESPACE: string = "billing-failure-notice";
|
|
34
|
+
|
|
35
|
+
export enum BillingFailureNoticeKind {
|
|
36
|
+
SmsAndCallRechargeFailed = "sms-and-call-recharge-failed",
|
|
37
|
+
AiCreditRechargeFailed = "ai-credit-recharge-failed",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ShouldSendBillingFailureNoticeFunction = (data: {
|
|
41
|
+
projectId: ObjectID;
|
|
42
|
+
kind: BillingFailureNoticeKind;
|
|
43
|
+
}) => Promise<boolean>;
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* Claims the day's window for this (project, kind). True means "you own it,
|
|
47
|
+
* send the email"; false means somebody already told them today.
|
|
48
|
+
*/
|
|
49
|
+
export const shouldSendBillingFailureNotice: ShouldSendBillingFailureNoticeFunction =
|
|
50
|
+
async (data: {
|
|
51
|
+
projectId: ObjectID;
|
|
52
|
+
kind: BillingFailureNoticeKind;
|
|
53
|
+
}): Promise<boolean> => {
|
|
54
|
+
const key: string = `${data.projectId.toString()}-${data.kind}`;
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
/*
|
|
58
|
+
* SET NX rather than read-then-write: several notification attempts
|
|
59
|
+
* failing at once is the normal case here, not the edge one, and a
|
|
60
|
+
* check-then-act would let every one of them decide it was first.
|
|
61
|
+
*/
|
|
62
|
+
return await GlobalCache.setStringIfNotExists(
|
|
63
|
+
BILLING_FAILURE_NOTICE_NAMESPACE,
|
|
64
|
+
key,
|
|
65
|
+
ObjectID.generate().toString(),
|
|
66
|
+
{
|
|
67
|
+
expiresInSeconds: OneUptimeDate.getSecondsInDays(1),
|
|
68
|
+
},
|
|
69
|
+
);
|
|
70
|
+
} catch (err) {
|
|
71
|
+
logger.warn(
|
|
72
|
+
`Billing failure notice throttle: the shared cache is unavailable, so the 24h window for project ${data.projectId.toString()} (${
|
|
73
|
+
data.kind
|
|
74
|
+
}) is not enforced. Sending, because a suppressed billing failure is worse than a duplicated one.`,
|
|
75
|
+
);
|
|
76
|
+
logger.warn(err);
|
|
77
|
+
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
DATA_SOURCE_MAX_RESPONSE_SIZE_IN_BYTES,
|
|
7
7
|
DATA_SOURCE_QUERY_TIMEOUT_IN_MS,
|
|
8
8
|
} from "../../../Types/DataSource/DataSourceLimits";
|
|
9
|
+
import OutboundUserAgent from "../OutboundUserAgent";
|
|
9
10
|
import DataSourceEgressGuard, { EgressGuardOptions } from "./EgressGuard";
|
|
10
11
|
import { DataSourceConnectionSettings } from "./Types";
|
|
11
12
|
|
|
@@ -20,7 +21,11 @@ import { DataSourceConnectionSettings } from "./Types";
|
|
|
20
21
|
* window while TLS still verifies against the original hostname;
|
|
21
22
|
* - refuses redirects (maxRedirects: 0) — a 3xx from the target could
|
|
22
23
|
* otherwise bounce the request to an unvalidated host;
|
|
23
|
-
* - caps response size and wall-clock time
|
|
24
|
+
* - caps response size and wall-clock time;
|
|
25
|
+
* - identifies itself with OneUptime's User-Agent unless the caller set
|
|
26
|
+
* one. Left to axios, every request would go out as `axios/<version>`,
|
|
27
|
+
* which WAFs and bot-management products block by default — a target
|
|
28
|
+
* that answers 403 to a bare library UA never gets to see the query.
|
|
24
29
|
*
|
|
25
30
|
* Uses axios directly (not Common/Utils/API.fetch) because the shared
|
|
26
31
|
* wrapper does not expose maxContentLength, and the response-size cap is a
|
|
@@ -99,7 +104,9 @@ export default class DataSourceHttpFetch {
|
|
|
99
104
|
request.egressOptions,
|
|
100
105
|
);
|
|
101
106
|
|
|
102
|
-
const headers: Dictionary<string> =
|
|
107
|
+
const headers: Dictionary<string> = OutboundUserAgent.withDefault(
|
|
108
|
+
request.headers,
|
|
109
|
+
);
|
|
103
110
|
|
|
104
111
|
let data: string | URLSearchParams | undefined = undefined;
|
|
105
112
|
if (request.method === "POST" && request.body !== undefined) {
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Every tuning knob the owner-email burst rollup has, in one file.
|
|
3
|
+
*
|
|
4
|
+
* The feature is a no-op below its threshold: a project that produces three
|
|
5
|
+
* owner emails a day keeps producing three owner emails a day, from the same
|
|
6
|
+
* code path and the same template. Only an address that is already being
|
|
7
|
+
* flooded sees a change. That property is entirely a function of the numbers
|
|
8
|
+
* below, which is why they live together rather than being scattered across
|
|
9
|
+
* the writer, the flush runner and the cron.
|
|
10
|
+
*
|
|
11
|
+
* A self-hoster who disagrees with any of these judgements changes behaviour
|
|
12
|
+
* with a one-line patch here, and cloud and self-hosted stay identical
|
|
13
|
+
* because there is no environment variable for the two to diverge on.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export const ROLLUP_JOB_NAME: string = "EmailRollup:FlushDueRollups";
|
|
17
|
+
export const ROLLUP_SWEEP_LOCK_NAMESPACE: string = "Workers.Cron";
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* The FIRST BURST_THRESHOLD rollup-eligible owner emails for one
|
|
21
|
+
* (project, user, address, category) inside BURST_WINDOW_MINUTES are sent
|
|
22
|
+
* immediately; the next one and everything after it is coalesced. Four is
|
|
23
|
+
* chosen so one incident's whole normal lifecycle (created -> acknowledged ->
|
|
24
|
+
* resolved) plus one more event stays immediate; the fifth event in ten
|
|
25
|
+
* minutes is where a human starts noticing.
|
|
26
|
+
*/
|
|
27
|
+
export const BURST_THRESHOLD: number = 4;
|
|
28
|
+
export const BURST_WINDOW_MINUTES: number = 10;
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* A deferred item is due once it is this old. Also the claim-epoch length,
|
|
32
|
+
* which is what makes "at most 12 rollups per hour per address" true rather
|
|
33
|
+
* than aspirational.
|
|
34
|
+
*
|
|
35
|
+
* CLAIM_EPOCH_MINUTES === FLUSH_AFTER_MINUTES is load-bearing. A bucket
|
|
36
|
+
* becomes due only when its oldest pending item is FLUSH_AFTER_MINUTES old,
|
|
37
|
+
* and a flush stamps every pending row for the bucket, so a legitimate
|
|
38
|
+
* consecutive flush of the same bucket is always at least FLUSH_AFTER_MINUTES
|
|
39
|
+
* after the previous one and therefore always lands in a LATER epoch. The
|
|
40
|
+
* unique index on the batch table never blocks a legitimate flush, and it
|
|
41
|
+
* hard-caps a bucket at 60 / CLAIM_EPOCH_MINUTES flushes per hour. Pull the
|
|
42
|
+
* two numbers apart and one of those two guarantees breaks.
|
|
43
|
+
*/
|
|
44
|
+
export const FLUSH_AFTER_MINUTES: number = 5;
|
|
45
|
+
export const CLAIM_EPOCH_MINUTES: number = 5;
|
|
46
|
+
|
|
47
|
+
export const MAX_ITEMS_PER_ROLLUP: number = 500; // claimed + stamped per flush
|
|
48
|
+
export const MAX_ROWS_IN_ROLLUP: number = 100; // folded rows rendered
|
|
49
|
+
export const MAX_ITEMS_SCANNED_PER_TICK: number = 5000;
|
|
50
|
+
export const MAX_BUCKETS_PER_TICK: number = 50;
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* How many pages of MAX_ITEMS_SCANNED_PER_TICK the sweep will read looking for
|
|
54
|
+
* distinct recipients before giving up for this tick.
|
|
55
|
+
*
|
|
56
|
+
* One page is not enough. The scan is ordered oldest-first, so a single
|
|
57
|
+
* recipient with more pending items than one page can fill it entirely, and
|
|
58
|
+
* every other tenant's due rollup would then be invisible for as long as that
|
|
59
|
+
* saturation lasted. Paging past a hog costs a handful of indexed reads in a
|
|
60
|
+
* case that should never happen, and removes the possibility that one project
|
|
61
|
+
* stalls the whole fleet.
|
|
62
|
+
*/
|
|
63
|
+
export const MAX_DISCOVERY_PAGES_PER_TICK: number = 4;
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
* A hard ceiling on one rollup send.
|
|
67
|
+
*
|
|
68
|
+
* MailService.sendMail is an HTTP POST to the notification service with no
|
|
69
|
+
* timeout of its own, so a hung connection would hang this await forever. That
|
|
70
|
+
* matters more here than anywhere else the product sends mail, because the
|
|
71
|
+
* sweep holds a Redis mutex whose lock is auto-refreshed while it is held: a
|
|
72
|
+
* single wedged send would therefore stop EVERY replica from flushing ANY
|
|
73
|
+
* recipient's rollup, indefinitely, while the queue behind it grew and its
|
|
74
|
+
* oldest rows aged out of retention unsent. One minute is far longer than a
|
|
75
|
+
* healthy send and far shorter than the sweep's budget.
|
|
76
|
+
*/
|
|
77
|
+
export const ROLLUP_SEND_TIMEOUT_MS: number = 60 * 1000;
|
|
78
|
+
|
|
79
|
+
export const ROLLUP_SWEEP_BUDGET_MS: number = 3 * 60 * 1000;
|
|
80
|
+
export const ROLLUP_JOB_TIMEOUT_MS: number = 4 * 60 * 1000; // below JobDictionary's 5-min default
|
|
81
|
+
export const ROLLUP_SWEEP_LOCK_TIMEOUT_MS: number = 5 * 60 * 1000; // outlives the job timeout
|
|
82
|
+
export const ROLLUP_ITEM_RETENTION_DAYS: number = 7;
|
|
83
|
+
export const ROLLUP_BATCH_RETENTION_DAYS: number = 30;
|
|
84
|
+
export const ROLLUP_SUBJECT_MAX_LENGTH: number = 500; // ColumnLength.LongText
|
|
85
|
+
export const ROLLUP_SUBJECT_LEAD_TITLE_MAX: number = 80;
|
|
86
|
+
export const ROLLUP_PROJECT_NAME_MAX: number = 60;
|
|
87
|
+
|
|
88
|
+
/*
|
|
89
|
+
* How many category counts the SUBJECT line spells out before it gives up and
|
|
90
|
+
* says "+N more".
|
|
91
|
+
*
|
|
92
|
+
* A subject is read in a list, at a glance, and most clients show somewhere
|
|
93
|
+
* around 60-90 characters of it. "12 notifications" alone says nothing about
|
|
94
|
+
* whether this is a probe flapping or production burning, and all eleven
|
|
95
|
+
* categories would be truncated by the client at a point this code does not
|
|
96
|
+
* control. Three is what fits after the project name and the count.
|
|
97
|
+
*/
|
|
98
|
+
export const ROLLUP_SUBJECT_MAX_CATEGORIES: number = 3;
|