@oneuptime/common 14.0.3 → 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/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/Index.ts +16 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +26 -0
- 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/1795000000000-AddDatabaseServerTables.ts +673 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795100000000-AddUserProjectSsoConsent.ts +51 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -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/IncidentReminderRuleService.ts +103 -23
- package/Server/Services/Index.ts +16 -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/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/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/EventOverlayScope.test.ts +147 -0
- package/Tests/App/Dashboard/EventOverlayScopeHook.test.tsx +1 -0
- package/Tests/App/Dashboard/LogsResourceFacetChips.test.tsx +1 -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/ProductOrientation.test.tsx +4 -3
- 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/ScheduledMaintenanceOverviewPage.test.tsx +2 -0
- package/Tests/App/Dashboard/ServiceMapDatabaseLink.test.tsx +1085 -0
- package/Tests/App/Dashboard/TelemetryResourceRetentionSettings.test.tsx +10 -0
- package/Tests/App/Dashboard/TracesResourceFacets.test.tsx +2 -1
- 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/ResourceFeedModels.test.ts +24 -5
- 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/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/IncidentAlertSloLinkSurvivesEdit.test.ts +2 -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/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/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/ForeignHiddenRuleResilience.test.tsx +1147 -0
- package/Tests/UI/Components/HeaderRightRail.test.tsx +41 -1
- package/Tests/UI/Components/LogsEntityNames.test.ts +16 -1
- package/Tests/UI/Components/LogsFacetSidebarHiddenFacets.test.tsx +7 -3
- 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/TelemetryFacetSidebarHiddenFacets.test.tsx +4 -1
- package/Tests/UI/ForeignHiddenRuleGuard.test.ts +1951 -0
- package/Tests/UI/Rum/ReplayPlayerChrome.test.tsx +19 -1
- package/Tests/UI/Rum/ReplayTabSwitcher.test.tsx +19 -1
- package/Tests/UI/TailwindPlayCdnForeignHiddenRule.test.ts +1005 -0
- package/Tests/UI/ThemeGroupHoverReveal.test.ts +847 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +70 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +21 -0
- package/Tests/UI/Utils/ModelAPISsoRedirect.test.ts +127 -0
- package/Tests/UI/Utils/Navigation.test.ts +102 -0
- package/Tests/UI/Utils/Telemetry/TelemetryEntityNames.test.ts +23 -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/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/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 +267 -0
- package/Types/Probe/ProbeApiIngestResponse.ts +8 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.ts +10 -0
- package/Types/Rules/RuleRun.ts +12 -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/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/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 +4 -4
- 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/TelemetryViewer/components/TelemetryFacetSidebar.tsx +1 -1
- package/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.tsx +1 -1
- 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/Telemetry/TelemetryEntityNames.ts +7 -0
- package/UI/Utils/TelemetryService.ts +4 -3
- 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/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/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/Index.js +16 -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/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/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 +4 -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/IncidentReminderRuleService.js +73 -23
- package/build/dist/Server/Services/IncidentReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +16 -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/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/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 +234 -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/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/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/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 +4 -4
- 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/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/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/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/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/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,555 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildDatabaseCallerContext,
|
|
3
|
+
buildDatabaseServerDisplayName,
|
|
4
|
+
canonicalizeDatabaseEndpoint,
|
|
5
|
+
DatabaseCallerContext,
|
|
6
|
+
DatabaseEndpoint,
|
|
7
|
+
DatabaseEndpointScope,
|
|
8
|
+
getDatabaseEndpointScope,
|
|
9
|
+
isHostRelativeDatabaseHost,
|
|
10
|
+
isIpLiteralHost,
|
|
11
|
+
isLoopbackDatabaseHost,
|
|
12
|
+
parseHostAndPort,
|
|
13
|
+
ParsedHostAndPort,
|
|
14
|
+
readDatabaseInstanceName,
|
|
15
|
+
splitDatabaseHostInstance,
|
|
16
|
+
} from "./DatabaseEndpoint";
|
|
17
|
+
import {
|
|
18
|
+
getMoreSpecificDatabaseSystem,
|
|
19
|
+
isAutoCreatableDatabaseSystem,
|
|
20
|
+
isCompatibilityVersionAttribute,
|
|
21
|
+
isKnownDatabaseSystem,
|
|
22
|
+
normalizeDatabaseSystem,
|
|
23
|
+
refineDatabaseSystemFromVersion,
|
|
24
|
+
} from "./DatabaseSystem";
|
|
25
|
+
|
|
26
|
+
/*
|
|
27
|
+
* Turning telemetry into a database endpoint — the two pure gates ingest and
|
|
28
|
+
* the discovery crons run before anything touches a cache or a table:
|
|
29
|
+
*
|
|
30
|
+
* - resolveDatabaseCallTarget: "which database server does this CLIENT
|
|
31
|
+
* span / db.client.* datapoint talk to?" (application side);
|
|
32
|
+
* - resolveDatabaseFromResourceAttributes: "is this resource batch a
|
|
33
|
+
* database's own telemetry (a collector DB receiver, the OneUptime
|
|
34
|
+
* Database Agent), and which server is it?" (server side).
|
|
35
|
+
*
|
|
36
|
+
* Both are conservative on purpose: a wrong identity merges unrelated
|
|
37
|
+
* servers into one row and shows one database's data on another's page,
|
|
38
|
+
* while a missing identity only costs a row — so anything ambiguous is null.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
// Attribute precedence, stable semconv name first, legacy names after.
|
|
42
|
+
export const DATABASE_SYSTEM_ATTRIBUTES: Array<string> = [
|
|
43
|
+
"db.system.name",
|
|
44
|
+
"db.system",
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
export const DATABASE_ADDRESS_ATTRIBUTES: Array<string> = [
|
|
48
|
+
"server.address",
|
|
49
|
+
"net.peer.name",
|
|
50
|
+
"network.peer.address",
|
|
51
|
+
"net.sock.peer.addr",
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export const DATABASE_PORT_ATTRIBUTES: Array<string> = [
|
|
55
|
+
"server.port",
|
|
56
|
+
"net.peer.port",
|
|
57
|
+
"network.peer.port",
|
|
58
|
+
"net.sock.peer.port",
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
// Resource attributes (FLAT semconv keys) read by the receiver-side gate.
|
|
62
|
+
export const DATABASE_SERVER_ID_ATTRIBUTE: string =
|
|
63
|
+
"oneuptime.database.server.id";
|
|
64
|
+
export const DATABASE_AGENT_ATTRIBUTE: string = "oneuptime.database.agent";
|
|
65
|
+
|
|
66
|
+
const DATABASE_VERSION_ATTRIBUTES: ReadonlyArray<string> = [
|
|
67
|
+
"db.system.version",
|
|
68
|
+
"redis.version",
|
|
69
|
+
"oracle.db.version",
|
|
70
|
+
"elasticsearch.node.version",
|
|
71
|
+
"mongodb.version",
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const UUID_REGEX: RegExp =
|
|
75
|
+
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
76
|
+
|
|
77
|
+
// A Docker short (12) or full (64) container id used as a hostname.
|
|
78
|
+
const CONTAINER_ID_HOST_REGEX: RegExp = /^(?:[0-9a-f]{12}|[0-9a-f]{64})$/;
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
* Values receivers and SDKs emit when they do NOT know the host. Treated as
|
|
82
|
+
* absent, so a resource carrying only one of these is not a database —
|
|
83
|
+
* otherwise every PostgreSQL receiver whose endpoint failed to resolve would
|
|
84
|
+
* merge into one "unknown:5432" row.
|
|
85
|
+
*/
|
|
86
|
+
const NON_IDENTITY_HOSTS: ReadonlySet<string> = new Set<string>([
|
|
87
|
+
"unknown",
|
|
88
|
+
"nohost",
|
|
89
|
+
"localhost.localdomain",
|
|
90
|
+
]);
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
* The first value that is present AND not the empty string, untrimmed. This
|
|
94
|
+
* mirrors the ClickHouse `multiIf(attributes['x'] != '', …)` selection the
|
|
95
|
+
* client-span discovery SQL uses, so the ingest-side key and the cron-side
|
|
96
|
+
* endpoint are derived from the SAME attribute.
|
|
97
|
+
*/
|
|
98
|
+
function firstPresent(
|
|
99
|
+
getAttribute: (key: string) => unknown,
|
|
100
|
+
keys: ReadonlyArray<string>,
|
|
101
|
+
): unknown {
|
|
102
|
+
for (const key of keys) {
|
|
103
|
+
const value: unknown = getAttribute(key);
|
|
104
|
+
if (value === undefined || value === null) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
if (typeof value === "string" && value === "") {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (typeof value === "object") {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
return value;
|
|
114
|
+
}
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function toText(value: unknown): string | null {
|
|
119
|
+
if (typeof value === "string") {
|
|
120
|
+
const trimmed: string = value.trim();
|
|
121
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
122
|
+
}
|
|
123
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
124
|
+
return String(value);
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function readAttribute(
|
|
130
|
+
attributes: Record<string, unknown>,
|
|
131
|
+
key: string,
|
|
132
|
+
): string | null {
|
|
133
|
+
if (!attributes || typeof attributes !== "object") {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
const direct: string | null = toText(attributes[key]);
|
|
137
|
+
if (direct !== null) {
|
|
138
|
+
return direct;
|
|
139
|
+
}
|
|
140
|
+
// Stored rows prefix resource attributes; accept that spelling too.
|
|
141
|
+
return toText(attributes[`resource.${key}`]);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// The first of `keys` readAttribute finds, in list order.
|
|
145
|
+
function readFirstAttribute(
|
|
146
|
+
attributes: Record<string, unknown>,
|
|
147
|
+
keys: ReadonlyArray<string>,
|
|
148
|
+
): string | null {
|
|
149
|
+
for (const key of keys) {
|
|
150
|
+
const value: string | null = readAttribute(attributes, key);
|
|
151
|
+
if (value !== null) {
|
|
152
|
+
return value;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/*
|
|
159
|
+
* The engine's own version: the first version attribute present, skipping
|
|
160
|
+
* one the engine fills with its family's compatibility version instead
|
|
161
|
+
* (Valkey's `redis.version`, frozen at 7.2.4) — no version beats a wrong one.
|
|
162
|
+
*/
|
|
163
|
+
function readDatabaseVersion(
|
|
164
|
+
attributes: Record<string, unknown>,
|
|
165
|
+
system: string,
|
|
166
|
+
): string | null {
|
|
167
|
+
return readFirstAttribute(
|
|
168
|
+
attributes,
|
|
169
|
+
DATABASE_VERSION_ATTRIBUTES.filter((key: string): boolean => {
|
|
170
|
+
return !isCompatibilityVersionAttribute(system, key);
|
|
171
|
+
}),
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The database server a CLIENT span (or a `db.client.*` datapoint) calls, or
|
|
177
|
+
* null. Returns immediately — without allocating — when the span has no
|
|
178
|
+
* `db.system.name` / `db.system`, so it is cheap to run on every span.
|
|
179
|
+
* Endpoint canonicalization uses purpose "client-call": loopback and
|
|
180
|
+
* host-relative addresses are never an identity here.
|
|
181
|
+
*/
|
|
182
|
+
export function resolveDatabaseCallTarget(input: {
|
|
183
|
+
getAttribute: (key: string) => unknown;
|
|
184
|
+
caller: DatabaseCallerContext;
|
|
185
|
+
}): {
|
|
186
|
+
system: string;
|
|
187
|
+
endpoint: DatabaseEndpoint;
|
|
188
|
+
scope: DatabaseEndpointScope;
|
|
189
|
+
} | null {
|
|
190
|
+
if (!input || typeof input.getAttribute !== "function") {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const rawSystem: unknown = firstPresent(
|
|
195
|
+
input.getAttribute,
|
|
196
|
+
DATABASE_SYSTEM_ATTRIBUTES,
|
|
197
|
+
);
|
|
198
|
+
if (rawSystem === null) {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const system: string | null = normalizeDatabaseSystem(rawSystem);
|
|
203
|
+
if (!system) {
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const address: unknown = firstPresent(
|
|
208
|
+
input.getAttribute,
|
|
209
|
+
DATABASE_ADDRESS_ATTRIBUTES,
|
|
210
|
+
);
|
|
211
|
+
if (address === null) {
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const port: unknown = firstPresent(
|
|
216
|
+
input.getAttribute,
|
|
217
|
+
DATABASE_PORT_ATTRIBUTES,
|
|
218
|
+
);
|
|
219
|
+
|
|
220
|
+
/*
|
|
221
|
+
* A SQL Server named instance the span names beside its address (null for
|
|
222
|
+
* every other engine): two instances on one host are two servers. The
|
|
223
|
+
* discovery cron hands its grouped instance column back in as
|
|
224
|
+
* `db.mssql.instance_name`, so both read it here, alike.
|
|
225
|
+
*/
|
|
226
|
+
const endpoint: DatabaseEndpoint | null = canonicalizeDatabaseEndpoint({
|
|
227
|
+
system,
|
|
228
|
+
address: typeof address === "string" ? address : String(address),
|
|
229
|
+
port:
|
|
230
|
+
typeof port === "string" || typeof port === "number" ? port : undefined,
|
|
231
|
+
instance: readDatabaseInstanceName({
|
|
232
|
+
system,
|
|
233
|
+
getAttribute: input.getAttribute,
|
|
234
|
+
}),
|
|
235
|
+
caller: input.caller || { isEphemeral: true },
|
|
236
|
+
purpose: "client-call",
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
if (!endpoint) {
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return { system, endpoint, scope: getDatabaseEndpointScope(endpoint) };
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/*
|
|
247
|
+
* A host that names nothing: an "unknown" placeholder, or — unless our own
|
|
248
|
+
* Database Agent stamped the address — the resource's own pod name or a
|
|
249
|
+
* container id (a collector sidecar reporting loopback as its os.Hostname()).
|
|
250
|
+
*/
|
|
251
|
+
function isNonIdentityHost(
|
|
252
|
+
host: string,
|
|
253
|
+
attributes: Record<string, unknown>,
|
|
254
|
+
): boolean {
|
|
255
|
+
const value: string = host.trim().toLowerCase();
|
|
256
|
+
|
|
257
|
+
if (NON_IDENTITY_HOSTS.has(value) || value.startsWith("unknown_service")) {
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (readAttribute(attributes, DATABASE_AGENT_ATTRIBUTE) !== null) {
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const podName: string | null = readAttribute(attributes, "k8s.pod.name");
|
|
266
|
+
if (podName && podName.toLowerCase() === value) {
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return CONTAINER_ID_HOST_REGEX.test(value);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/*
|
|
274
|
+
* Resource attributes that say the batch describes ONE Kubernetes pod — a
|
|
275
|
+
* `receiver_creator` + `k8s_observer` collector stamps the scraped pod's
|
|
276
|
+
* identity on every batch it produces for it.
|
|
277
|
+
*/
|
|
278
|
+
const POD_IDENTITY_ATTRIBUTES: ReadonlyArray<string> = [
|
|
279
|
+
"k8s.pod.name",
|
|
280
|
+
"k8s.pod.uid",
|
|
281
|
+
];
|
|
282
|
+
|
|
283
|
+
function isSingleLabelHost(host: string): boolean {
|
|
284
|
+
return !host.includes(".") && !isIpLiteralHost(host);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/*
|
|
288
|
+
* The network host of an endpoint host: a SQL Server named instance
|
|
289
|
+
* (`sql1.corp\inst01`) is part of the endpoint's identity but says nothing
|
|
290
|
+
* about the address it is reached at.
|
|
291
|
+
*/
|
|
292
|
+
function networkHostOf(host: string): string {
|
|
293
|
+
return splitDatabaseHostInstance(host.trim().toLowerCase()).host;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Whether a collector-reported endpoint names ONE server stably enough to
|
|
298
|
+
* become its identity — to create a DatabaseServer row, or to be claimed as
|
|
299
|
+
* an alias of the row a batch is linked to. Stable means GLOBAL scope and
|
|
300
|
+
* none of the addresses a collector's own context makes up:
|
|
301
|
+
*
|
|
302
|
+
* - a pod IP: an IP literal qualified with a cluster (a pod or ClusterIP
|
|
303
|
+
* address) or reported for a pod (`k8s.pod.name` / `k8s.pod.uid`, the
|
|
304
|
+
* `receiver_creator` pattern). Every restart hands the pod a new one, and
|
|
305
|
+
* each would become another row that never joins the Kubernetes-detected
|
|
306
|
+
* database, which owns Service DNS names, not pod IPs;
|
|
307
|
+
* - a single-label name expanded into `<name>.<namespace>.svc.cluster.local`
|
|
308
|
+
* only because the COLLECTOR runs in that namespace: it may be a Service,
|
|
309
|
+
* or a pod hostname a receiver substituted for `localhost` (a sidecar's
|
|
310
|
+
* os.Hostname()) — nothing tells them apart.
|
|
311
|
+
*
|
|
312
|
+
* The endpoint still keys the batch's rows either way, so a row that owns it
|
|
313
|
+
* (the Kubernetes-detected workload's Service DNS alias, an alias a person
|
|
314
|
+
* added, a DATABASE_SERVER_ID link) finds the telemetry. `rawHost` is the
|
|
315
|
+
* host as parsed from the attribute, before canonicalization.
|
|
316
|
+
*/
|
|
317
|
+
export function isStableCollectorEndpoint(input: {
|
|
318
|
+
rawHost: string;
|
|
319
|
+
endpoint: DatabaseEndpoint;
|
|
320
|
+
attributes: Record<string, unknown>;
|
|
321
|
+
}): boolean {
|
|
322
|
+
if (!input || !input.endpoint || typeof input.endpoint.host !== "string") {
|
|
323
|
+
return false;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const endpoint: DatabaseEndpoint = input.endpoint;
|
|
327
|
+
const host: string = networkHostOf(endpoint.host);
|
|
328
|
+
|
|
329
|
+
if (getDatabaseEndpointScope(endpoint) !== "global") {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (isIpLiteralHost(host)) {
|
|
334
|
+
const clusterQualified: boolean = Boolean(
|
|
335
|
+
typeof endpoint.kubernetesClusterName === "string" &&
|
|
336
|
+
endpoint.kubernetesClusterName.trim(),
|
|
337
|
+
);
|
|
338
|
+
const reportedForPod: boolean = POD_IDENTITY_ATTRIBUTES.some(
|
|
339
|
+
(key: string): boolean => {
|
|
340
|
+
return readAttribute(input.attributes || {}, key) !== null;
|
|
341
|
+
},
|
|
342
|
+
);
|
|
343
|
+
if (clusterQualified || reportedForPod) {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const rawHost: string =
|
|
349
|
+
typeof input.rawHost === "string" ? networkHostOf(input.rawHost) : "";
|
|
350
|
+
if (
|
|
351
|
+
rawHost &&
|
|
352
|
+
isSingleLabelHost(rawHost) &&
|
|
353
|
+
!isLoopbackDatabaseHost(rawHost) &&
|
|
354
|
+
!isHostRelativeDatabaseHost(rawHost) &&
|
|
355
|
+
host !== rawHost
|
|
356
|
+
) {
|
|
357
|
+
return false;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Whether a resource batch is a database's own telemetry, and which server.
|
|
365
|
+
*
|
|
366
|
+
* - `linkedDatabaseServerId`: `oneuptime.database.server.id` when it is a
|
|
367
|
+
* UUID (the agent config from the in-app docs stamps it; ingest joins that
|
|
368
|
+
* row deterministically).
|
|
369
|
+
* - `system`: the receiver hint (from the batch's scope names), refined by
|
|
370
|
+
* the engine the resource stamps (`db.system.name`, else the legacy
|
|
371
|
+
* `db.system` older receivers such as saphana still write); else an
|
|
372
|
+
* explicit stamp (that engine plus `server.address` or the linked id);
|
|
373
|
+
* else nothing — an application resource is never a database. Finally a
|
|
374
|
+
* version the server reports about itself refines a family engine to the
|
|
375
|
+
* fork it names ("mysql" + "10.11.7-MariaDB" → "mariadb") or the fork
|
|
376
|
+
* whose releases alone reach its major version ("mysql" + "11.4.13" →
|
|
377
|
+
* "mariadb": MySQL has no 10.x or 11.x); it never changes one fork into
|
|
378
|
+
* another or moves an engine to another family.
|
|
379
|
+
* - `version`: the first of `db.system.version`, `redis.version`,
|
|
380
|
+
* `oracle.db.version`, `elasticsearch.node.version`, `mongodb.version`,
|
|
381
|
+
* except one the engine fills with its family's version rather than its
|
|
382
|
+
* own (Valkey's `redis.version` is always 7.2.4) — null then, so a
|
|
383
|
+
* version another source found is kept rather than overwritten.
|
|
384
|
+
* - `endpoint` (purpose "collector"): the first of `server.address`
|
|
385
|
+
* (+ `server.port`), `service.instance.id` (UUID-shaped values ignored;
|
|
386
|
+
* `host:port/service` read as host:port), `mysql.instance.endpoint`,
|
|
387
|
+
* `mongodb_atlas.host.name` (+ `mongodb_atlas.process.port`),
|
|
388
|
+
* `saphana.host` (the engine's default port) that canonicalizes to a real
|
|
389
|
+
* host. It is canonicalized with the engine as reported, before the
|
|
390
|
+
* version refinement: a receiver that could not read the version (it
|
|
391
|
+
* reads it once, at start) must key its batches exactly as one that could.
|
|
392
|
+
* There is deliberately NO `host.name` fallback: a central collector
|
|
393
|
+
* scraping N servers would merge them all.
|
|
394
|
+
* - `endpointIsStable`: see isStableCollectorEndpoint — whether the endpoint
|
|
395
|
+
* may become a server's identity (created, or claimed as an alias).
|
|
396
|
+
* - `allowCreate`: whether the batch may create a DatabaseServer row for its
|
|
397
|
+
* endpoint by itself — a stable endpoint of an engine that may be
|
|
398
|
+
* auto-created (known, not a cloud-API or in-process database). Otherwise
|
|
399
|
+
* it only joins a row that already owns the endpoint.
|
|
400
|
+
*
|
|
401
|
+
* Null when neither an endpoint nor a linked id identifies the server.
|
|
402
|
+
*/
|
|
403
|
+
export function resolveDatabaseFromResourceAttributes(input: {
|
|
404
|
+
attributes: Record<string, unknown>;
|
|
405
|
+
receiverSystemHint?: string | null | undefined;
|
|
406
|
+
}): {
|
|
407
|
+
system: string;
|
|
408
|
+
endpoint: DatabaseEndpoint | null;
|
|
409
|
+
linkedDatabaseServerId: string | null;
|
|
410
|
+
displayName: string | null;
|
|
411
|
+
version: string | null;
|
|
412
|
+
endpointIsStable: boolean;
|
|
413
|
+
allowCreate: boolean;
|
|
414
|
+
} | null {
|
|
415
|
+
const attributes: Record<string, unknown> =
|
|
416
|
+
input && input.attributes && typeof input.attributes === "object"
|
|
417
|
+
? input.attributes
|
|
418
|
+
: {};
|
|
419
|
+
|
|
420
|
+
const rawLinkedId: string | null = readAttribute(
|
|
421
|
+
attributes,
|
|
422
|
+
DATABASE_SERVER_ID_ATTRIBUTE,
|
|
423
|
+
);
|
|
424
|
+
const linkedDatabaseServerId: string | null =
|
|
425
|
+
rawLinkedId && UUID_REGEX.test(rawLinkedId)
|
|
426
|
+
? rawLinkedId.toLowerCase()
|
|
427
|
+
: null;
|
|
428
|
+
|
|
429
|
+
const stampedSystem: string | null = normalizeDatabaseSystem(
|
|
430
|
+
readFirstAttribute(attributes, DATABASE_SYSTEM_ATTRIBUTES),
|
|
431
|
+
);
|
|
432
|
+
// Only a known engine is a hint (callers pass getDatabaseReceiverSystemHint).
|
|
433
|
+
const hintSystem: string | null = isKnownDatabaseSystem(
|
|
434
|
+
input?.receiverSystemHint,
|
|
435
|
+
)
|
|
436
|
+
? normalizeDatabaseSystem(input?.receiverSystemHint)
|
|
437
|
+
: null;
|
|
438
|
+
const stampedAddress: string | null = readAttribute(
|
|
439
|
+
attributes,
|
|
440
|
+
"server.address",
|
|
441
|
+
);
|
|
442
|
+
|
|
443
|
+
let system: string;
|
|
444
|
+
if (hintSystem) {
|
|
445
|
+
system = stampedSystem || hintSystem;
|
|
446
|
+
} else if (stampedSystem && (stampedAddress || linkedDatabaseServerId)) {
|
|
447
|
+
system = stampedSystem;
|
|
448
|
+
} else if (linkedDatabaseServerId) {
|
|
449
|
+
system = stampedSystem || "";
|
|
450
|
+
} else {
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
const caller: DatabaseCallerContext = buildDatabaseCallerContext(attributes);
|
|
455
|
+
|
|
456
|
+
const candidates: Array<{ address: string | null; port: string | null }> = [
|
|
457
|
+
{
|
|
458
|
+
address: stampedAddress,
|
|
459
|
+
port: readAttribute(attributes, "server.port"),
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
address: ((): string | null => {
|
|
463
|
+
const instanceId: string | null = readAttribute(
|
|
464
|
+
attributes,
|
|
465
|
+
"service.instance.id",
|
|
466
|
+
);
|
|
467
|
+
return instanceId && !UUID_REGEX.test(instanceId) ? instanceId : null;
|
|
468
|
+
})(),
|
|
469
|
+
port: null,
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
address: readAttribute(attributes, "mysql.instance.endpoint"),
|
|
473
|
+
port: null,
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
address: readAttribute(attributes, "mongodb_atlas.host.name"),
|
|
477
|
+
port: readAttribute(attributes, "mongodb_atlas.process.port"),
|
|
478
|
+
},
|
|
479
|
+
// The saphana receiver names the host alone; the default port applies.
|
|
480
|
+
{
|
|
481
|
+
address: readAttribute(attributes, "saphana.host"),
|
|
482
|
+
port: null,
|
|
483
|
+
},
|
|
484
|
+
];
|
|
485
|
+
|
|
486
|
+
let endpoint: DatabaseEndpoint | null = null;
|
|
487
|
+
let rawHost: string = "";
|
|
488
|
+
for (const candidate of candidates) {
|
|
489
|
+
if (!candidate.address) {
|
|
490
|
+
continue;
|
|
491
|
+
}
|
|
492
|
+
const parsed: ParsedHostAndPort | null = parseHostAndPort(
|
|
493
|
+
candidate.address,
|
|
494
|
+
);
|
|
495
|
+
if (!parsed || isNonIdentityHost(parsed.host, attributes)) {
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
498
|
+
const canonical: DatabaseEndpoint | null = canonicalizeDatabaseEndpoint({
|
|
499
|
+
system,
|
|
500
|
+
address: candidate.address,
|
|
501
|
+
port: candidate.port,
|
|
502
|
+
caller,
|
|
503
|
+
purpose: "collector",
|
|
504
|
+
});
|
|
505
|
+
// The loopback rewrite can land on the collector's own name; re-check.
|
|
506
|
+
if (!canonical || isNonIdentityHost(canonical.host, attributes)) {
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
endpoint = canonical;
|
|
510
|
+
rawHost = parsed.host;
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
if (!endpoint && !linkedDatabaseServerId) {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
const reportedVersion: string | null = readDatabaseVersion(
|
|
519
|
+
attributes,
|
|
520
|
+
system,
|
|
521
|
+
);
|
|
522
|
+
|
|
523
|
+
/*
|
|
524
|
+
* The server's own version can name the fork a family receiver cannot
|
|
525
|
+
* tell apart (the mysql receiver reports "mysql" for MariaDB and TiDB
|
|
526
|
+
* alike, and only the bare "11.4.13" as MariaDB's version). Only ever
|
|
527
|
+
* more specific: a fork already named is kept.
|
|
528
|
+
*/
|
|
529
|
+
if (system && reportedVersion) {
|
|
530
|
+
system =
|
|
531
|
+
getMoreSpecificDatabaseSystem(
|
|
532
|
+
system,
|
|
533
|
+
refineDatabaseSystemFromVersion(system, reportedVersion),
|
|
534
|
+
) || system;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// Read again for the engine the batch turned out to be.
|
|
538
|
+
const version: string | null = readDatabaseVersion(attributes, system);
|
|
539
|
+
|
|
540
|
+
const endpointIsStable: boolean = endpoint
|
|
541
|
+
? isStableCollectorEndpoint({ rawHost, endpoint, attributes })
|
|
542
|
+
: false;
|
|
543
|
+
|
|
544
|
+
return {
|
|
545
|
+
system,
|
|
546
|
+
endpoint,
|
|
547
|
+
linkedDatabaseServerId,
|
|
548
|
+
displayName: endpoint
|
|
549
|
+
? buildDatabaseServerDisplayName({ system, endpoint })
|
|
550
|
+
: null,
|
|
551
|
+
version,
|
|
552
|
+
endpointIsStable,
|
|
553
|
+
allowCreate: endpointIsStable && isAutoCreatableDatabaseSystem(system),
|
|
554
|
+
};
|
|
555
|
+
}
|
|
@@ -4,6 +4,7 @@ enum EmailTemplateType {
|
|
|
4
4
|
ProbeOffline = "ProbeOffline.hbs",
|
|
5
5
|
SignupWelcomeEmail = "SignupWelcomeEmail.hbs",
|
|
6
6
|
CompleteRegistration = "CompleteRegistration.hbs",
|
|
7
|
+
ConfirmProjectSsoSignIn = "ConfirmProjectSsoSignIn.hbs",
|
|
7
8
|
ProbeConnectionStatusChange = "ProbeConnectionStatusChange.hbs",
|
|
8
9
|
AIAgentConnectionStatusChange = "AIAgentConnectionStatusChange.hbs",
|
|
9
10
|
AIAgentOwnerAdded = "AIAgentOwnerAdded.hbs",
|
|
@@ -534,6 +534,12 @@ const osdDownTemplate: CephAlertTemplate = {
|
|
|
534
534
|
metricAlias,
|
|
535
535
|
filterType: FilterType.GreaterThanOrEqualTo,
|
|
536
536
|
value: 1,
|
|
537
|
+
/*
|
|
538
|
+
* `ceph_osd_up` is strictly 0 or 1, so the shared 10% recovery dead
|
|
539
|
+
* band would put this at `>= 1.1` — unreachable, leaving the
|
|
540
|
+
* monitor Offline even after the OSD comes back up.
|
|
541
|
+
*/
|
|
542
|
+
isBinaryMetric: true,
|
|
537
543
|
}),
|
|
538
544
|
});
|
|
539
545
|
},
|
|
@@ -581,6 +587,12 @@ const osdOutTemplate: CephAlertTemplate = {
|
|
|
581
587
|
metricAlias,
|
|
582
588
|
filterType: FilterType.GreaterThanOrEqualTo,
|
|
583
589
|
value: 1,
|
|
590
|
+
/*
|
|
591
|
+
* `ceph_osd_in` is strictly 0 or 1, so the shared 10% recovery dead
|
|
592
|
+
* band would put this at `>= 1.1` — unreachable, leaving the
|
|
593
|
+
* monitor Offline even after the OSD is marked back in.
|
|
594
|
+
*/
|
|
595
|
+
isBinaryMetric: true,
|
|
584
596
|
}),
|
|
585
597
|
});
|
|
586
598
|
},
|
|
@@ -675,6 +687,12 @@ const monQuorumDegradedTemplate: CephAlertTemplate = {
|
|
|
675
687
|
metricAlias,
|
|
676
688
|
filterType: FilterType.GreaterThanOrEqualTo,
|
|
677
689
|
value: 1,
|
|
690
|
+
/*
|
|
691
|
+
* `ceph_mon_quorum_status` is strictly 0 or 1, so the shared 10%
|
|
692
|
+
* recovery dead band would put this at `>= 1.1` — unreachable,
|
|
693
|
+
* leaving the monitor Offline even after the mon rejoins quorum.
|
|
694
|
+
*/
|
|
695
|
+
isBinaryMetric: true,
|
|
678
696
|
}),
|
|
679
697
|
});
|
|
680
698
|
},
|