@oneuptime/common 14.0.2 → 14.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/Alert.ts +55 -0
- package/Models/DatabaseModels/AlertFeed.ts +2 -0
- package/Models/DatabaseModels/DatabaseServer.ts +1650 -0
- package/Models/DatabaseModels/DatabaseServerEndpoint.ts +540 -0
- package/Models/DatabaseModels/DatabaseServerFeed.ts +625 -0
- package/Models/DatabaseModels/DatabaseServerLabelRule.ts +514 -0
- package/Models/DatabaseModels/DatabaseServerOwnerRule.ts +596 -0
- package/Models/DatabaseModels/DatabaseServerOwnerTeam.ts +491 -0
- package/Models/DatabaseModels/DatabaseServerOwnerUser.ts +490 -0
- package/Models/DatabaseModels/Incident.ts +55 -0
- package/Models/DatabaseModels/IncidentAlert.ts +540 -0
- package/Models/DatabaseModels/IncidentFeed.ts +2 -0
- package/Models/DatabaseModels/Index.ts +18 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +26 -0
- package/Models/DatabaseModels/Project.ts +60 -0
- package/Models/DatabaseModels/RumApplication.ts +52 -1
- package/Models/DatabaseModels/ScheduledMaintenance.ts +55 -0
- package/Models/DatabaseModels/TelemetryException.ts +2 -0
- package/Models/DatabaseModels/UserProjectSsoConsent.ts +146 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1794800000000-AddSessionReplaySameOriginTracePropagation.ts +28 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1794900000000-AddIncidentAlert.ts +89 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795000000000-AddDatabaseServerTables.ts +673 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795100000000-AddUserProjectSsoConsent.ts +51 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
- package/Server/Middleware/MultipartFormData.ts +1 -1
- package/Server/Middleware/TelemetryIngest.ts +15 -8
- package/Server/Services/AlertReminderRuleService.ts +100 -24
- package/Server/Services/DatabaseServerEndpointService.ts +895 -0
- package/Server/Services/DatabaseServerFeedService.ts +128 -0
- package/Server/Services/DatabaseServerLabelRuleEngineService.ts +340 -0
- package/Server/Services/DatabaseServerLabelRuleService.ts +14 -0
- package/Server/Services/DatabaseServerOwnerRuleEngineService.ts +425 -0
- package/Server/Services/DatabaseServerOwnerRuleService.ts +14 -0
- package/Server/Services/DatabaseServerOwnerTeamService.ts +180 -0
- package/Server/Services/DatabaseServerOwnerUserService.ts +173 -0
- package/Server/Services/DatabaseServerService.ts +4546 -0
- package/Server/Services/DatabaseService.ts +14 -8
- package/Server/Services/DockerResourceService.ts +43 -2
- package/Server/Services/IncidentAlertService.ts +1811 -0
- package/Server/Services/IncidentReminderRuleService.ts +103 -23
- package/Server/Services/IncidentService.ts +210 -10
- package/Server/Services/IncidentStateTimelineService.ts +24 -0
- package/Server/Services/Index.ts +18 -0
- package/Server/Services/InventoryItemService.ts +113 -5
- package/Server/Services/IoTDeviceService.ts +145 -37
- package/Server/Services/OpenTelemetryIngestService.ts +19 -0
- package/Server/Services/PodmanResourceService.ts +43 -2
- package/Server/Services/ScheduledMaintenanceReminderRuleService.ts +107 -23
- package/Server/Services/ServiceService.ts +1 -1
- package/Server/Services/TelemetryUsageBillingService.ts +29 -2
- package/Server/Services/UserProjectSsoConsentService.ts +74 -0
- package/Server/Services/UserService.ts +14 -1
- package/Server/Types/Database/Permissions/OwnerTableRegistry.ts +18 -0
- package/Server/Types/Database/QueryHelper.ts +30 -1
- package/Server/Utils/AI/Toolbox/ResourceTools.ts +69 -1
- package/Server/Utils/Database/AffectedResourceRelations.ts +6 -0
- package/Server/Utils/Monitor/Criteria/MetricMonitorCriteria.ts +188 -6
- package/Server/Utils/Monitor/MonitorAlert.ts +28 -1
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +2262 -755
- package/Server/Utils/Monitor/MonitorIncident.ts +28 -1
- package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +268 -6
- package/Server/Utils/Monitor/MonitorResource.ts +47 -11
- package/Server/Utils/Monitor/MonitorResourceContext.ts +1 -0
- package/Server/Utils/Monitor/MonitorStepResourceIdentity.ts +239 -21
- package/Server/Utils/Monitor/PerSeriesResolutionRootCause.ts +43 -0
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +291 -0
- package/Server/Utils/Monitor/SeriesResourceLinker.ts +111 -12
- package/Server/Utils/Rules/RuleRun/RuleRunRegistry.ts +25 -0
- package/Server/Utils/SessionReplay/SessionReplayGateCache.ts +24 -2
- package/Server/Utils/StartServer.ts +26 -6
- package/Server/Utils/TeamMember/ProjectLeaveResourceCleanup.ts +2 -0
- package/Server/Utils/Telemetry/DatabaseEndpointDiscovery.ts +688 -0
- package/Server/Utils/Telemetry/EntityRegistry.ts +5 -1
- package/Server/Utils/Telemetry/LogExceptionExtractor.ts +18 -1
- package/Server/Utils/Telemetry/ResourceEntityFilter.ts +175 -12
- package/Server/Utils/Telemetry/ResourceFacetResolver.ts +12 -0
- package/Server/Utils/Telemetry/ServiceDependencyDiscovery.ts +606 -36
- package/Server/Utils/Telemetry/Telemetry.ts +16 -0
- package/Server/Utils/Telemetry/TelemetryEntity.ts +22 -22
- package/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.ts +16 -10
- package/Tests/App/Accounts/SignedInRedirect.test.tsx +241 -0
- package/Tests/App/AdminDashboard/AdminHeaderSmallScreens.test.tsx +221 -4
- package/Tests/App/Dashboard/AIInsightsResourcePageContext.test.ts +42 -0
- package/Tests/App/Dashboard/AffectedResourcesDisplay.test.tsx +100 -0
- package/Tests/App/Dashboard/AffectedResourcesPicker.test.tsx +86 -0
- package/Tests/App/Dashboard/AffectedResourcesPickerHiddenTypes.test.tsx +2 -0
- package/Tests/App/Dashboard/AffectedResourcesSummaryStep.test.tsx +19 -0
- package/Tests/App/Dashboard/BreadcrumbCoverage.test.tsx +14 -0
- package/Tests/App/Dashboard/BulkIncidentLinkActions.test.tsx +869 -0
- package/Tests/App/Dashboard/CephMetricTooltips.test.tsx +1777 -0
- package/Tests/App/Dashboard/CloudFleetSummary.test.ts +8 -0
- package/Tests/App/Dashboard/CloudMetricTooltips.test.tsx +887 -0
- package/Tests/App/Dashboard/ContainerHostMetricTooltips.test.tsx +1309 -0
- package/Tests/App/Dashboard/CorrelateFilterBuilder.test.tsx +26 -1
- package/Tests/App/Dashboard/DashboardAppSsoError.test.tsx +501 -0
- package/Tests/App/Dashboard/DashboardHeaderRequests.test.tsx +64 -1
- package/Tests/App/Dashboard/DashboardHeaderSmallScreens.test.tsx +178 -18
- package/Tests/App/Dashboard/DashboardMasterPageSsoRedirect.test.tsx +444 -0
- package/Tests/App/Dashboard/DashboardNavBarForeignHiddenRule.test.tsx +573 -0
- package/Tests/App/Dashboard/DatabaseChartAxes.test.tsx +431 -0
- package/Tests/App/Dashboard/DatabaseContainerDetailBadge.test.tsx +249 -0
- package/Tests/App/Dashboard/DatabaseDashboardE2EFixes.test.ts +681 -0
- package/Tests/App/Dashboard/DatabaseDocumentationMarkdown.test.ts +1801 -0
- package/Tests/App/Dashboard/DatabaseFleetSummaryRefresh.test.tsx +280 -0
- package/Tests/App/Dashboard/DatabaseFormHelpers.test.tsx +321 -0
- package/Tests/App/Dashboard/DatabaseMetricMonitorLink.test.tsx +795 -0
- package/Tests/App/Dashboard/DatabaseOverviewHeader.test.tsx +580 -0
- package/Tests/App/Dashboard/DatabaseRecommendationsEngineMetrics.test.ts +270 -0
- package/Tests/App/Dashboard/DatabaseServerComponents.test.tsx +1486 -0
- package/Tests/App/Dashboard/DatabaseServerEngineMetricsFilter.test.ts +223 -0
- package/Tests/App/Dashboard/DatabaseServerPresentation.test.ts +435 -0
- package/Tests/App/Dashboard/DatabaseServerSummary.test.ts +186 -0
- package/Tests/App/Dashboard/DatabaseServerTelemetryQueries.test.ts +1553 -0
- package/Tests/App/Dashboard/DatabaseTableTruncation.test.tsx +326 -0
- package/Tests/App/Dashboard/DatabaseTelemetryScope.test.ts +512 -0
- package/Tests/App/Dashboard/DatabaseTelemetryTabs.test.tsx +774 -0
- package/Tests/App/Dashboard/DatabaseViewLayout.test.tsx +233 -0
- package/Tests/App/Dashboard/DatabaseWorkloadBadge.test.tsx +972 -0
- package/Tests/App/Dashboard/DiscoveryReviewInventoryRefresh.test.tsx +5 -0
- package/Tests/App/Dashboard/DiscoveryReviewUnnamedHostHint.test.tsx +1061 -0
- package/Tests/App/Dashboard/DiscoveryScanLivePage.test.tsx +39 -0
- package/Tests/App/Dashboard/DockerSwarmClustersListTooltips.test.tsx +414 -0
- package/Tests/App/Dashboard/DockerSwarmMetricTooltips.test.ts +796 -0
- package/Tests/App/Dashboard/DockerSwarmOverviewTooltips.test.tsx +747 -0
- package/Tests/App/Dashboard/EventOverlayScope.test.ts +147 -0
- package/Tests/App/Dashboard/EventOverlayScopeHook.test.tsx +1 -0
- package/Tests/App/Dashboard/ExceptionMonitorEnvironmentFilter.test.tsx +38 -18
- package/Tests/App/Dashboard/HostDetailViewTooltips.test.tsx +725 -0
- package/Tests/App/Dashboard/HostListColumnTooltips.test.tsx +472 -0
- package/Tests/App/Dashboard/HostMetricTooltips.test.ts +709 -0
- package/Tests/App/Dashboard/HostOverviewTooltips.test.tsx +698 -0
- package/Tests/App/Dashboard/HostTooltipHarness.ts +124 -0
- package/Tests/App/Dashboard/HostsListTooltips.test.tsx +395 -0
- package/Tests/App/Dashboard/IncidentAlertLinkDialog.test.tsx +691 -0
- package/Tests/App/Dashboard/IncidentAlertLinkHelpers.test.ts +458 -0
- package/Tests/App/Dashboard/IncidentAlertLinkPages.test.tsx +828 -0
- package/Tests/App/Dashboard/IncidentAlertLinkSideMenus.test.tsx +231 -0
- package/Tests/App/Dashboard/IncidentCreateFromAlerts.test.tsx +689 -0
- package/Tests/App/Dashboard/IoTMetricTooltips.test.tsx +1123 -0
- package/Tests/App/Dashboard/KubernetesClusterMetricTooltips.test.ts +837 -0
- package/Tests/App/Dashboard/KubernetesClusterOverviewTooltips.test.tsx +699 -0
- package/Tests/App/Dashboard/KubernetesContainersTabTooltips.test.tsx +320 -0
- package/Tests/App/Dashboard/KubernetesCostTooltips.test.tsx +502 -0
- package/Tests/App/Dashboard/KubernetesInsightsTooltips.test.tsx +222 -0
- package/Tests/App/Dashboard/KubernetesResourceMetricTooltips.test.ts +561 -0
- package/Tests/App/Dashboard/KubernetesResourcePagesTooltips.test.tsx +1168 -0
- package/Tests/App/Dashboard/LinkIncidentAlertModal.test.tsx +154 -0
- package/Tests/App/Dashboard/LogsResourceFacetChips.test.tsx +1 -0
- package/Tests/App/Dashboard/MetricDescriptionRules.ts +170 -0
- package/Tests/App/Dashboard/MetricDescriptionsCatalog.test.ts +206 -0
- package/Tests/App/Dashboard/MetricDescriptionsConsistency.test.ts +275 -0
- package/Tests/App/Dashboard/MetricsViewerDrillDown.test.tsx +310 -0
- package/Tests/App/Dashboard/MetricsViewerEntityScopedRows.test.tsx +495 -0
- package/Tests/App/Dashboard/MonitorCreateFromMonitorBackedDevice.test.tsx +132 -1
- package/Tests/App/Dashboard/NavigationSearchKeywords.test.tsx +5 -0
- package/Tests/App/Dashboard/NetworkDeviceTooltips.test.tsx +852 -0
- package/Tests/App/Dashboard/NetworkDiagnosticsTooltips.test.tsx +556 -0
- package/Tests/App/Dashboard/NetworkMetricTooltips.test.ts +1348 -0
- package/Tests/App/Dashboard/NetworkSiteTooltips.test.tsx +679 -0
- package/Tests/App/Dashboard/ProductOrientation.test.tsx +4 -3
- package/Tests/App/Dashboard/ProxmoxMetricTooltips.test.ts +592 -0
- package/Tests/App/Dashboard/ProxmoxOverviewTooltips.test.tsx +1002 -0
- package/Tests/App/Dashboard/ProxmoxResourcePageTooltips.test.tsx +923 -0
- package/Tests/App/Dashboard/RecommendationsLoadedContext.test.tsx +349 -0
- package/Tests/App/Dashboard/ResourceArchiveSettings.test.tsx +62 -0
- package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +8 -1
- package/Tests/App/Dashboard/ResourceFeedPagesFilterSort.test.tsx +14 -0
- package/Tests/App/Dashboard/ResourceOverviewTileTooltips.test.tsx +1066 -0
- package/Tests/App/Dashboard/RumOverviewPage.test.tsx +1195 -0
- package/Tests/App/Dashboard/ScheduledMaintenanceOverviewPage.test.tsx +2 -0
- package/Tests/App/Dashboard/ServerlessMetricTooltips.test.tsx +474 -0
- package/Tests/App/Dashboard/ServiceMapDatabaseLink.test.tsx +1085 -0
- package/Tests/App/Dashboard/ServiceMetricTooltips.test.tsx +772 -0
- package/Tests/App/Dashboard/SessionReplayAuditTable.test.tsx +56 -1
- package/Tests/App/Dashboard/TelemetryMetricsSignals.test.ts +1207 -0
- package/Tests/App/Dashboard/TelemetryResourceRetentionSettings.test.tsx +10 -0
- package/Tests/App/Dashboard/TelemetryResourceTabTooltips.test.tsx +437 -0
- package/Tests/App/Dashboard/TracesResourceFacets.test.tsx +2 -1
- package/Tests/App/Dashboard/VMwareMetricTooltips.test.ts +801 -0
- package/Tests/App/Dashboard/VMwareOverviewTooltips.test.tsx +601 -0
- package/Tests/App/Dashboard/VMwareResourcePagesTooltips.test.tsx +646 -0
- package/Tests/App/Dashboard/VMwareTooltipHarness.ts +145 -0
- package/Tests/App/StatusPage/StatusPageHeaderForeignHiddenRule.test.tsx +284 -0
- package/Tests/ClassStrings.ts +178 -0
- package/Tests/Fixtures/MobilePasskeyUser.json +1 -2
- package/Tests/ForeignHiddenRuleGuard.ts +2152 -0
- package/Tests/Models/DatabaseModels/DatabaseServerModels.test.ts +2250 -0
- package/Tests/Models/DatabaseModels/IncidentAlertModel.test.ts +554 -0
- package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +24 -5
- package/Tests/Models/DatabaseModels/SessionReplayModels.test.ts +117 -0
- package/Tests/Models/DatabaseModels/StaticRuleCriteriaInheritance.test.ts +4 -2
- package/Tests/RenderedMarkup.ts +518 -0
- package/Tests/ResponsiveVisibility.test.ts +490 -4
- package/Tests/ResponsiveVisibility.ts +505 -52
- package/Tests/Server/Infrastructure/Postgres/AddConfigurableRuleCriteriaMigration.test.ts +3 -0
- package/Tests/Server/Infrastructure/Postgres/AddDatabaseServerTablesMigration.test.ts +541 -0
- package/Tests/Server/Infrastructure/Postgres/AddIncidentAlertMigration.test.ts +341 -0
- package/Tests/Server/Infrastructure/Postgres/AddSessionReplaySameOriginTracePropagationMigration.test.ts +247 -0
- package/Tests/Server/Infrastructure/Postgres/AddUserProjectSsoConsentMigration.test.ts +234 -0
- package/Tests/Server/Services/ContainerSnapshotUpsertPostgres.test.ts +319 -0
- package/Tests/Server/Services/CrossProjectRelationWriteGuard.test.ts +13 -0
- package/Tests/Server/Services/DatabaseServerEndpointService.test.ts +2033 -0
- package/Tests/Server/Services/DatabaseServerFeedAndOwnerServices.test.ts +529 -0
- package/Tests/Server/Services/DatabaseServerLifecycle.test.ts +3302 -0
- package/Tests/Server/Services/DatabaseServerRegistries.test.ts +603 -0
- package/Tests/Server/Services/DatabaseServerRuleEngines.test.ts +754 -0
- package/Tests/Server/Services/DatabaseServerService.test.ts +3558 -0
- package/Tests/Server/Services/DatabaseServerSqlPostgres.test.ts +2045 -0
- package/Tests/Server/Services/DatabaseServiceUpdateColumnsIfUnlockedPostgres.test.ts +362 -0
- package/Tests/Server/Services/DatabaseServiceUpdateColumnsIfUnlockedReply.test.ts +210 -0
- package/Tests/Server/Services/HookFreeWriteLengthClamp.test.ts +18 -0
- package/Tests/Server/Services/IncidentAlertPostgres.test.ts +903 -0
- package/Tests/Server/Services/IncidentAlertRegistration.test.ts +96 -0
- package/Tests/Server/Services/IncidentAlertService.test.ts +2225 -0
- package/Tests/Server/Services/IncidentAlertSloLinkSurvivesEdit.test.ts +2 -0
- package/Tests/Server/Services/IncidentAlertStateCascade.test.ts +970 -0
- package/Tests/Server/Services/IncidentCreateFromAlerts.test.ts +1284 -0
- package/Tests/Server/Services/IncomingCallPolicyEscalationRuleTarget.test.ts +225 -0
- package/Tests/Server/Services/InventoryItemDisplayName.test.ts +280 -2
- package/Tests/Server/Services/InventoryUpsertSchemaParity.test.ts +8 -2
- package/Tests/Server/Services/IoTDeviceLatestMetricsPostgres.test.ts +689 -0
- package/Tests/Server/Services/IoTDeviceService.test.ts +379 -0
- package/Tests/Server/Services/LatestMetricsValuesShape.test.ts +360 -0
- package/Tests/Server/Services/LlmModelPriceService.test.ts +402 -0
- package/Tests/Server/Services/OpenTelemetryResourceRetentionMemo.test.ts +7 -1
- package/Tests/Server/Services/OwnerRowUniqueness.test.ts +61 -9
- package/Tests/Server/Services/ReminderRuleLookupPostgres.test.ts +2250 -0
- package/Tests/Server/Services/ReminderRuleRefreshOpenSubjectsPaging.test.ts +653 -0
- package/Tests/Server/Services/ResourceUpdateLastSeenLivenessFallback.test.ts +68 -20
- package/Tests/Server/Services/StaticRuleCriteriaRuntimeCoverage.test.ts +3 -3
- package/Tests/Server/Services/TelemetryResourceFacetCounting.test.ts +9 -0
- package/Tests/Server/Services/UserProjectSsoConsentPostgres.test.ts +153 -0
- package/Tests/Server/Services/UserProjectSsoConsentService.test.ts +192 -0
- package/Tests/Server/Services/UserServiceFirstMasterAdminElection.test.ts +71 -0
- package/Tests/Server/Services/UserSignupIdTakeoverPostgres.test.ts +238 -0
- package/Tests/Server/Services/WorkspaceNotificationSummaryHelpers.test.ts +592 -0
- package/Tests/Server/Types/Billing/PayAsYouGoMeteredAuthorization.test.ts +3 -0
- package/Tests/Server/Types/Database/EventOverlayScopePostgres.test.ts +1 -0
- package/Tests/Server/Types/Database/FeedEventTypeFilterQuery.test.ts +11 -0
- package/Tests/Server/Types/Database/Permissions/InfrastructureOwnershipScope.test.ts +8 -0
- package/Tests/Server/Types/Database/QueryHelperBooleanForCriteriaBackedRule.test.ts +1094 -0
- package/Tests/Server/Utils/AI/ResourceTools.test.ts +134 -0
- package/Tests/Server/Utils/Monitor/Criteria/MetricMonitorCriteria.test.ts +41 -0
- package/Tests/Server/Utils/Monitor/Criteria/MetricMonitorCriteriaAnomalyUnits.test.ts +279 -9
- package/Tests/Server/Utils/Monitor/Criteria/MetricMonitorCriteriaDisplayContext.test.ts +933 -0
- package/Tests/Server/Utils/Monitor/DatabaseMaintenanceSuppression.test.ts +582 -0
- package/Tests/Server/Utils/Monitor/DatabaseServerMonitorLinking.test.ts +753 -0
- package/Tests/Server/Utils/Monitor/MonitorActionTimestamps.test.ts +1 -0
- package/Tests/Server/Utils/Monitor/MonitorAlertCriteriaReferences.test.ts +1 -0
- package/Tests/Server/Utils/Monitor/MonitorAlertResourceLinking.test.ts +119 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluator.test.ts +60 -25
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorAffectedResourceEdgeCases.test.ts +1719 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorKubernetesAffectedResources.test.ts +1447 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorKubernetesRatioEmail.test.ts +352 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPlatformMetricUnits.test.ts +717 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPlatformRawScan.test.ts +2125 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPlatformSeriesAffectedResources.test.ts +1288 -0
- package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +1 -0
- package/Tests/Server/Utils/Monitor/MonitorIncidentCriteriaReferences.test.ts +1 -0
- package/Tests/Server/Utils/Monitor/MonitorIncidentMemberRoleMembership.test.ts +1 -0
- package/Tests/Server/Utils/Monitor/MonitorIncidentResourceLinking.test.ts +88 -0
- package/Tests/Server/Utils/Monitor/MonitorMaintenanceSuppression.test.ts +205 -0
- package/Tests/Server/Utils/Monitor/MonitorResourceContext.test.ts +62 -0
- package/Tests/Server/Utils/Monitor/MonitorResourceDatabaseMaintenance.test.ts +803 -0
- package/Tests/Server/Utils/Monitor/MonitorStepResourceIdentity.test.ts +133 -3
- package/Tests/Server/Utils/Monitor/MonitorSummaryPersistence.test.ts +1 -0
- package/Tests/Server/Utils/Monitor/PerSeriesRecoveryResolution.test.ts +472 -1
- package/Tests/Server/Utils/Monitor/PerSeriesSecondEntityAlerting.test.ts +1 -0
- package/Tests/Server/Utils/Monitor/SeriesResourceLinker.test.ts +236 -2
- package/Tests/Server/Utils/SeriesResourceLabels.test.ts +70 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayGateCachePolicy.test.ts +103 -0
- package/Tests/Server/Utils/StartServerProtobufContentType.test.ts +54 -0
- package/Tests/Server/Utils/Telemetry/DatabaseEndpointDiscovery.test.ts +1895 -0
- package/Tests/Server/Utils/Telemetry/EntityRegistry.test.ts +7 -0
- package/Tests/Server/Utils/Telemetry/LogExceptionExtractorSeverityGate.test.ts +90 -0
- package/Tests/Server/Utils/Telemetry/ResourceEntityFilter.test.ts +570 -0
- package/Tests/Server/Utils/Telemetry/ResourceFacetResolver.test.ts +97 -2
- package/Tests/Server/Utils/Telemetry/ServiceDependencyDiscovery.test.ts +1337 -0
- package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +295 -0
- package/Tests/Types/AI/AIResourceContext.test.ts +30 -0
- package/Tests/Types/DatabaseServer/DatabaseContainerClassifier.test.ts +3644 -0
- package/Tests/Types/DatabaseServer/DatabaseContainerCommand.test.ts +340 -0
- package/Tests/Types/DatabaseServer/DatabaseContainerCommandCorpus.ts +826 -0
- package/Tests/Types/DatabaseServer/DatabaseContainerCommandPostgres.test.ts +150 -0
- package/Tests/Types/DatabaseServer/DatabaseEndpoint.test.ts +2657 -0
- package/Tests/Types/DatabaseServer/DatabaseServerDiscoverySource.test.ts +64 -0
- package/Tests/Types/DatabaseServer/DatabaseServerEntityKeys.test.ts +952 -0
- package/Tests/Types/DatabaseServer/DatabaseServerMetricCatalog.test.ts +1161 -0
- package/Tests/Types/DatabaseServer/DatabaseSystem.test.ts +1514 -0
- package/Tests/Types/DatabaseServer/DatabaseTelemetryResolver.test.ts +1558 -0
- package/Tests/Types/Monitor/CephAlertTemplates.test.ts +255 -6
- package/Tests/Types/Monitor/DatabaseAlertTemplates.test.ts +2254 -0
- package/Tests/Types/Monitor/KubernetesAlertTemplates.test.ts +298 -0
- package/Tests/Types/Monitor/KubernetesMetricCatalog.test.ts +271 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCatalog.test.ts +253 -9
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCoverage.test.ts +13 -5
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationNotificationMode.test.ts +4 -2
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationUtil.test.ts +111 -2
- package/Tests/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.test.ts +61 -0
- package/Tests/Types/Monitor/SeriesContext/SeriesLabelDisplay.test.ts +114 -0
- package/Tests/Types/Monitor/Utils/KubernetesAgentEmittedMetrics.ts +181 -0
- package/Tests/Types/NetworkDevice/DiscoveredHostNamingStatus.test.ts +401 -0
- package/Tests/Types/Rum/WebVitals.test.ts +173 -0
- package/Tests/Types/Telemetry/ResourceEntityFacet.test.ts +4 -1
- package/Tests/Types/Telemetry/ResourceFacetCatalog.test.ts +24 -2
- package/Tests/UI/Components/Card.test.tsx +93 -2
- package/Tests/UI/Components/FeedOptions.test.ts +6 -0
- package/Tests/UI/Components/FeedOptionsButton.test.tsx +8 -1
- package/Tests/UI/Components/FieldLabelInfoCardTooltip.test.tsx +413 -0
- package/Tests/UI/Components/ForeignHiddenRuleResilience.test.tsx +1147 -0
- package/Tests/UI/Components/HeaderRightRail.test.tsx +41 -1
- package/Tests/UI/Components/InfoTooltip.test.tsx +242 -0
- package/Tests/UI/Components/LogsEntityNames.test.ts +16 -1
- package/Tests/UI/Components/LogsFacetSidebarHiddenFacets.test.tsx +7 -3
- package/Tests/UI/Components/ModelTable/BaseModelTableBulkDelete.test.tsx +207 -3
- package/Tests/UI/Components/ModelTable/BaseModelTableBulkDeleteVerb.test.tsx +367 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableCreateButtonTitle.test.tsx +275 -0
- package/Tests/UI/Components/ResourceFacetConfigs.test.ts +2 -1
- package/Tests/UI/Components/RuleCriteria/RuleCriteriaModelTable.test.tsx +3 -3
- package/Tests/UI/Components/SrOnlyForeignRule.test.tsx +994 -0
- package/Tests/UI/Components/StatusPage/ResourceListSelection.test.tsx +34 -1
- package/Tests/UI/Components/TableHeaderTooltip.test.tsx +662 -0
- package/Tests/UI/Components/TelemetryFacetSidebarHiddenFacets.test.tsx +4 -1
- package/Tests/UI/ForeignHiddenRuleGuard.test.ts +1951 -0
- package/Tests/UI/Rum/PrivacySummaryCard.test.tsx +166 -9
- package/Tests/UI/Rum/RecordingHealthTooltips.test.tsx +447 -0
- package/Tests/UI/Rum/ReplayCorrelationPanel.test.tsx +164 -0
- package/Tests/UI/Rum/ReplayFrameCapture.test.ts +6750 -0
- package/Tests/UI/Rum/ReplayPlayerChrome.test.tsx +19 -1
- package/Tests/UI/Rum/ReplayRail.test.tsx +723 -12
- package/Tests/UI/Rum/ReplayRailDetail.test.tsx +86 -0
- package/Tests/UI/Rum/ReplayScreenshot.test.ts +2124 -0
- package/Tests/UI/Rum/ReplayScreenshotActions.test.tsx +3288 -0
- package/Tests/UI/Rum/ReplayStage.test.tsx +62 -0
- package/Tests/UI/Rum/ReplayStageOverlays.test.tsx +983 -2
- package/Tests/UI/Rum/ReplayTabSwitcher.test.tsx +19 -1
- package/Tests/UI/Rum/SessionReplaySettingsPolicyLoading.test.tsx +149 -0
- package/Tests/UI/Rum/SessionReplaySetupGuide.test.tsx +107 -6
- package/Tests/UI/Rum/SessionReplayUsersTableTooltips.test.tsx +330 -0
- package/Tests/UI/Rum/UserFlowTooltips.test.tsx +886 -0
- package/Tests/UI/TailwindPlayCdnForeignHiddenRule.test.ts +1005 -0
- package/Tests/UI/ThemeGroupHoverReveal.test.ts +847 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +80 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +23 -0
- package/Tests/UI/Utils/ModelAPISsoRedirect.test.ts +127 -0
- package/Tests/UI/Utils/Navigation.test.ts +102 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +76 -0
- package/Tests/UI/Utils/Telemetry/TelemetryEntityNames.test.ts +23 -0
- package/Tests/Utils/Incident/IncidentFromAlerts.test.ts +696 -0
- package/Tests/Utils/LabelRuleImportExport.test.ts +5 -0
- package/Tests/Utils/MetricUnitUtil.test.ts +227 -2
- package/Tests/Utils/Monitor/MetricValueFormatter.test.ts +288 -2
- package/Tests/Utils/Monitor/PlatformResourceIdentityAndUnits.test.ts +1559 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredHostNamingDiagnosis.test.ts +2546 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredHostUtil.test.ts +315 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveryReverseDnsChain.test.ts +336 -1
- package/Tests/Utils/NetworkDiscovery/NetbiosNameUtil.test.ts +244 -0
- package/Tests/Utils/Rum/SessionTraceState.test.ts +239 -0
- package/Tests/Utils/ValueFormatter.test.ts +50 -0
- package/Tests/tsconfig.json +16 -0
- package/Types/AI/AIResourceContext.ts +7 -0
- package/Types/Dashboard/DashboardTemplates.ts +2 -1
- package/Types/DatabaseServer/DatabaseConnectionSpan.ts +77 -0
- package/Types/DatabaseServer/DatabaseContainerClassifier.ts +2068 -0
- package/Types/DatabaseServer/DatabaseContainerCommand.ts +801 -0
- package/Types/DatabaseServer/DatabaseEndpoint.ts +1943 -0
- package/Types/DatabaseServer/DatabaseServerDiscoverySource.ts +68 -0
- package/Types/DatabaseServer/DatabaseServerMetricCatalog.ts +966 -0
- package/Types/DatabaseServer/DatabaseSystem.ts +2124 -0
- package/Types/DatabaseServer/DatabaseTelemetryResolver.ts +555 -0
- package/Types/Email/EmailTemplateType.ts +1 -0
- package/Types/Incident/IncidentAlertLink.ts +38 -0
- package/Types/Monitor/CephAlertTemplates.ts +18 -0
- package/Types/Monitor/DatabaseAlertTemplates.ts +2020 -0
- package/Types/Monitor/KubernetesAlertTemplates.ts +64 -24
- package/Types/Monitor/KubernetesMetricCatalog.ts +118 -19
- package/Types/Monitor/MetricMonitor/MetricCriteriaContext.ts +14 -0
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +93 -10
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.ts +109 -8
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.ts +36 -7
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.ts +43 -2
- package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.ts +41 -6
- package/Types/Monitor/SeriesContext/SeriesLabelDisplay.ts +26 -0
- package/Types/NetworkDevice/DiscoveredHostNamingStatus.ts +147 -0
- package/Types/Permission.ts +315 -0
- package/Types/Probe/ProbeApiIngestResponse.ts +8 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.ts +10 -0
- package/Types/Rules/RuleRun.ts +12 -0
- package/Types/Rum/SessionReplay.ts +25 -6
- package/Types/Rum/WebVitals.ts +52 -0
- package/Types/Telemetry/EntityType.ts +23 -0
- package/Types/Telemetry/ResourceFacetCatalog.ts +14 -0
- package/Types/Telemetry/ServiceType.ts +8 -0
- package/UI/Components/Banner/Banner.tsx +1 -1
- package/UI/Components/Card/Card.tsx +1 -1
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +2 -2
- package/UI/Components/Charts/Line/LineChart.tsx +7 -0
- package/UI/Components/CommandPalette/CommandPalette.tsx +1 -1
- package/UI/Components/Date/StartAndEndDate.tsx +5 -5
- package/UI/Components/Detail/FieldLabel.tsx +8 -0
- package/UI/Components/Diagram/HorizontalStepChain.tsx +1 -1
- package/UI/Components/Feed/FeedOptionsButton.tsx +1 -1
- package/UI/Components/Forms/BasicForm.tsx +1 -1
- package/UI/Components/Header/Header.tsx +1 -1
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +1 -1
- package/UI/Components/HeaderAlert/HeaderAlert.tsx +1 -1
- package/UI/Components/InfoCard/InfoCard.tsx +47 -1
- package/UI/Components/LogsViewer/components/FacetValueRow.tsx +1 -1
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +1 -1
- package/UI/Components/Modal/ModalFooter.tsx +1 -1
- package/UI/Components/ModelDetail/CardModelDetail.tsx +2 -2
- package/UI/Components/ModelTable/BaseModelTable.tsx +99 -21
- package/UI/Components/ModelTable/Column.ts +5 -0
- package/UI/Components/Navbar/NavBar.tsx +9 -2
- package/UI/Components/Navbar/NavBarMenuModal.tsx +2 -2
- package/UI/Components/Page/Page.tsx +1 -1
- package/UI/Components/Pagination/Pagination.tsx +3 -3
- package/UI/Components/ProgressButtons/ProgressButtonItem.tsx +1 -1
- package/UI/Components/SideMenu/SideMenu.tsx +4 -1
- package/UI/Components/StatusPage/ResourceGroupNavigator.tsx +4 -2
- package/UI/Components/StatusPage/ResourceList.tsx +6 -6
- package/UI/Components/Table/TableHeader.tsx +47 -2
- package/UI/Components/Table/Types/Column.ts +7 -0
- package/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.tsx +1 -1
- package/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.tsx +1 -1
- package/UI/Components/Tooltip/InfoTooltip.tsx +78 -0
- package/UI/Components/Workflow/ColumnEditor/ModelQueryBuilder.tsx +1 -1
- package/UI/Components/Workflow/ComponentsModal.tsx +2 -2
- package/UI/Components/Workflow/StepTraceViewer.tsx +1 -1
- package/UI/Styles/Theme.css +8 -1
- package/UI/Utils/Navigation.ts +89 -42
- package/UI/Utils/PermissionGate.ts +11 -2
- package/UI/Utils/Telemetry/TelemetryEntityNames.ts +7 -0
- package/UI/Utils/TelemetryService.ts +4 -3
- package/Utils/Incident/IncidentFromAlerts.ts +516 -0
- package/Utils/LabelRuleImportExport.ts +2 -0
- package/Utils/MetricUnitUtil.ts +103 -11
- package/Utils/Monitor/MetricValueFormatter.ts +66 -13
- package/Utils/Monitor/PlatformMetricUnitUtil.ts +215 -0
- package/Utils/Monitor/PlatformResourceIdentity.ts +514 -0
- package/Utils/NetworkDiscovery/DiscoveredHostNamingDiagnosis.ts +425 -0
- package/Utils/NetworkDiscovery/DiscoveredHostUtil.ts +32 -0
- package/Utils/NetworkDiscovery/NetbiosNameUtil.ts +73 -0
- package/Utils/Rum/SessionTraceState.ts +212 -0
- package/Utils/Telemetry/DatabaseServerEntityKeys.ts +275 -0
- package/Utils/Telemetry/EntityKey.ts +176 -0
- package/Utils/ValueFormatter.ts +16 -0
- package/build/dist/Models/DatabaseModels/Alert.js +54 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertFeed.js +2 -0
- package/build/dist/Models/DatabaseModels/AlertFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DatabaseServer.js +1683 -0
- package/build/dist/Models/DatabaseModels/DatabaseServer.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerEndpoint.js +559 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerEndpoint.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerOwnerTeam.js +506 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerOwnerUser.js +505 -0
- package/build/dist/Models/DatabaseModels/DatabaseServerOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Incident.js +54 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentAlert.js +553 -0
- package/build/dist/Models/DatabaseModels/IncidentAlert.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentFeed.js +2 -0
- package/build/dist/Models/DatabaseModels/IncidentFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +18 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +62 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js +53 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +54 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryException.js +2 -0
- package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserProjectSsoConsent.js +162 -0
- package/build/dist/Models/DatabaseModels/UserProjectSsoConsent.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794800000000-AddSessionReplaySameOriginTracePropagation.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794800000000-AddSessionReplaySameOriginTracePropagation.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794900000000-AddIncidentAlert.js +42 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794900000000-AddIncidentAlert.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795000000000-AddDatabaseServerTables.js +240 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795000000000-AddDatabaseServerTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795100000000-AddUserProjectSsoConsent.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795100000000-AddUserProjectSsoConsent.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/MultipartFormData.js +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +15 -8
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AlertReminderRuleService.js +72 -23
- package/build/dist/Server/Services/AlertReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseServerEndpointService.js +694 -0
- package/build/dist/Server/Services/DatabaseServerEndpointService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerFeedService.js +110 -0
- package/build/dist/Server/Services/DatabaseServerFeedService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerLabelRuleEngineService.js +272 -0
- package/build/dist/Server/Services/DatabaseServerLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerLabelRuleService.js +13 -0
- package/build/dist/Server/Services/DatabaseServerLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerOwnerRuleEngineService.js +340 -0
- package/build/dist/Server/Services/DatabaseServerOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/DatabaseServerOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerOwnerTeamService.js +160 -0
- package/build/dist/Server/Services/DatabaseServerOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerOwnerUserService.js +153 -0
- package/build/dist/Server/Services/DatabaseServerOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseServerService.js +3272 -0
- package/build/dist/Server/Services/DatabaseServerService.js.map +1 -0
- package/build/dist/Server/Services/DatabaseService.js +8 -4
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerResourceService.js +30 -3
- package/build/dist/Server/Services/DockerResourceService.js.map +1 -1
- package/build/dist/Server/Services/IncidentAlertService.js +1370 -0
- package/build/dist/Server/Services/IncidentAlertService.js.map +1 -0
- package/build/dist/Server/Services/IncidentReminderRuleService.js +73 -23
- package/build/dist/Server/Services/IncidentReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +164 -12
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +21 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +18 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/InventoryItemService.js +88 -5
- package/build/dist/Server/Services/InventoryItemService.js.map +1 -1
- package/build/dist/Server/Services/IoTDeviceService.js +111 -24
- package/build/dist/Server/Services/IoTDeviceService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +24 -9
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/PodmanResourceService.js +30 -3
- package/build/dist/Server/Services/PodmanResourceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js +75 -23
- package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +1 -1
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +23 -2
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/UserProjectSsoConsentService.js +79 -0
- package/build/dist/Server/Services/UserProjectSsoConsentService.js.map +1 -0
- package/build/dist/Server/Services/UserService.js +13 -1
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js +18 -0
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +26 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/ResourceTools.js +46 -0
- package/build/dist/Server/Utils/AI/Toolbox/ResourceTools.js.map +1 -1
- package/build/dist/Server/Utils/Database/AffectedResourceRelations.js +6 -0
- package/build/dist/Server/Utils/Database/AffectedResourceRelations.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/MetricMonitorCriteria.js +134 -13
- package/build/dist/Server/Utils/Monitor/Criteria/MetricMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +22 -6
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +1489 -524
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +22 -6
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +196 -6
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +36 -9
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResourceContext.js +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorResourceContext.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js +175 -17
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/PerSeriesResolutionRootCause.js +29 -0
- package/build/dist/Server/Utils/Monitor/PerSeriesResolutionRootCause.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +211 -0
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLinker.js +82 -10
- package/build/dist/Server/Utils/Monitor/SeriesResourceLinker.js.map +1 -1
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js +25 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js.map +1 -1
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCache.js +8 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCache.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +20 -4
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/TeamMember/ProjectLeaveResourceCleanup.js +2 -0
- package/build/dist/Server/Utils/TeamMember/ProjectLeaveResourceCleanup.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/DatabaseEndpointDiscovery.js +442 -0
- package/build/dist/Server/Utils/Telemetry/DatabaseEndpointDiscovery.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +5 -1
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LogExceptionExtractor.js +15 -1
- package/build/dist/Server/Utils/Telemetry/LogExceptionExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js +121 -5
- package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +12 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ServiceDependencyDiscovery.js +438 -36
- package/build/dist/Server/Utils/Telemetry/ServiceDependencyDiscovery.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/Telemetry.js +12 -0
- package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +17 -18
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.js +16 -10
- package/build/dist/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.js.map +1 -1
- package/build/dist/Types/AI/AIResourceContext.js +7 -0
- package/build/dist/Types/AI/AIResourceContext.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardTemplates.js +2 -1
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/DatabaseServer/DatabaseConnectionSpan.js +71 -0
- package/build/dist/Types/DatabaseServer/DatabaseConnectionSpan.js.map +1 -0
- package/build/dist/Types/DatabaseServer/DatabaseContainerClassifier.js +1462 -0
- package/build/dist/Types/DatabaseServer/DatabaseContainerClassifier.js.map +1 -0
- package/build/dist/Types/DatabaseServer/DatabaseContainerCommand.js +691 -0
- package/build/dist/Types/DatabaseServer/DatabaseContainerCommand.js.map +1 -0
- package/build/dist/Types/DatabaseServer/DatabaseEndpoint.js +1407 -0
- package/build/dist/Types/DatabaseServer/DatabaseEndpoint.js.map +1 -0
- package/build/dist/Types/DatabaseServer/DatabaseServerDiscoverySource.js +60 -0
- package/build/dist/Types/DatabaseServer/DatabaseServerDiscoverySource.js.map +1 -0
- package/build/dist/Types/DatabaseServer/DatabaseServerMetricCatalog.js +804 -0
- package/build/dist/Types/DatabaseServer/DatabaseServerMetricCatalog.js.map +1 -0
- package/build/dist/Types/DatabaseServer/DatabaseSystem.js +1860 -0
- package/build/dist/Types/DatabaseServer/DatabaseSystem.js.map +1 -0
- package/build/dist/Types/DatabaseServer/DatabaseTelemetryResolver.js +406 -0
- package/build/dist/Types/DatabaseServer/DatabaseTelemetryResolver.js.map +1 -0
- package/build/dist/Types/Email/EmailTemplateType.js +1 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/Incident/IncidentAlertLink.js +34 -0
- package/build/dist/Types/Incident/IncidentAlertLink.js.map +1 -0
- package/build/dist/Types/Monitor/CephAlertTemplates.js +18 -0
- package/build/dist/Types/Monitor/CephAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/DatabaseAlertTemplates.js +1518 -0
- package/build/dist/Types/Monitor/DatabaseAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +57 -24
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesMetricCatalog.js +104 -18
- package/build/dist/Types/Monitor/KubernetesMetricCatalog.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +80 -3
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +10 -3
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +29 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js +21 -6
- package/build/dist/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js.map +1 -1
- package/build/dist/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +25 -0
- package/build/dist/Types/Monitor/SeriesContext/SeriesLabelDisplay.js.map +1 -1
- package/build/dist/Types/NetworkDevice/DiscoveredHostNamingStatus.js +136 -0
- package/build/dist/Types/NetworkDevice/DiscoveredHostNamingStatus.js.map +1 -0
- package/build/dist/Types/Permission.js +276 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js +10 -0
- package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js.map +1 -1
- package/build/dist/Types/Rules/RuleRun.js +4 -0
- package/build/dist/Types/Rules/RuleRun.js.map +1 -1
- package/build/dist/Types/Rum/WebVitals.js +25 -0
- package/build/dist/Types/Rum/WebVitals.js.map +1 -1
- package/build/dist/Types/Telemetry/EntityType.js +23 -0
- package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
- package/build/dist/Types/Telemetry/ResourceFacetCatalog.js +14 -0
- package/build/dist/Types/Telemetry/ResourceFacetCatalog.js.map +1 -1
- package/build/dist/Types/Telemetry/ServiceType.js +8 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/UI/Components/Banner/Banner.js +1 -1
- package/build/dist/UI/Components/Banner/Banner.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +1 -1
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +2 -2
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/CommandPalette/CommandPalette.js +1 -1
- package/build/dist/UI/Components/CommandPalette/CommandPalette.js.map +1 -1
- package/build/dist/UI/Components/Date/StartAndEndDate.js +5 -5
- package/build/dist/UI/Components/Date/StartAndEndDate.js.map +1 -1
- package/build/dist/UI/Components/Detail/FieldLabel.js +2 -0
- package/build/dist/UI/Components/Detail/FieldLabel.js.map +1 -1
- package/build/dist/UI/Components/Diagram/HorizontalStepChain.js +1 -1
- package/build/dist/UI/Components/Diagram/HorizontalStepChain.js.map +1 -1
- package/build/dist/UI/Components/Feed/FeedOptionsButton.js +1 -1
- package/build/dist/UI/Components/Feed/FeedOptionsButton.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/HeaderAlert/HeaderAlert.js +1 -1
- package/build/dist/UI/Components/HeaderAlert/HeaderAlert.js.map +1 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js +22 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/FacetValueRow.js +1 -1
- package/build/dist/UI/Components/LogsViewer/components/FacetValueRow.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/Modal/ModalFooter.js +1 -1
- package/build/dist/UI/Components/Modal/ModalFooter.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +2 -2
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +70 -18
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBar.js +9 -2
- package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +2 -2
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -1
- package/build/dist/UI/Components/Page/Page.js +1 -1
- package/build/dist/UI/Components/Page/Page.js.map +1 -1
- package/build/dist/UI/Components/Pagination/Pagination.js +3 -3
- package/build/dist/UI/Components/Pagination/Pagination.js.map +1 -1
- package/build/dist/UI/Components/ProgressButtons/ProgressButtonItem.js +1 -1
- package/build/dist/UI/Components/ProgressButtons/ProgressButtonItem.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenu.js +4 -1
- package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
- package/build/dist/UI/Components/StatusPage/ResourceGroupNavigator.js +3 -1
- package/build/dist/UI/Components/StatusPage/ResourceGroupNavigator.js.map +1 -1
- package/build/dist/UI/Components/StatusPage/ResourceList.js +6 -6
- package/build/dist/UI/Components/StatusPage/ResourceList.js.map +1 -1
- package/build/dist/UI/Components/Table/TableHeader.js +18 -2
- package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js.map +1 -1
- package/build/dist/UI/Components/Tooltip/InfoTooltip.js +28 -0
- package/build/dist/UI/Components/Tooltip/InfoTooltip.js.map +1 -0
- package/build/dist/UI/Components/Workflow/ColumnEditor/ModelQueryBuilder.js +1 -1
- package/build/dist/UI/Components/Workflow/ColumnEditor/ModelQueryBuilder.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +2 -2
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/StepTraceViewer.js +1 -1
- package/build/dist/UI/Components/Workflow/StepTraceViewer.js.map +1 -1
- package/build/dist/UI/Utils/Navigation.js +66 -33
- package/build/dist/UI/Utils/Navigation.js.map +1 -1
- package/build/dist/UI/Utils/PermissionGate.js +4 -2
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -1
- package/build/dist/UI/Utils/Telemetry/TelemetryEntityNames.js +7 -0
- package/build/dist/UI/Utils/Telemetry/TelemetryEntityNames.js.map +1 -1
- package/build/dist/UI/Utils/TelemetryService.js +3 -2
- package/build/dist/UI/Utils/TelemetryService.js.map +1 -1
- package/build/dist/Utils/Incident/IncidentFromAlerts.js +306 -0
- package/build/dist/Utils/Incident/IncidentFromAlerts.js.map +1 -0
- package/build/dist/Utils/LabelRuleImportExport.js +2 -0
- package/build/dist/Utils/LabelRuleImportExport.js.map +1 -1
- package/build/dist/Utils/MetricUnitUtil.js +77 -13
- package/build/dist/Utils/MetricUnitUtil.js.map +1 -1
- package/build/dist/Utils/Monitor/MetricValueFormatter.js +58 -13
- package/build/dist/Utils/Monitor/MetricValueFormatter.js.map +1 -1
- package/build/dist/Utils/Monitor/PlatformMetricUnitUtil.js +161 -0
- package/build/dist/Utils/Monitor/PlatformMetricUnitUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/PlatformResourceIdentity.js +323 -0
- package/build/dist/Utils/Monitor/PlatformResourceIdentity.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostNamingDiagnosis.js +270 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostNamingDiagnosis.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js +23 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/NetbiosNameUtil.js +61 -0
- package/build/dist/Utils/NetworkDiscovery/NetbiosNameUtil.js.map +1 -1
- package/build/dist/Utils/Rum/SessionTraceState.js +154 -0
- package/build/dist/Utils/Rum/SessionTraceState.js.map +1 -0
- package/build/dist/Utils/Telemetry/DatabaseServerEntityKeys.js +178 -0
- package/build/dist/Utils/Telemetry/DatabaseServerEntityKeys.js.map +1 -0
- package/build/dist/Utils/Telemetry/EntityKey.js +133 -0
- package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
- package/build/dist/Utils/ValueFormatter.js +15 -0
- package/build/dist/Utils/ValueFormatter.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tests.json +7 -5
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { DiscoveredNetworkDevice } from "../../Models/DatabaseModels/NetworkDeviceDiscoveryScan";
|
|
2
|
+
import {
|
|
3
|
+
DiscoveredHostNetbiosStatus,
|
|
4
|
+
DiscoveredHostReverseDnsStatus,
|
|
5
|
+
readDiscoveredHostNetbiosStatus,
|
|
6
|
+
readDiscoveredHostReverseDnsStatus,
|
|
7
|
+
} from "../../Types/NetworkDevice/DiscoveredHostNamingStatus";
|
|
8
|
+
import { DiscoveryScanStatus } from "./DiscoveryScanStatus";
|
|
9
|
+
import {
|
|
10
|
+
isNetbiosQueryableIPv4Address,
|
|
11
|
+
normalizeNetbiosName,
|
|
12
|
+
} from "./NetbiosNameUtil";
|
|
13
|
+
import { normalizeReverseDnsName } from "./ReverseDnsNameUtil";
|
|
14
|
+
import { ScanModeUtil } from "./ScanModeUtil";
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Why a discovered host is listed by its address instead of a name — the
|
|
18
|
+
* sentence the Review dialog shows beside it (OneUptime issue #3916).
|
|
19
|
+
*
|
|
20
|
+
* A host is named by the first of three sources that has something to say:
|
|
21
|
+
* its SNMP sysName, its reverse-DNS (PTR) name, its NetBIOS name. When none
|
|
22
|
+
* does, the row used to read as a bare IP with no hint of which source was
|
|
23
|
+
* even asked. That is what the issue reported: eight of twelve kitchen
|
|
24
|
+
* displays listed by address, an operator certain they had names, and no way
|
|
25
|
+
* for anyone to tell "no PTR record" from "the probe's DNS server timed out"
|
|
26
|
+
* from "SNMP and NetBIOS were never asked".
|
|
27
|
+
*
|
|
28
|
+
* So this walks the same three sources in the same order and says, for each,
|
|
29
|
+
* what happened — from the per-host code the probe stamped when it has one
|
|
30
|
+
* (DiscoveredHostNamingStatus.ts), and from what the scan itself was set to
|
|
31
|
+
* do when it does not. A row from an older probe carries no codes, and for
|
|
32
|
+
* those the reverse-DNS line says only that no name was recorded, which is
|
|
33
|
+
* the most that row can honestly support.
|
|
34
|
+
*
|
|
35
|
+
* Pure and in Common, like UnclaimedScanDiagnosis, so every sentence is
|
|
36
|
+
* unit-tested without rendering a dialog. The dialog calls it once per row.
|
|
37
|
+
*
|
|
38
|
+
* NOTHING THE SCANNED NETWORK CHOSE IS EVER PUT IN THE TEXT: no name, no
|
|
39
|
+
* sysDescr, not even the address. Every sentence is fixed copy picked by a
|
|
40
|
+
* code that went through a whitelist, so a hostile subnet cannot write into
|
|
41
|
+
* the tooltip.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* The part of a scan this reads. Structural, so the dialog can pass the row
|
|
46
|
+
* it selected and a test can pass a literal.
|
|
47
|
+
*/
|
|
48
|
+
export interface DiscoveredHostNamingScan {
|
|
49
|
+
// DiscoveryScanStatus. Decides whether names were looked up at all yet.
|
|
50
|
+
status?: string | null | undefined;
|
|
51
|
+
// Absent reads as SNMP on, exactly as ScanModeUtil says.
|
|
52
|
+
isSnmpEnabled?: boolean | null | undefined;
|
|
53
|
+
// On only when exactly true, matching the probe's own read of the column.
|
|
54
|
+
isNetbiosLookupEnabled?: boolean | null | undefined;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface DiscoveredHostNamingExplanation {
|
|
58
|
+
/*
|
|
59
|
+
* A few words for beside the address — enough to say there is something
|
|
60
|
+
* to read, never the explanation itself.
|
|
61
|
+
*/
|
|
62
|
+
label: string;
|
|
63
|
+
// The explanation: short sentences, one per naming source, then a tip.
|
|
64
|
+
text: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const UNNAMED_HOST_LABEL: string = "No name found";
|
|
68
|
+
export const NOT_YET_NAMED_HOST_LABEL: string = "Not named yet";
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
* Said for a scan still sweeping. Names are looked up only after the sweep
|
|
72
|
+
* finishes (Probe/Jobs/Discovery/FetchScans.ts, scanWithDeadline), so every
|
|
73
|
+
* host a running scan has reported so far is unnamed by construction — the
|
|
74
|
+
* interesting question has not been asked yet.
|
|
75
|
+
*/
|
|
76
|
+
export const IN_PROGRESS_EXPLANATION: string =
|
|
77
|
+
"Names are looked up after the sweep finishes, so hosts found so far are listed by address. Open Review Results again when the scan completes.";
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Said for a scan that failed. A sweep that misses its deadline or throws is
|
|
81
|
+
* reported without ever reaching the naming passes, so its hosts are the ones
|
|
82
|
+
* it had uploaded along the way — which carry no names by design.
|
|
83
|
+
*/
|
|
84
|
+
export const FAILED_SCAN_EXPLANATION: string =
|
|
85
|
+
"This scan stopped before it looked up names, so its hosts are listed by address. Run it again to name them.";
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
* One sentence per code. None of them says how many times the probe asked:
|
|
89
|
+
* a retry has to fit in the naming pass's time budget, so "even on a retry"
|
|
90
|
+
* could be false for exactly the hosts a slow DNS server pushed past the
|
|
91
|
+
* deadline. The tip that follows these codes says to rescan, which is the
|
|
92
|
+
* part the operator can act on.
|
|
93
|
+
*/
|
|
94
|
+
const REVERSE_DNS_SENTENCES: Record<DiscoveredHostReverseDnsStatus, string> = {
|
|
95
|
+
[DiscoveredHostReverseDnsStatus.NoRecord]:
|
|
96
|
+
"Reverse DNS: the probe's DNS server has no PTR record for this address.",
|
|
97
|
+
[DiscoveredHostReverseDnsStatus.UnusableName]:
|
|
98
|
+
"Reverse DNS: a PTR record came back, but it is not a valid hostname, so it was not used.",
|
|
99
|
+
[DiscoveredHostReverseDnsStatus.Timeout]:
|
|
100
|
+
"Reverse DNS: the probe's DNS server did not answer in time.",
|
|
101
|
+
[DiscoveredHostReverseDnsStatus.ServerFailure]:
|
|
102
|
+
"Reverse DNS: the probe's DNS server answered with a server failure (SERVFAIL).",
|
|
103
|
+
[DiscoveredHostReverseDnsStatus.Refused]:
|
|
104
|
+
"Reverse DNS: the probe's DNS server refused the query.",
|
|
105
|
+
[DiscoveredHostReverseDnsStatus.Unreachable]:
|
|
106
|
+
"Reverse DNS: the probe could not reach its DNS server.",
|
|
107
|
+
[DiscoveredHostReverseDnsStatus.Failed]:
|
|
108
|
+
"Reverse DNS: the lookup failed on the probe.",
|
|
109
|
+
[DiscoveredHostReverseDnsStatus.SkippedTimeBudget]:
|
|
110
|
+
"Reverse DNS: not looked up. The scan ran out of time for name lookups before reaching this address.",
|
|
111
|
+
[DiscoveredHostReverseDnsStatus.SkippedNoResolver]:
|
|
112
|
+
"Reverse DNS: not looked up. The probe's DNS server was not answering, so it stopped asking.",
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/*
|
|
116
|
+
* A row with no reverse-DNS code: stored by a probe older than the codes, or
|
|
117
|
+
* by one whose pass failed outright. Nothing on the row says which, or why,
|
|
118
|
+
* so this claims neither.
|
|
119
|
+
*/
|
|
120
|
+
export const REVERSE_DNS_NOT_RECORDED_SENTENCE: string =
|
|
121
|
+
"Reverse DNS: no name was recorded for this address.";
|
|
122
|
+
|
|
123
|
+
const NETBIOS_SENTENCES: Record<DiscoveredHostNetbiosStatus, string> = {
|
|
124
|
+
[DiscoveredHostNetbiosStatus.NoReply]:
|
|
125
|
+
"NetBIOS: no reply on UDP 137, which is usual for devices that are not Windows, or when a firewall blocks it.",
|
|
126
|
+
[DiscoveredHostNetbiosStatus.NoUsableName]:
|
|
127
|
+
"NetBIOS: the device replied, but reported no usable name.",
|
|
128
|
+
[DiscoveredHostNetbiosStatus.SendFailed]:
|
|
129
|
+
"NetBIOS: the query could not be sent from the probe.",
|
|
130
|
+
[DiscoveredHostNetbiosStatus.Skipped]:
|
|
131
|
+
"NetBIOS: not asked. The lookup stopped before reaching this address.",
|
|
132
|
+
[DiscoveredHostNetbiosStatus.SkippedHostCap]:
|
|
133
|
+
"NetBIOS: not asked. The scan reached the probe's NetBIOS host limit.",
|
|
134
|
+
[DiscoveredHostNetbiosStatus.SkippedIneligibleAddress]:
|
|
135
|
+
"NetBIOS: not asked. Only private addresses are asked.",
|
|
136
|
+
[DiscoveredHostNetbiosStatus.SkippedGlobalProbe]:
|
|
137
|
+
"NetBIOS: not asked. This scan ran on a global probe, and global probes never send NetBIOS queries.",
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export const NETBIOS_OFF_SENTENCE: string = "NetBIOS: off for this scan.";
|
|
141
|
+
|
|
142
|
+
// NetBIOS was on, and yet the row carries no code: an older probe's row.
|
|
143
|
+
export const NETBIOS_NOT_RECORDED_SENTENCE: string =
|
|
144
|
+
"NetBIOS: no name was recorded.";
|
|
145
|
+
|
|
146
|
+
export const SNMP_NOT_CHECKED_SENTENCE: string =
|
|
147
|
+
"SNMP: not checked by this scan.";
|
|
148
|
+
export const SNMP_NO_ANSWER_SENTENCE: string =
|
|
149
|
+
"SNMP: no answer with this scan's credentials.";
|
|
150
|
+
export const SNMP_NO_SYSNAME_SENTENCE: string =
|
|
151
|
+
"SNMP: the device answered, but reported no name (sysName).";
|
|
152
|
+
|
|
153
|
+
/*
|
|
154
|
+
* The one piece of advice that fits the reverse-DNS code best, when any
|
|
155
|
+
* does. "No record" gets the one that matters most for the issue this came
|
|
156
|
+
* from: the probe resolves through ITS OWN DNS server, which need not be the
|
|
157
|
+
* one the operator checked with, so the comparison worth making is from where
|
|
158
|
+
* the probe resolves. That is inside its container or pod, not the machine
|
|
159
|
+
* under it (#3916): a pod's resolver is the cluster DNS, not the node's
|
|
160
|
+
* /etc/resolv.conf, and a Docker container's can differ from its host's too,
|
|
161
|
+
* so "from the probe's host" sent the operator to a lookup that could name
|
|
162
|
+
* the device while the probe's could not. The probe image ships nslookup
|
|
163
|
+
* (dnsutils, Probe/Dockerfile.tpl), so the advice can be followed as written.
|
|
164
|
+
*/
|
|
165
|
+
export const NO_RECORD_TIP: string =
|
|
166
|
+
"The probe uses its own DNS server, which may not be the one you checked with. Run nslookup on this address inside the probe's container or pod to compare.";
|
|
167
|
+
export const TRANSIENT_FAILURE_TIP: string =
|
|
168
|
+
"Rescan to try again. If it keeps happening, check the DNS servers the probe uses, inside its container or pod.";
|
|
169
|
+
|
|
170
|
+
/*
|
|
171
|
+
* Offered when the scan left one or both of the ways of asking the DEVICE for
|
|
172
|
+
* its name switched off. Those are exactly the names the issue asked to see
|
|
173
|
+
* first — the one configured on the device — so saying where they come from
|
|
174
|
+
* is the useful answer to "but it has a hostname". Only the sources that were
|
|
175
|
+
* actually off, and would run if turned on, are named — for NetBIOS that
|
|
176
|
+
* means the probe is not a global one AND the address is one its lookup
|
|
177
|
+
* would query at all (isNetbiosQueryableIPv4Address).
|
|
178
|
+
*/
|
|
179
|
+
export const ASK_THE_DEVICE_TIP: string =
|
|
180
|
+
"Checking SNMP, or NetBIOS lookup for Windows hosts, asks the device for its own name.";
|
|
181
|
+
export const ASK_THE_DEVICE_SNMP_TIP: string =
|
|
182
|
+
"Checking SNMP asks the device for its own name.";
|
|
183
|
+
export const ASK_THE_DEVICE_NETBIOS_TIP: string =
|
|
184
|
+
"NetBIOS lookup asks Windows hosts for their own name.";
|
|
185
|
+
|
|
186
|
+
/*
|
|
187
|
+
* The codes that get TRANSIENT_FAILURE_TIP: the lookup failed rather than
|
|
188
|
+
* answered, so a rescan may name the host, and the DNS servers the probe's
|
|
189
|
+
* host uses are where to look when it does not.
|
|
190
|
+
*
|
|
191
|
+
* SkippedNoResolver is one of them although its address was never looked up
|
|
192
|
+
* (#3916). The probe stopped asking only because every lookup before it had
|
|
193
|
+
* failed in these same ways, so the advice is the same. Without it, the hosts
|
|
194
|
+
* a pass gave up on were the only failed lookups with nothing to check.
|
|
195
|
+
*/
|
|
196
|
+
const TRANSIENT_REVERSE_DNS_STATUSES: ReadonlySet<DiscoveredHostReverseDnsStatus> =
|
|
197
|
+
new Set<DiscoveredHostReverseDnsStatus>([
|
|
198
|
+
DiscoveredHostReverseDnsStatus.Timeout,
|
|
199
|
+
DiscoveredHostReverseDnsStatus.ServerFailure,
|
|
200
|
+
DiscoveredHostReverseDnsStatus.Refused,
|
|
201
|
+
DiscoveredHostReverseDnsStatus.Unreachable,
|
|
202
|
+
DiscoveredHostReverseDnsStatus.Failed,
|
|
203
|
+
DiscoveredHostReverseDnsStatus.SkippedNoResolver,
|
|
204
|
+
]);
|
|
205
|
+
|
|
206
|
+
// A string with something in it besides whitespace.
|
|
207
|
+
function hasText(value: unknown): boolean {
|
|
208
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* True when the row would be named by something other than its address: a
|
|
213
|
+
* sysName, a usable PTR name or a usable NetBIOS name. Mirrors
|
|
214
|
+
* getDiscoveredHostFullName's order and its re-normalisation, so the hint is
|
|
215
|
+
* shown on exactly the rows whose name line is the address.
|
|
216
|
+
*/
|
|
217
|
+
export function isDiscoveredHostNamed(host: DiscoveredNetworkDevice): boolean {
|
|
218
|
+
return (
|
|
219
|
+
hasText(host.sysName) ||
|
|
220
|
+
Boolean(normalizeReverseDnsName(host.dnsHostname)) ||
|
|
221
|
+
Boolean(normalizeNetbiosName(host.netbiosName))
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function describeSnmp(data: {
|
|
226
|
+
host: DiscoveredNetworkDevice;
|
|
227
|
+
scan: DiscoveredHostNamingScan | null | undefined;
|
|
228
|
+
}): string | undefined {
|
|
229
|
+
if (data.scan && !ScanModeUtil.isSnmpEnabled(data.scan)) {
|
|
230
|
+
return SNMP_NOT_CHECKED_SENTENCE;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (data.host.snmpReachable === false) {
|
|
234
|
+
return SNMP_NO_ANSWER_SENTENCE;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/*
|
|
238
|
+
* Answered SNMP — or a row from before `snmpReachable` existed, when every
|
|
239
|
+
* host listed had answered it. Either way the host is unnamed, so whatever
|
|
240
|
+
* it said had no sysName in it.
|
|
241
|
+
*/
|
|
242
|
+
if (data.scan || data.host.snmpReachable === true) {
|
|
243
|
+
return SNMP_NO_SYSNAME_SENTENCE;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return undefined;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function describeNetbios(data: {
|
|
250
|
+
status: DiscoveredHostNetbiosStatus | undefined;
|
|
251
|
+
scan: DiscoveredHostNamingScan | null | undefined;
|
|
252
|
+
isGlobalProbe: boolean;
|
|
253
|
+
isQueryableAddress: boolean;
|
|
254
|
+
}): string | undefined {
|
|
255
|
+
if (data.status) {
|
|
256
|
+
return NETBIOS_SENTENCES[data.status];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Without the scan there is no telling whether NetBIOS was ever on.
|
|
260
|
+
if (!data.scan) {
|
|
261
|
+
return undefined;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (data.scan.isNetbiosLookupEnabled !== true) {
|
|
265
|
+
return NETBIOS_OFF_SENTENCE;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/*
|
|
269
|
+
* On, but no code: a row from a probe older than the codes. If the scan's
|
|
270
|
+
* probe is a global one, the lookup was skipped whatever that probe's
|
|
271
|
+
* version — the global-probe refusal predates the codes.
|
|
272
|
+
*/
|
|
273
|
+
if (data.isGlobalProbe) {
|
|
274
|
+
return NETBIOS_SENTENCES[DiscoveredHostNetbiosStatus.SkippedGlobalProbe];
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/*
|
|
278
|
+
* Likewise for an address outside the private and CGNAT ranges (#3916):
|
|
279
|
+
* the probe's refusal of those shipped in the same change as the
|
|
280
|
+
* isNetbiosLookupEnabled column, so no probe that honoured the setting
|
|
281
|
+
* ever asked one.
|
|
282
|
+
*/
|
|
283
|
+
if (!data.isQueryableAddress) {
|
|
284
|
+
return NETBIOS_SENTENCES[
|
|
285
|
+
DiscoveredHostNetbiosStatus.SkippedIneligibleAddress
|
|
286
|
+
];
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return NETBIOS_NOT_RECORDED_SENTENCE;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Why this discovered host has no name, or undefined when it has one (or has
|
|
294
|
+
* no address, which its row already explains).
|
|
295
|
+
*
|
|
296
|
+
* `isGlobalProbe` is whether the scan's probe is a global one, when the
|
|
297
|
+
* caller knows. It matters only for rows that carry no NetBIOS code, and for
|
|
298
|
+
* whether a scan with NetBIOS off is advised to turn it on.
|
|
299
|
+
*/
|
|
300
|
+
export function explainUnnamedDiscoveredHost(data: {
|
|
301
|
+
host: DiscoveredNetworkDevice | null | undefined;
|
|
302
|
+
scan?: DiscoveredHostNamingScan | null | undefined;
|
|
303
|
+
isGlobalProbe?: boolean | undefined;
|
|
304
|
+
}): DiscoveredHostNamingExplanation | undefined {
|
|
305
|
+
const host: DiscoveredNetworkDevice | null | undefined = data.host;
|
|
306
|
+
|
|
307
|
+
if (!host || typeof host !== "object") {
|
|
308
|
+
return undefined;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/*
|
|
312
|
+
* A row with no address cannot be imported, and says so on its checkbox.
|
|
313
|
+
* Nullish is checked before stringifying: String(null) is "null", which
|
|
314
|
+
* would read as an address.
|
|
315
|
+
*/
|
|
316
|
+
if (
|
|
317
|
+
host.ipAddress === undefined ||
|
|
318
|
+
host.ipAddress === null ||
|
|
319
|
+
!hasText(String(host.ipAddress))
|
|
320
|
+
) {
|
|
321
|
+
return undefined;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (isDiscoveredHostNamed(host)) {
|
|
325
|
+
return undefined;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const dnsHostnameStatus: DiscoveredHostReverseDnsStatus | undefined =
|
|
329
|
+
readDiscoveredHostReverseDnsStatus(host.dnsHostnameStatus);
|
|
330
|
+
const netbiosNameStatus: DiscoveredHostNetbiosStatus | undefined =
|
|
331
|
+
readDiscoveredHostNetbiosStatus(host.netbiosNameStatus);
|
|
332
|
+
|
|
333
|
+
/*
|
|
334
|
+
* A per-host code means the naming passes ran for this row, whatever the
|
|
335
|
+
* scan is doing now — a recurring scan keeps its previous run's results
|
|
336
|
+
* while the next run starts. Only a row with no code at all is explained by
|
|
337
|
+
* the scan's state.
|
|
338
|
+
*/
|
|
339
|
+
if (!dnsHostnameStatus && !netbiosNameStatus) {
|
|
340
|
+
if (data.scan?.status === DiscoveryScanStatus.InProgress) {
|
|
341
|
+
return {
|
|
342
|
+
label: NOT_YET_NAMED_HOST_LABEL,
|
|
343
|
+
text: IN_PROGRESS_EXPLANATION,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (data.scan?.status === DiscoveryScanStatus.Failed) {
|
|
348
|
+
return { label: UNNAMED_HOST_LABEL, text: FAILED_SCAN_EXPLANATION };
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/*
|
|
353
|
+
* Whether the probe's NetBIOS lookup would send this address a query at
|
|
354
|
+
* all. It refuses everything but private and CGNAT IPv4, whoever asks.
|
|
355
|
+
*/
|
|
356
|
+
const isNetbiosQueryableAddress: boolean = isNetbiosQueryableIPv4Address(
|
|
357
|
+
host.ipAddress,
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
const netbiosSentence: string | undefined = describeNetbios({
|
|
361
|
+
status: netbiosNameStatus,
|
|
362
|
+
scan: data.scan,
|
|
363
|
+
isGlobalProbe: data.isGlobalProbe === true,
|
|
364
|
+
isQueryableAddress: isNetbiosQueryableAddress,
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
const sentences: Array<string> = [];
|
|
368
|
+
|
|
369
|
+
// The naming order, so the sentences read in the order the sources win.
|
|
370
|
+
const snmpSentence: string | undefined = describeSnmp({
|
|
371
|
+
host: host,
|
|
372
|
+
scan: data.scan,
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
if (snmpSentence) {
|
|
376
|
+
sentences.push(snmpSentence);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
sentences.push(
|
|
380
|
+
dnsHostnameStatus
|
|
381
|
+
? REVERSE_DNS_SENTENCES[dnsHostnameStatus]
|
|
382
|
+
: REVERSE_DNS_NOT_RECORDED_SENTENCE,
|
|
383
|
+
);
|
|
384
|
+
|
|
385
|
+
if (netbiosSentence) {
|
|
386
|
+
sentences.push(netbiosSentence);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (dnsHostnameStatus === DiscoveredHostReverseDnsStatus.NoRecord) {
|
|
390
|
+
sentences.push(NO_RECORD_TIP);
|
|
391
|
+
} else if (
|
|
392
|
+
dnsHostnameStatus &&
|
|
393
|
+
TRANSIENT_REVERSE_DNS_STATUSES.has(dnsHostnameStatus)
|
|
394
|
+
) {
|
|
395
|
+
sentences.push(TRANSIENT_FAILURE_TIP);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
const isSnmpOff: boolean = snmpSentence === SNMP_NOT_CHECKED_SENTENCE;
|
|
399
|
+
|
|
400
|
+
/*
|
|
401
|
+
* NetBIOS is suggested only where turning it on could work. A global probe
|
|
402
|
+
* never sends NetBIOS queries whatever the scan asks for, so on one this
|
|
403
|
+
* advice would send the operator to a setting whose only effect is the
|
|
404
|
+
* "not asked" line on the next scan (#3916). The bundled self-hosted probes
|
|
405
|
+
* are global, so that is not a rare case. The same goes for an address the
|
|
406
|
+
* lookup refuses — public space, IPv6, anything not a strict dotted quad —
|
|
407
|
+
* where the next scan would only say "Only private addresses are asked".
|
|
408
|
+
*/
|
|
409
|
+
const shouldSuggestNetbios: boolean =
|
|
410
|
+
netbiosSentence === NETBIOS_OFF_SENTENCE &&
|
|
411
|
+
data.isGlobalProbe !== true &&
|
|
412
|
+
isNetbiosQueryableAddress;
|
|
413
|
+
|
|
414
|
+
if (isSnmpOff && shouldSuggestNetbios) {
|
|
415
|
+
sentences.push(ASK_THE_DEVICE_TIP);
|
|
416
|
+
} else if (isSnmpOff) {
|
|
417
|
+
sentences.push(ASK_THE_DEVICE_SNMP_TIP);
|
|
418
|
+
} else if (shouldSuggestNetbios) {
|
|
419
|
+
sentences.push(ASK_THE_DEVICE_NETBIOS_TIP);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
return { label: UNNAMED_HOST_LABEL, text: sentences.join(" ") };
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export default explainUnnamedDiscoveredHost;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { DiscoveredNetworkDevice } from "../../Models/DatabaseModels/NetworkDeviceDiscoveryScan";
|
|
2
|
+
import {
|
|
3
|
+
DiscoveredHostNetbiosStatus,
|
|
4
|
+
DiscoveredHostReverseDnsStatus,
|
|
5
|
+
readDiscoveredHostNetbiosStatus,
|
|
6
|
+
readDiscoveredHostReverseDnsStatus,
|
|
7
|
+
} from "../../Types/NetworkDevice/DiscoveredHostNamingStatus";
|
|
2
8
|
import { normalizeNetbiosName } from "./NetbiosNameUtil";
|
|
3
9
|
import { normalizeReverseDnsName } from "./ReverseDnsNameUtil";
|
|
4
10
|
|
|
@@ -143,6 +149,32 @@ export function normalizeDiscoveredHosts(
|
|
|
143
149
|
delete normalized.netbiosName;
|
|
144
150
|
}
|
|
145
151
|
|
|
152
|
+
/*
|
|
153
|
+
* The two "why is this host unnamed" codes (OneUptime issue #3916). Not
|
|
154
|
+
* chosen by the scanned network, but still read out of the same verbatim
|
|
155
|
+
* jsonb, and the dialog turns them into tooltip copy — so only the exact
|
|
156
|
+
* codes survive, and anything else is DELETED for the reason the names
|
|
157
|
+
* above are. A code this build does not know (a newer probe's) goes the
|
|
158
|
+
* same way and the row falls back to the explanation older rows get.
|
|
159
|
+
*/
|
|
160
|
+
const dnsHostnameStatus: DiscoveredHostReverseDnsStatus | undefined =
|
|
161
|
+
readDiscoveredHostReverseDnsStatus(host.dnsHostnameStatus);
|
|
162
|
+
|
|
163
|
+
if (dnsHostnameStatus) {
|
|
164
|
+
normalized.dnsHostnameStatus = dnsHostnameStatus;
|
|
165
|
+
} else {
|
|
166
|
+
delete normalized.dnsHostnameStatus;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const netbiosNameStatus: DiscoveredHostNetbiosStatus | undefined =
|
|
170
|
+
readDiscoveredHostNetbiosStatus(host.netbiosNameStatus);
|
|
171
|
+
|
|
172
|
+
if (netbiosNameStatus) {
|
|
173
|
+
normalized.netbiosNameStatus = netbiosNameStatus;
|
|
174
|
+
} else {
|
|
175
|
+
delete normalized.netbiosNameStatus;
|
|
176
|
+
}
|
|
177
|
+
|
|
146
178
|
cleaned.push(normalized);
|
|
147
179
|
}
|
|
148
180
|
|
|
@@ -143,4 +143,77 @@ export function normalizeNetbiosName(value: unknown): string | undefined {
|
|
|
143
143
|
return lowerCased;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
/*
|
|
147
|
+
* One octet of a dotted quad in the only spelling the probe's sweep reports:
|
|
148
|
+
* ASCII digits, no leading zero. The 0-255 bound is checked on the number.
|
|
149
|
+
*/
|
|
150
|
+
const IPV4_OCTET_PATTERN: RegExp = /^(?:0|[1-9][0-9]{0,2})$/;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* True exactly for the addresses the probe's NetBIOS lookup would send a
|
|
154
|
+
* query to: a strict dotted-quad IPv4 literal in 10.0.0.0/8, 172.16.0.0/12,
|
|
155
|
+
* 192.168.0.0/16 or the 100.64.0.0/10 CGNAT range (OneUptime issue #3916).
|
|
156
|
+
*
|
|
157
|
+
* The probe's own rule is isNetbiosQueryAddressAllowed
|
|
158
|
+
* (Probe/Utils/Discovery/NetbiosNameResolver.ts), which refuses every other
|
|
159
|
+
* address whoever asks. This is the dashboard's copy of it, for the Review
|
|
160
|
+
* dialog: an unnamed host on a scan with NetBIOS off used to be told that
|
|
161
|
+
* "NetBIOS lookup asks Windows hosts for their own name" whatever its
|
|
162
|
+
* address, so an operator scanning public space turned NetBIOS on, rescanned,
|
|
163
|
+
* and got "not asked. Only private addresses are asked." — advice whose only
|
|
164
|
+
* effect was a different way of saying no name.
|
|
165
|
+
*
|
|
166
|
+
* A copy rather than an import, because Common is bundled into the dashboard
|
|
167
|
+
* and the probe's rule leans on Node's `net.isIPv4`. The strict form below is
|
|
168
|
+
* what `net.isIPv4` accepts (no leading zeros, no whitespace, no IPv6 or
|
|
169
|
+
* IPv4-mapped IPv6). The probe's NetbiosEligibilityParity test holds the two
|
|
170
|
+
* to the same answer on every range edge, on a sweep of every first and
|
|
171
|
+
* second octet, and on the malformed spellings, so changing one without the
|
|
172
|
+
* other fails it.
|
|
173
|
+
*
|
|
174
|
+
* `unknown`, like normalizeNetbiosName, because the dashboard reads the
|
|
175
|
+
* address out of jsonb.
|
|
176
|
+
*/
|
|
177
|
+
export function isNetbiosQueryableIPv4Address(value: unknown): boolean {
|
|
178
|
+
if (typeof value !== "string") {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const parts: Array<string> = value.split(".");
|
|
183
|
+
|
|
184
|
+
if (parts.length !== 4) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const octets: Array<number> = [];
|
|
189
|
+
|
|
190
|
+
for (const part of parts) {
|
|
191
|
+
if (!IPV4_OCTET_PATTERN.test(part)) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const octet: number = parseInt(part, 10);
|
|
196
|
+
|
|
197
|
+
if (octet > 255) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
octets.push(octet);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const first: number = octets[0]!;
|
|
205
|
+
const second: number = octets[1]!;
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
// 10.0.0.0/8, RFC 1918.
|
|
209
|
+
first === 10 ||
|
|
210
|
+
// 172.16.0.0/12, RFC 1918: second octet 16-31.
|
|
211
|
+
(first === 172 && second >= 16 && second <= 31) ||
|
|
212
|
+
// 192.168.0.0/16, RFC 1918.
|
|
213
|
+
(first === 192 && second === 168) ||
|
|
214
|
+
// 100.64.0.0/10, RFC 6598 shared/CGNAT space: second octet 64-127.
|
|
215
|
+
(first === 100 && second >= 64 && second <= 127)
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
|
|
146
219
|
export default normalizeNetbiosName;
|