@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
|
@@ -25,6 +25,7 @@ import KubernetesCluster from "../../Models/DatabaseModels/KubernetesCluster";
|
|
|
25
25
|
import ProxmoxCluster from "../../Models/DatabaseModels/ProxmoxCluster";
|
|
26
26
|
import VMwareVCenter from "../../Models/DatabaseModels/VMwareVCenter";
|
|
27
27
|
import CephCluster from "../../Models/DatabaseModels/CephCluster";
|
|
28
|
+
import DatabaseServer from "../../Models/DatabaseModels/DatabaseServer";
|
|
28
29
|
import DockerSwarmCluster from "../../Models/DatabaseModels/DockerSwarmCluster";
|
|
29
30
|
import ServerlessFunction from "../../Models/DatabaseModels/ServerlessFunction";
|
|
30
31
|
import CloudResource from "../../Models/DatabaseModels/CloudResource";
|
|
@@ -37,6 +38,7 @@ import KubernetesClusterService from "./KubernetesClusterService";
|
|
|
37
38
|
import ProxmoxClusterService from "./ProxmoxClusterService";
|
|
38
39
|
import VMwareVCenterService from "./VMwareVCenterService";
|
|
39
40
|
import CephClusterService from "./CephClusterService";
|
|
41
|
+
import DatabaseServerService from "./DatabaseServerService";
|
|
40
42
|
import DockerSwarmClusterService from "./DockerSwarmClusterService";
|
|
41
43
|
import ServerlessFunctionService from "./ServerlessFunctionService";
|
|
42
44
|
import CloudResourceService from "./CloudResourceService";
|
|
@@ -1060,6 +1062,23 @@ export default class OTelIngestService {
|
|
|
1060
1062
|
telemetryRetentionConfig: cluster?.telemetryRetentionConfig ?? null,
|
|
1061
1063
|
};
|
|
1062
1064
|
}
|
|
1065
|
+
if (primaryEntityType === ServiceType.DatabaseServer) {
|
|
1066
|
+
const databaseServer: DatabaseServer | null =
|
|
1067
|
+
await DatabaseServerService.findOneById({
|
|
1068
|
+
id: resourceId,
|
|
1069
|
+
select: {
|
|
1070
|
+
retainTelemetryDataForDays: true,
|
|
1071
|
+
telemetryRetentionConfig: true,
|
|
1072
|
+
},
|
|
1073
|
+
props: { isRoot: true },
|
|
1074
|
+
});
|
|
1075
|
+
return {
|
|
1076
|
+
retainTelemetryDataForDays:
|
|
1077
|
+
databaseServer?.retainTelemetryDataForDays ?? null,
|
|
1078
|
+
telemetryRetentionConfig:
|
|
1079
|
+
databaseServer?.telemetryRetentionConfig ?? null,
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1063
1082
|
if (primaryEntityType === ServiceType.DockerSwarmCluster) {
|
|
1064
1083
|
const cluster: DockerSwarmCluster | null =
|
|
1065
1084
|
await DockerSwarmClusterService.findOneById({
|
|
@@ -39,6 +39,19 @@ export interface ParsedPodmanContainer {
|
|
|
39
39
|
cpuPercent: number | null;
|
|
40
40
|
memoryBytes: number | null;
|
|
41
41
|
observedAt: Date;
|
|
42
|
+
/*
|
|
43
|
+
* The container labels the agent copies onto its metrics (Compose /
|
|
44
|
+
* Testcontainers keys, see CONTAINER_CLASSIFIER_LABEL_KEYS): MERGED into
|
|
45
|
+
* the row's labels, never replacing what the inventory snapshot wrote.
|
|
46
|
+
* Null / omitted leaves the labels alone.
|
|
47
|
+
*/
|
|
48
|
+
labels?: JSONObject | null | undefined;
|
|
49
|
+
/*
|
|
50
|
+
* When the container's current run started (metric time − container.uptime).
|
|
51
|
+
* Fills an empty resourceCreationTimestamp, and moves it forward when
|
|
52
|
+
* the container was restarted or recreated under the same name.
|
|
53
|
+
*/
|
|
54
|
+
startedAt?: Date | null | undefined;
|
|
42
55
|
}
|
|
43
56
|
|
|
44
57
|
export interface ParsedPodmanResource {
|
|
@@ -141,7 +154,7 @@ export class Service extends DatabaseService<Model> {
|
|
|
141
154
|
|
|
142
155
|
for (const c of chunk) {
|
|
143
156
|
valueFragments.push(
|
|
144
|
-
`($${p++}, $${p++}, $${p++}, $${p++}, $${p++}, $${p++}, $${p++}, $${p++}::numeric, $${p++}::bigint, $${p++}::timestamptz, $${p++}::timestamptz, $${p++})`,
|
|
157
|
+
`($${p++}, $${p++}, $${p++}, $${p++}, $${p++}, $${p++}, $${p++}, $${p++}::numeric, $${p++}::bigint, $${p++}::timestamptz, $${p++}::timestamptz, $${p++}, $${p++}::jsonb, $${p++}::timestamptz)`,
|
|
145
158
|
);
|
|
146
159
|
params.push(
|
|
147
160
|
data.projectId.toString(),
|
|
@@ -160,15 +173,27 @@ export class Service extends DatabaseService<Model> {
|
|
|
160
173
|
c.observedAt,
|
|
161
174
|
c.observedAt,
|
|
162
175
|
0, // version (BaseModel @VersionColumn)
|
|
176
|
+
c.labels && Object.keys(c.labels).length > 0
|
|
177
|
+
? JSON.stringify(c.labels)
|
|
178
|
+
: null,
|
|
179
|
+
c.startedAt || null,
|
|
163
180
|
);
|
|
164
181
|
}
|
|
165
182
|
|
|
183
|
+
/*
|
|
184
|
+
* The same container name with a different id is a recreated
|
|
185
|
+
* container: its labels and start time replace the old ones. Else
|
|
186
|
+
* the metric labels are merged into whatever the inventory wrote,
|
|
187
|
+
* and the start time only moves forward (a restart) — by more than
|
|
188
|
+
* a minute, so clock jitter between scrapes never rewrites it.
|
|
189
|
+
*/
|
|
166
190
|
const sql: string = `
|
|
167
191
|
INSERT INTO "PodmanResource" (
|
|
168
192
|
"projectId", "podmanHostId", "kind", "name",
|
|
169
193
|
"containerId", "imageName", "state",
|
|
170
194
|
"latestCpuPercent", "latestMemoryBytes",
|
|
171
|
-
"metricsUpdatedAt", "lastSeenAt", "version"
|
|
195
|
+
"metricsUpdatedAt", "lastSeenAt", "version",
|
|
196
|
+
"labels", "resourceCreationTimestamp"
|
|
172
197
|
)
|
|
173
198
|
VALUES ${valueFragments.join(", ")}
|
|
174
199
|
ON CONFLICT ("projectId", "podmanHostId", "kind", "name")
|
|
@@ -180,6 +205,22 @@ export class Service extends DatabaseService<Model> {
|
|
|
180
205
|
"latestMemoryBytes" = COALESCE(EXCLUDED."latestMemoryBytes", "PodmanResource"."latestMemoryBytes"),
|
|
181
206
|
"metricsUpdatedAt" = EXCLUDED."metricsUpdatedAt",
|
|
182
207
|
"lastSeenAt" = EXCLUDED."lastSeenAt",
|
|
208
|
+
"labels" = CASE
|
|
209
|
+
WHEN EXCLUDED."labels" IS NULL THEN "PodmanResource"."labels"
|
|
210
|
+
WHEN lower(left(EXCLUDED."containerId", 12)) <> lower(left("PodmanResource"."containerId", 12))
|
|
211
|
+
THEN EXCLUDED."labels"
|
|
212
|
+
WHEN jsonb_typeof("PodmanResource"."labels") = 'object'
|
|
213
|
+
THEN "PodmanResource"."labels" || EXCLUDED."labels"
|
|
214
|
+
ELSE EXCLUDED."labels"
|
|
215
|
+
END,
|
|
216
|
+
"resourceCreationTimestamp" = CASE
|
|
217
|
+
WHEN EXCLUDED."resourceCreationTimestamp" IS NULL THEN "PodmanResource"."resourceCreationTimestamp"
|
|
218
|
+
WHEN "PodmanResource"."resourceCreationTimestamp" IS NULL
|
|
219
|
+
OR lower(left(EXCLUDED."containerId", 12)) <> lower(left("PodmanResource"."containerId", 12))
|
|
220
|
+
OR EXCLUDED."resourceCreationTimestamp" > "PodmanResource"."resourceCreationTimestamp" + interval '1 minute'
|
|
221
|
+
THEN EXCLUDED."resourceCreationTimestamp"
|
|
222
|
+
ELSE "PodmanResource"."resourceCreationTimestamp"
|
|
223
|
+
END,
|
|
183
224
|
"updatedAt" = now()
|
|
184
225
|
WHERE EXCLUDED."lastSeenAt" >= "PodmanResource"."lastSeenAt"
|
|
185
226
|
`;
|
|
@@ -102,10 +102,34 @@ export class Service extends DatabaseService<Model> {
|
|
|
102
102
|
return onDelete;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/*
|
|
106
|
+
* Re-matches the reminder rule for every open scheduled maintenance in the
|
|
107
|
+
* project and rewrites its nextReminderNotificationAt.
|
|
108
|
+
*
|
|
109
|
+
* Without options that is one read of at most LIMIT_MAX open scheduled
|
|
110
|
+
* maintenances, and it must stay one: the rule create, update and delete
|
|
111
|
+
* hooks run it inside the API request.
|
|
112
|
+
*
|
|
113
|
+
* `onlyWithoutNextReminder` narrows that to open scheduled maintenances with
|
|
114
|
+
* no reminder scheduled at all, and reads every one of them, in `_id`-ordered
|
|
115
|
+
* pages of LIMIT_MAX. It exists for backfills (see the
|
|
116
|
+
* ScheduleRemindersMissedByReminderRuleLookup data migration), which run in a
|
|
117
|
+
* worker rather than a request and must reach every such scheduled
|
|
118
|
+
* maintenance of the project, however many there are. The pages are cursored
|
|
119
|
+
* by `_id`, not offset, because refreshing a scheduled maintenance can take
|
|
120
|
+
* it out of the set being paged. A scheduled maintenance that already has a
|
|
121
|
+
* timestamp is left alone, because re-scheduling it would push a reminder
|
|
122
|
+
* that is due, or overdue, one full interval later.
|
|
123
|
+
*/
|
|
105
124
|
@CaptureSpan()
|
|
106
125
|
public async refreshSchedulesForOpenScheduledMaintenances(
|
|
107
126
|
projectId: ObjectID,
|
|
127
|
+
options?: { onlyWithoutNextReminder?: boolean | undefined } | undefined,
|
|
108
128
|
): Promise<void> {
|
|
129
|
+
const onlyWithoutNextReminder: boolean = Boolean(
|
|
130
|
+
options?.onlyWithoutNextReminder,
|
|
131
|
+
);
|
|
132
|
+
|
|
109
133
|
try {
|
|
110
134
|
const openStates: Array<ScheduledMaintenanceState> =
|
|
111
135
|
await ScheduledMaintenanceStateService.findBy({
|
|
@@ -133,34 +157,55 @@ export class Service extends DatabaseService<Model> {
|
|
|
133
157
|
return;
|
|
134
158
|
}
|
|
135
159
|
|
|
136
|
-
|
|
137
|
-
await ScheduledMaintenanceService.findBy({
|
|
138
|
-
query: {
|
|
139
|
-
projectId: projectId,
|
|
140
|
-
currentScheduledMaintenanceStateId: QueryHelper.any(openStateIds),
|
|
141
|
-
},
|
|
142
|
-
select: {
|
|
143
|
-
_id: true,
|
|
144
|
-
},
|
|
145
|
-
limit: LIMIT_MAX,
|
|
146
|
-
skip: 0,
|
|
147
|
-
props: {
|
|
148
|
-
isRoot: true,
|
|
149
|
-
},
|
|
150
|
-
});
|
|
160
|
+
let afterId: ObjectID | null = null;
|
|
151
161
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
await
|
|
155
|
-
scheduledMaintenanceId: scheduledMaintenance.id!,
|
|
162
|
+
while (true) {
|
|
163
|
+
const openScheduledMaintenances: Array<ScheduledMaintenance> =
|
|
164
|
+
await this.findOpenScheduledMaintenances({
|
|
156
165
|
projectId: projectId,
|
|
166
|
+
openStateIds: openStateIds,
|
|
167
|
+
onlyWithoutNextReminder: onlyWithoutNextReminder,
|
|
168
|
+
afterId: afterId,
|
|
157
169
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
170
|
+
|
|
171
|
+
for (const scheduledMaintenance of openScheduledMaintenances) {
|
|
172
|
+
try {
|
|
173
|
+
await ScheduledMaintenanceService.refreshReminderSchedule({
|
|
174
|
+
scheduledMaintenanceId: scheduledMaintenance.id!,
|
|
175
|
+
projectId: projectId,
|
|
176
|
+
});
|
|
177
|
+
} catch (error) {
|
|
178
|
+
logger.error(
|
|
179
|
+
`Failed to refresh reminder schedule for scheduled maintenance ${scheduledMaintenance.id}: ${error}`,
|
|
180
|
+
{ projectId: projectId?.toString() } as LogAttributes,
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Without the option, the one read above is all there is.
|
|
186
|
+
if (
|
|
187
|
+
!onlyWithoutNextReminder ||
|
|
188
|
+
openScheduledMaintenances.length < LIMIT_MAX
|
|
189
|
+
) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const lastId: ObjectID | null =
|
|
194
|
+
openScheduledMaintenances[openScheduledMaintenances.length - 1]!.id;
|
|
195
|
+
|
|
196
|
+
if (!lastId || (afterId && lastId.toString() <= afterId.toString())) {
|
|
197
|
+
/*
|
|
198
|
+
* A full page whose last row does not move the cursor forward
|
|
199
|
+
* would be read again forever. Not reachable with `_id ASC` and a
|
|
200
|
+
* `> afterId` filter; guarded so a broken sort cannot hang the
|
|
201
|
+
* backfill.
|
|
202
|
+
*/
|
|
203
|
+
throw new Error(
|
|
204
|
+
"the open scheduled maintenance page did not advance its _id cursor",
|
|
162
205
|
);
|
|
163
206
|
}
|
|
207
|
+
|
|
208
|
+
afterId = lastId;
|
|
164
209
|
}
|
|
165
210
|
} catch (error) {
|
|
166
211
|
logger.error(
|
|
@@ -170,6 +215,45 @@ export class Service extends DatabaseService<Model> {
|
|
|
170
215
|
}
|
|
171
216
|
}
|
|
172
217
|
|
|
218
|
+
/*
|
|
219
|
+
* One read of the project's open scheduled maintenances: those whose current
|
|
220
|
+
* state is one of `openStateIds`. Both paths of
|
|
221
|
+
* refreshSchedulesForOpenScheduledMaintenances read through here, so what
|
|
222
|
+
* "open" means is written once.
|
|
223
|
+
*
|
|
224
|
+
* With `onlyWithoutNextReminder`, only those with no reminder scheduled,
|
|
225
|
+
* `_id` ascending and after `afterId` when there is one. Without it, no
|
|
226
|
+
* cursor and the default order: the read the rule hooks have always made.
|
|
227
|
+
*/
|
|
228
|
+
private async findOpenScheduledMaintenances(data: {
|
|
229
|
+
projectId: ObjectID;
|
|
230
|
+
openStateIds: Array<ObjectID>;
|
|
231
|
+
onlyWithoutNextReminder: boolean;
|
|
232
|
+
afterId: ObjectID | null;
|
|
233
|
+
}): Promise<Array<ScheduledMaintenance>> {
|
|
234
|
+
return await ScheduledMaintenanceService.findBy({
|
|
235
|
+
query: {
|
|
236
|
+
projectId: data.projectId,
|
|
237
|
+
currentScheduledMaintenanceStateId: QueryHelper.any(data.openStateIds),
|
|
238
|
+
...(data.onlyWithoutNextReminder
|
|
239
|
+
? { nextReminderNotificationAt: QueryHelper.isNull() }
|
|
240
|
+
: {}),
|
|
241
|
+
...(data.afterId ? { _id: QueryHelper.greaterThan(data.afterId) } : {}),
|
|
242
|
+
},
|
|
243
|
+
select: {
|
|
244
|
+
_id: true,
|
|
245
|
+
},
|
|
246
|
+
...(data.onlyWithoutNextReminder
|
|
247
|
+
? { sort: { _id: SortOrder.Ascending } }
|
|
248
|
+
: {}),
|
|
249
|
+
limit: LIMIT_MAX,
|
|
250
|
+
skip: 0,
|
|
251
|
+
props: {
|
|
252
|
+
isRoot: true,
|
|
253
|
+
},
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
|
|
173
257
|
@CaptureSpan()
|
|
174
258
|
public async findMatchingRule(data: {
|
|
175
259
|
projectId: ObjectID;
|
|
@@ -32,6 +32,7 @@ import KubernetesClusterService from "./KubernetesClusterService";
|
|
|
32
32
|
import ProxmoxClusterService from "./ProxmoxClusterService";
|
|
33
33
|
import VMwareVCenterService from "./VMwareVCenterService";
|
|
34
34
|
import CephClusterService from "./CephClusterService";
|
|
35
|
+
import DatabaseServerService from "./DatabaseServerService";
|
|
35
36
|
import IoTFleetService from "./IoTFleetService";
|
|
36
37
|
import Host from "../../Models/DatabaseModels/Host";
|
|
37
38
|
import DockerHost from "../../Models/DatabaseModels/DockerHost";
|
|
@@ -41,6 +42,7 @@ import ProxmoxCluster from "../../Models/DatabaseModels/ProxmoxCluster";
|
|
|
41
42
|
import VMwareVCenter from "../../Models/DatabaseModels/VMwareVCenter";
|
|
42
43
|
import IoTFleet from "../../Models/DatabaseModels/IoTFleet";
|
|
43
44
|
import CephCluster from "../../Models/DatabaseModels/CephCluster";
|
|
45
|
+
import DatabaseServer from "../../Models/DatabaseModels/DatabaseServer";
|
|
44
46
|
import ServiceType from "../../Types/Telemetry/ServiceType";
|
|
45
47
|
import {
|
|
46
48
|
AverageSpanRowSizeInBytes,
|
|
@@ -485,8 +487,8 @@ export class Service extends DatabaseService<Model> {
|
|
|
485
487
|
/*
|
|
486
488
|
* Map of resourceId -> retainTelemetryDataForDays for every resource in
|
|
487
489
|
* the project that can own telemetry (Service, Host, DockerHost,
|
|
488
|
-
* KubernetesCluster, ProxmoxCluster, VMwareVCenter, CephCluster
|
|
489
|
-
* scale billed
|
|
490
|
+
* KubernetesCluster, ProxmoxCluster, VMwareVCenter, CephCluster,
|
|
491
|
+
* DatabaseServer). Used to scale billed
|
|
490
492
|
* cost by the actual retention applied to each resource's telemetry.
|
|
491
493
|
* Resources without an override (and the unattributed bucket) fall back
|
|
492
494
|
* to the project default.
|
|
@@ -628,6 +630,31 @@ export class Service extends DatabaseService<Model> {
|
|
|
628
630
|
}
|
|
629
631
|
}
|
|
630
632
|
|
|
633
|
+
/*
|
|
634
|
+
* Databases are mostly auto-discovered (collector, client spans,
|
|
635
|
+
* Kubernetes / Docker / Podman), so a project can hold hundreds of
|
|
636
|
+
* them. Only rows carrying an override matter here — read just those.
|
|
637
|
+
*/
|
|
638
|
+
const databaseServers: Array<DatabaseServer> =
|
|
639
|
+
await DatabaseServerService.findBy({
|
|
640
|
+
query: {
|
|
641
|
+
projectId: projectId,
|
|
642
|
+
retainTelemetryDataForDays: QueryHelper.notNull(),
|
|
643
|
+
},
|
|
644
|
+
select: { _id: true, retainTelemetryDataForDays: true },
|
|
645
|
+
skip: 0,
|
|
646
|
+
limit: LIMIT_MAX,
|
|
647
|
+
props: { isRoot: true },
|
|
648
|
+
});
|
|
649
|
+
for (const databaseServer of databaseServers) {
|
|
650
|
+
if (databaseServer.id && databaseServer.retainTelemetryDataForDays) {
|
|
651
|
+
retentionByServiceId.set(
|
|
652
|
+
databaseServer.id.toString(),
|
|
653
|
+
databaseServer.retainTelemetryDataForDays,
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
631
658
|
const iotFleets: Array<IoTFleet> = await IoTFleetService.findBy({
|
|
632
659
|
query: { projectId: projectId },
|
|
633
660
|
select: { _id: true, retainTelemetryDataForDays: true },
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import DatabaseService from "./DatabaseService";
|
|
2
|
+
import Model from "../../Models/DatabaseModels/UserProjectSsoConsent";
|
|
3
|
+
import ObjectID from "../../Types/ObjectID";
|
|
4
|
+
import PositiveNumber from "../../Types/PositiveNumber";
|
|
5
|
+
import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* See the model for what a row means. Written only from the confirmation link
|
|
9
|
+
* a project-SSO sign-in emails to the account's own address; read on every
|
|
10
|
+
* project-SSO sign-in on the hosted service.
|
|
11
|
+
*/
|
|
12
|
+
export class Service extends DatabaseService<Model> {
|
|
13
|
+
public constructor() {
|
|
14
|
+
super(Model);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@CaptureSpan()
|
|
18
|
+
public async hasConsent(data: {
|
|
19
|
+
userId: ObjectID;
|
|
20
|
+
projectId: ObjectID;
|
|
21
|
+
}): Promise<boolean> {
|
|
22
|
+
const count: PositiveNumber = await this.countBy({
|
|
23
|
+
query: {
|
|
24
|
+
userId: data.userId,
|
|
25
|
+
projectId: data.projectId,
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
isRoot: true,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return count.toNumber() > 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* Idempotent. Two clicks on the same link, or two links for the same
|
|
37
|
+
* project, must end with one row and no error for whoever clicked second.
|
|
38
|
+
*/
|
|
39
|
+
@CaptureSpan()
|
|
40
|
+
public async recordConsent(data: {
|
|
41
|
+
userId: ObjectID;
|
|
42
|
+
projectId: ObjectID;
|
|
43
|
+
}): Promise<void> {
|
|
44
|
+
if (await this.hasConsent(data)) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const consent: Model = new Model();
|
|
49
|
+
consent.userId = data.userId;
|
|
50
|
+
consent.projectId = data.projectId;
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
await this.create({
|
|
54
|
+
data: consent,
|
|
55
|
+
props: {
|
|
56
|
+
isRoot: true,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
} catch (err) {
|
|
60
|
+
/*
|
|
61
|
+
* Lost a race with a concurrent click: the unique index turned the
|
|
62
|
+
* second insert away, and the row it wanted is there. Anything else is
|
|
63
|
+
* a real failure.
|
|
64
|
+
*/
|
|
65
|
+
if (await this.hasConsent(data)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
throw err;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default new Service();
|
|
@@ -799,13 +799,26 @@ export class Service extends DatabaseService<Model> {
|
|
|
799
799
|
* `isMasterAdmin` on a self-service signup. It always assigns the column, so
|
|
800
800
|
* an `isMasterAdmin: true` smuggled into the request body is overwritten
|
|
801
801
|
* rather than honoured (signup creates with `isRoot: true`, which bypasses
|
|
802
|
-
* the column's empty `create: []` access control).
|
|
802
|
+
* the column's empty `create: []` access control). For the same reason it
|
|
803
|
+
* refuses a user that already carries an `_id`.
|
|
803
804
|
*/
|
|
804
805
|
@CaptureSpan()
|
|
805
806
|
public async createUserOnSignup(data: {
|
|
806
807
|
user: Model;
|
|
807
808
|
props: DatabaseCommonInteractionProps;
|
|
808
809
|
}): Promise<Model> {
|
|
810
|
+
/*
|
|
811
|
+
* A signup is always a new row. TypeORM's save() turns an entity carrying
|
|
812
|
+
* an existing primary key into an UPDATE of that row, and this create runs
|
|
813
|
+
* as root, which DatabaseService.create exempts from its own supplied-id
|
|
814
|
+
* check -- so an `_id` reaching here would overwrite the email and password
|
|
815
|
+
* of whichever user it names instead of creating one. /signup builds its
|
|
816
|
+
* model from an allow-list that never includes `_id`; this is the backstop.
|
|
817
|
+
*/
|
|
818
|
+
if (data.user._id) {
|
|
819
|
+
throw new BadDataException("An id cannot be supplied when signing up.");
|
|
820
|
+
}
|
|
821
|
+
|
|
809
822
|
// Never inherited from the caller. Decided below, or not at all.
|
|
810
823
|
data.user.isMasterAdmin = false;
|
|
811
824
|
|
|
@@ -38,6 +38,8 @@ import DockerSwarmClusterOwnerTeamService from "../../../Services/DockerSwarmClu
|
|
|
38
38
|
import DockerSwarmClusterOwnerUserService from "../../../Services/DockerSwarmClusterOwnerUserService";
|
|
39
39
|
import VMwareVCenterOwnerTeamService from "../../../Services/VMwareVCenterOwnerTeamService";
|
|
40
40
|
import VMwareVCenterOwnerUserService from "../../../Services/VMwareVCenterOwnerUserService";
|
|
41
|
+
import DatabaseServerOwnerTeamService from "../../../Services/DatabaseServerOwnerTeamService";
|
|
42
|
+
import DatabaseServerOwnerUserService from "../../../Services/DatabaseServerOwnerUserService";
|
|
41
43
|
import IoTFleetOwnerTeamService from "../../../Services/IoTFleetOwnerTeamService";
|
|
42
44
|
import IoTFleetOwnerUserService from "../../../Services/IoTFleetOwnerUserService";
|
|
43
45
|
import NetworkDeviceOwnerTeamService from "../../../Services/NetworkDeviceOwnerTeamService";
|
|
@@ -65,6 +67,7 @@ import ProxmoxClusterService from "../../../Services/ProxmoxClusterService";
|
|
|
65
67
|
import CephClusterService from "../../../Services/CephClusterService";
|
|
66
68
|
import DockerSwarmClusterService from "../../../Services/DockerSwarmClusterService";
|
|
67
69
|
import VMwareVCenterService from "../../../Services/VMwareVCenterService";
|
|
70
|
+
import DatabaseServerService from "../../../Services/DatabaseServerService";
|
|
68
71
|
import IoTFleetService from "../../../Services/IoTFleetService";
|
|
69
72
|
import NetworkDeviceService from "../../../Services/NetworkDeviceService";
|
|
70
73
|
|
|
@@ -306,6 +309,21 @@ const ownerTableRegistry: Map<string, OwnerTablePair> = new Map<
|
|
|
306
309
|
modelService: VMwareVCenterService,
|
|
307
310
|
},
|
|
308
311
|
],
|
|
312
|
+
[
|
|
313
|
+
/*
|
|
314
|
+
* Receiver batches (the collector / Database Agent) stamp the database
|
|
315
|
+
* server's id as the telemetry row's serviceId (serviceType
|
|
316
|
+
* DatabaseServer), so owning a database grants its telemetry.
|
|
317
|
+
*/
|
|
318
|
+
"DatabaseServer",
|
|
319
|
+
{
|
|
320
|
+
ownerUserService: DatabaseServerOwnerUserService,
|
|
321
|
+
ownerTeamService: DatabaseServerOwnerTeamService,
|
|
322
|
+
fkColumn: "databaseServerId",
|
|
323
|
+
canOwnTelemetry: true,
|
|
324
|
+
modelService: DatabaseServerService,
|
|
325
|
+
},
|
|
326
|
+
],
|
|
309
327
|
[
|
|
310
328
|
/*
|
|
311
329
|
* IoT telemetry carries the fleet ID in primaryEntityId even though its
|
|
@@ -28,9 +28,22 @@ export default class QueryHelper {
|
|
|
28
28
|
|
|
29
29
|
return Raw(
|
|
30
30
|
(alias: string) => {
|
|
31
|
+
/*
|
|
32
|
+
* SELECT builders hand Raw the unescaped `Alias.property` path and
|
|
33
|
+
* quote it afterwards, but only where the whole token is `Alias.<known
|
|
34
|
+
* property>`. `Alias."criteria"` is not such a token, so an unquoted
|
|
35
|
+
* qualifier reached Postgres as-is and folded to lowercase, which
|
|
36
|
+
* names no table in FROM ("missing FROM-clause entry for table
|
|
37
|
+
* "incidentreminderrule""). Quote the qualifier here instead.
|
|
38
|
+
*
|
|
39
|
+
* UPDATE and DELETE builders hand Raw the bare property name, with no
|
|
40
|
+
* alias, and there criteria stays a bare quoted column.
|
|
41
|
+
*/
|
|
31
42
|
const separatorIndex: number = alias.lastIndexOf(".");
|
|
32
43
|
const qualifier: string =
|
|
33
|
-
separatorIndex >= 0
|
|
44
|
+
separatorIndex >= 0
|
|
45
|
+
? `${QueryHelper.quoteIdentifier(alias.slice(0, separatorIndex))}.`
|
|
46
|
+
: "";
|
|
34
47
|
const criteriaAlias: string = `${qualifier}"${criteriaColumnName}"`;
|
|
35
48
|
|
|
36
49
|
return `((CASE WHEN ${criteriaAlias} IS NULL THEN COALESCE(${alias}, false) ELSE ${alias} IS NULL END) = :${rid})`;
|
|
@@ -41,6 +54,22 @@ export default class QueryHelper {
|
|
|
41
54
|
);
|
|
42
55
|
}
|
|
43
56
|
|
|
57
|
+
/*
|
|
58
|
+
* A Postgres quoted identifier. TypeORM 0.3 always hands Raw an unescaped
|
|
59
|
+
* alias; one that is already quoted is kept as is, defensively.
|
|
60
|
+
*/
|
|
61
|
+
private static quoteIdentifier(identifier: string): string {
|
|
62
|
+
if (
|
|
63
|
+
identifier.length >= 2 &&
|
|
64
|
+
identifier.startsWith('"') &&
|
|
65
|
+
identifier.endsWith('"')
|
|
66
|
+
) {
|
|
67
|
+
return identifier;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return `"${identifier.replace(/"/g, '""')}"`;
|
|
71
|
+
}
|
|
72
|
+
|
|
44
73
|
@CaptureSpan()
|
|
45
74
|
public static modulo(
|
|
46
75
|
moduloBy: number,
|
|
@@ -11,6 +11,7 @@ import ServerlessFunction from "../../../../Models/DatabaseModels/ServerlessFunc
|
|
|
11
11
|
import CloudResource from "../../../../Models/DatabaseModels/CloudResource";
|
|
12
12
|
import IoTFleet from "../../../../Models/DatabaseModels/IoTFleet";
|
|
13
13
|
import NetworkDevice from "../../../../Models/DatabaseModels/NetworkDevice";
|
|
14
|
+
import DatabaseServer from "../../../../Models/DatabaseModels/DatabaseServer";
|
|
14
15
|
import Metric from "../../../../Models/AnalyticsModels/Metric";
|
|
15
16
|
import Log from "../../../../Models/AnalyticsModels/Log";
|
|
16
17
|
import Span from "../../../../Models/AnalyticsModels/Span";
|
|
@@ -55,6 +56,7 @@ import ServerlessFunctionService from "../../../Services/ServerlessFunctionServi
|
|
|
55
56
|
import CloudResourceService from "../../../Services/CloudResourceService";
|
|
56
57
|
import IoTFleetService from "../../../Services/IoTFleetService";
|
|
57
58
|
import NetworkDeviceService from "../../../Services/NetworkDeviceService";
|
|
59
|
+
import DatabaseServerService from "../../../Services/DatabaseServerService";
|
|
58
60
|
import MetricService from "../../../Services/MetricService";
|
|
59
61
|
import LogAggregationService, {
|
|
60
62
|
HistogramBucket,
|
|
@@ -66,7 +68,9 @@ import FindBy from "../../../Types/Database/FindBy";
|
|
|
66
68
|
import QueryHelper from "../../../Types/Database/QueryHelper";
|
|
67
69
|
import DatabaseRequestType from "../../../Types/BaseDatabase/DatabaseRequestType";
|
|
68
70
|
import ModelPermission from "../../../Types/AnalyticsDatabase/ModelPermission";
|
|
69
|
-
import {
|
|
71
|
+
import ResourceEntityFilter, {
|
|
72
|
+
ResourceEntityScope,
|
|
73
|
+
} from "../../Telemetry/ResourceEntityFilter";
|
|
70
74
|
import ToolResultSerializer, { SerializedResult } from "./Serializer";
|
|
71
75
|
import {
|
|
72
76
|
ObservabilityTool,
|
|
@@ -87,6 +91,17 @@ interface ResourceDescriptor {
|
|
|
87
91
|
attributeKey?: string;
|
|
88
92
|
keyFor?: (projectId: string, identifier: string) => string;
|
|
89
93
|
runtime?: string;
|
|
94
|
+
/*
|
|
95
|
+
* For a resource whose telemetry is not named by one identifier (a
|
|
96
|
+
* Database owns several endpoints plus the pods / containers it runs as):
|
|
97
|
+
* its scope, resolved exactly the way the explorer's resource facet and
|
|
98
|
+
* the resource's own pages resolve it. Called only after the
|
|
99
|
+
* permission-checked parent read.
|
|
100
|
+
*/
|
|
101
|
+
resolveResourceScopes?: (data: {
|
|
102
|
+
projectId: ObjectID;
|
|
103
|
+
id: ObjectID;
|
|
104
|
+
}) => Promise<Array<ResourceEntityScope>>;
|
|
90
105
|
}
|
|
91
106
|
|
|
92
107
|
/*
|
|
@@ -274,6 +289,30 @@ const RESOURCE_DESCRIPTORS: Record<AIResourceType, ResourceDescriptor> = {
|
|
|
274
289
|
"lastPolledAt",
|
|
275
290
|
],
|
|
276
291
|
},
|
|
292
|
+
[AIResourceType.DatabaseServer]: {
|
|
293
|
+
model: DatabaseServer,
|
|
294
|
+
findBy: (data: FindBy<BaseModel>) => {
|
|
295
|
+
return DatabaseServerService.findBy(data as never);
|
|
296
|
+
},
|
|
297
|
+
fields: [
|
|
298
|
+
"dbSystem",
|
|
299
|
+
"dbVersion",
|
|
300
|
+
"serverAddress",
|
|
301
|
+
"serverPort",
|
|
302
|
+
"discoverySource",
|
|
303
|
+
"instanceCount",
|
|
304
|
+
"collectorLastSeenAt",
|
|
305
|
+
],
|
|
306
|
+
resolveResourceScopes: (data: {
|
|
307
|
+
projectId: ObjectID;
|
|
308
|
+
id: ObjectID;
|
|
309
|
+
}): Promise<Array<ResourceEntityScope>> => {
|
|
310
|
+
return ResourceEntityFilter.resolveScopes({
|
|
311
|
+
projectId: data.projectId,
|
|
312
|
+
selections: { databaseServerId: [data.id.toString()] },
|
|
313
|
+
});
|
|
314
|
+
},
|
|
315
|
+
},
|
|
277
316
|
};
|
|
278
317
|
|
|
279
318
|
function getResourceType(args: JSONObject): AIResourceType {
|
|
@@ -503,10 +542,33 @@ export function buildAIResourceTelemetryScope(data: {
|
|
|
503
542
|
resource: JSONObject;
|
|
504
543
|
projectId: ObjectID;
|
|
505
544
|
signal: ResourceSignal;
|
|
545
|
+
// From the descriptor's resolveResourceScopes, when it has one.
|
|
546
|
+
resolvedScopes?: Array<ResourceEntityScope> | undefined;
|
|
506
547
|
}): AIResourceTelemetryScope {
|
|
507
548
|
const descriptor: ResourceDescriptor = RESOURCE_DESCRIPTORS[data.type];
|
|
508
549
|
const note: string =
|
|
509
550
|
"Scope is the parent resource; no individual child identity or namespace was selected. Missing telemetry is not evidence of health.";
|
|
551
|
+
if (data.type === AIResourceType.DatabaseServer) {
|
|
552
|
+
/*
|
|
553
|
+
* Only a resolved scope of THIS database is used; one that could not be
|
|
554
|
+
* resolved narrows to the row's own collector / agent data, never widens.
|
|
555
|
+
*/
|
|
556
|
+
const scopes: Array<ResourceEntityScope> = (
|
|
557
|
+
data.resolvedScopes || []
|
|
558
|
+
).filter((scope: ResourceEntityScope): boolean => {
|
|
559
|
+
return (
|
|
560
|
+
scope.entityIds.length === 1 &&
|
|
561
|
+
scope.entityIds[0] === data.id.toString()
|
|
562
|
+
);
|
|
563
|
+
});
|
|
564
|
+
return {
|
|
565
|
+
resourceScopes:
|
|
566
|
+
scopes.length > 0
|
|
567
|
+
? scopes
|
|
568
|
+
: [{ entityIds: [data.id.toString()], entityKeys: [] }],
|
|
569
|
+
note: `${note} A database's telemetry is its own collector / Database Agent data plus everything carrying one of its endpoints or workload members: application database calls, and the logs and metrics of the pods and containers it runs as.`,
|
|
570
|
+
};
|
|
571
|
+
}
|
|
510
572
|
if (data.type === AIResourceType.CloudResource) {
|
|
511
573
|
const attributes: Record<string, string> = {};
|
|
512
574
|
for (const [column, key] of [
|
|
@@ -707,6 +769,12 @@ export const QueryResourceTelemetryTool: ObservabilityTool = {
|
|
|
707
769
|
resource: resources[0] as unknown as JSONObject,
|
|
708
770
|
projectId: ctx.projectId,
|
|
709
771
|
signal,
|
|
772
|
+
resolvedScopes: descriptor.resolveResourceScopes
|
|
773
|
+
? await descriptor.resolveResourceScopes({
|
|
774
|
+
projectId: ctx.projectId,
|
|
775
|
+
id,
|
|
776
|
+
})
|
|
777
|
+
: undefined,
|
|
710
778
|
});
|
|
711
779
|
const target: AIChatCitationTarget = resourceTarget(type, id);
|
|
712
780
|
const label: string = `${getAIResourceDefinition(type).label} ${signal}, ${startTime.toISOString()} – ${endTime.toISOString()}`;
|