@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
package/Utils/MetricUnitUtil.ts
CHANGED
|
@@ -15,6 +15,11 @@ interface UnitDefinition {
|
|
|
15
15
|
label: string;
|
|
16
16
|
aliases: Array<string>;
|
|
17
17
|
toCanonical: number;
|
|
18
|
+
/*
|
|
19
|
+
* A unit the family can CONVERT but that the threshold / legend unit
|
|
20
|
+
* pickers never offer. See the binary byte units below for why.
|
|
21
|
+
*/
|
|
22
|
+
isConversionOnly?: boolean | undefined;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
/*
|
|
@@ -59,6 +64,61 @@ const byteUnits: Array<UnitDefinition> = [
|
|
|
59
64
|
aliases: ["pb", "petabyte", "petabytes", "pby"],
|
|
60
65
|
toCanonical: 1e15,
|
|
61
66
|
},
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Binary (IEC) byte units — powers of 1024, not 1000. OpenTelemetry
|
|
70
|
+
* spells them in UCUM ("KiBy", "MiBy"), and the vcenter receiver reports
|
|
71
|
+
* memory in them, so without these members a "MiBy" sample was in no
|
|
72
|
+
* family at all: it could not be converted into a "GB" threshold (the
|
|
73
|
+
* value passed through unchanged, about a thousand times off) and the
|
|
74
|
+
* notification formatter could not scale it ("1048576 MiB" instead of
|
|
75
|
+
* "1.1 TB").
|
|
76
|
+
*
|
|
77
|
+
* CONVERSION-ONLY, deliberately. The threshold and legend unit pickers
|
|
78
|
+
* (CriteriaFilter, MetricAlias) build their options from
|
|
79
|
+
* getCompatibleUnits, whose byte list is the six decimal units — a
|
|
80
|
+
* contract MetricUnitUtil.test pins. Listing five near-duplicates
|
|
81
|
+
* ("MB" next to "MiB") in every bytes dropdown would clutter it for
|
|
82
|
+
* every metric, while the conversions below are what actually fixes
|
|
83
|
+
* the numbers. So the pickers keep treating a native "MiBy" exactly as
|
|
84
|
+
* they did before (a single raw-unit option, free-text legend), and
|
|
85
|
+
* only convertToMetricUnit / getFamilyBaseUnit see these members.
|
|
86
|
+
*/
|
|
87
|
+
{
|
|
88
|
+
value: "KiB",
|
|
89
|
+
label: "Kibibytes (KiB)",
|
|
90
|
+
aliases: ["kib", "kiby", "kibibyte", "kibibytes"],
|
|
91
|
+
toCanonical: 1024,
|
|
92
|
+
isConversionOnly: true,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: "MiB",
|
|
96
|
+
label: "Mebibytes (MiB)",
|
|
97
|
+
aliases: ["mib", "miby", "mebibyte", "mebibytes"],
|
|
98
|
+
toCanonical: 1024 ** 2,
|
|
99
|
+
isConversionOnly: true,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: "GiB",
|
|
103
|
+
label: "Gibibytes (GiB)",
|
|
104
|
+
aliases: ["gib", "giby", "gibibyte", "gibibytes"],
|
|
105
|
+
toCanonical: 1024 ** 3,
|
|
106
|
+
isConversionOnly: true,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
value: "TiB",
|
|
110
|
+
label: "Tebibytes (TiB)",
|
|
111
|
+
aliases: ["tib", "tiby", "tebibyte", "tebibytes"],
|
|
112
|
+
toCanonical: 1024 ** 4,
|
|
113
|
+
isConversionOnly: true,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
value: "PiB",
|
|
117
|
+
label: "Pebibytes (PiB)",
|
|
118
|
+
aliases: ["pib", "piby", "pebibyte", "pebibytes"],
|
|
119
|
+
toCanonical: 1024 ** 5,
|
|
120
|
+
isConversionOnly: true,
|
|
121
|
+
},
|
|
62
122
|
];
|
|
63
123
|
|
|
64
124
|
const timeUnits: Array<UnitDefinition> = [
|
|
@@ -167,24 +227,40 @@ function normalize(unit: string): string {
|
|
|
167
227
|
return unit.trim().toLowerCase();
|
|
168
228
|
}
|
|
169
229
|
|
|
230
|
+
/*
|
|
231
|
+
* Which members a lookup may match. "offered" is what the unit pickers
|
|
232
|
+
* work with — every member except the conversion-only ones — and is what
|
|
233
|
+
* the picker-facing methods use, so a conversion-only native unit still
|
|
234
|
+
* reads to them as "no known family". "all" is for arithmetic.
|
|
235
|
+
*/
|
|
236
|
+
type MemberScope = "offered" | "all";
|
|
237
|
+
|
|
238
|
+
function isInScope(definition: UnitDefinition, scope: MemberScope): boolean {
|
|
239
|
+
return scope === "all" || !definition.isConversionOnly;
|
|
240
|
+
}
|
|
241
|
+
|
|
170
242
|
function findDefinitionInFamily(
|
|
171
243
|
unit: string,
|
|
172
244
|
family: Array<UnitDefinition>,
|
|
245
|
+
scope: MemberScope,
|
|
173
246
|
): UnitDefinition | null {
|
|
174
247
|
const normalized: string = normalize(unit);
|
|
175
248
|
return (
|
|
176
249
|
family.find((u: UnitDefinition) => {
|
|
177
|
-
return u.aliases.includes(normalized);
|
|
250
|
+
return isInScope(u, scope) && u.aliases.includes(normalized);
|
|
178
251
|
}) || null
|
|
179
252
|
);
|
|
180
253
|
}
|
|
181
254
|
|
|
182
|
-
function findFamily(
|
|
255
|
+
function findFamily(
|
|
256
|
+
unit: string,
|
|
257
|
+
scope: MemberScope,
|
|
258
|
+
): Array<UnitDefinition> | null {
|
|
183
259
|
if (!unit || !unit.trim()) {
|
|
184
260
|
return null;
|
|
185
261
|
}
|
|
186
262
|
for (const family of allFamilies) {
|
|
187
|
-
if (findDefinitionInFamily(unit, family)) {
|
|
263
|
+
if (findDefinitionInFamily(unit, family, scope)) {
|
|
188
264
|
return family;
|
|
189
265
|
}
|
|
190
266
|
}
|
|
@@ -205,14 +281,21 @@ export default class MetricUnitUtil {
|
|
|
205
281
|
return [];
|
|
206
282
|
}
|
|
207
283
|
|
|
208
|
-
const family: Array<UnitDefinition> | null = findFamily(
|
|
284
|
+
const family: Array<UnitDefinition> | null = findFamily(
|
|
285
|
+
metricUnit,
|
|
286
|
+
"offered",
|
|
287
|
+
);
|
|
209
288
|
if (!family) {
|
|
210
289
|
return [{ value: metricUnit, label: metricUnit }];
|
|
211
290
|
}
|
|
212
291
|
|
|
213
|
-
return family
|
|
214
|
-
|
|
215
|
-
|
|
292
|
+
return family
|
|
293
|
+
.filter((u: UnitDefinition) => {
|
|
294
|
+
return isInScope(u, "offered");
|
|
295
|
+
})
|
|
296
|
+
.map((u: UnitDefinition) => {
|
|
297
|
+
return { value: u.value, label: u.label };
|
|
298
|
+
});
|
|
216
299
|
}
|
|
217
300
|
|
|
218
301
|
/*
|
|
@@ -233,7 +316,10 @@ export default class MetricUnitUtil {
|
|
|
233
316
|
return undefined;
|
|
234
317
|
}
|
|
235
318
|
|
|
236
|
-
const family: Array<UnitDefinition> | null = findFamily(
|
|
319
|
+
const family: Array<UnitDefinition> | null = findFamily(
|
|
320
|
+
metricUnit,
|
|
321
|
+
"offered",
|
|
322
|
+
);
|
|
237
323
|
if (!family) {
|
|
238
324
|
return metricUnit;
|
|
239
325
|
}
|
|
@@ -241,6 +327,7 @@ export default class MetricUnitUtil {
|
|
|
241
327
|
const def: UnitDefinition | null = findDefinitionInFamily(
|
|
242
328
|
metricUnit,
|
|
243
329
|
family,
|
|
330
|
+
"offered",
|
|
244
331
|
);
|
|
245
332
|
|
|
246
333
|
if (family === percentUnits && def?.value === "1") {
|
|
@@ -272,7 +359,7 @@ export default class MetricUnitUtil {
|
|
|
272
359
|
return value;
|
|
273
360
|
}
|
|
274
361
|
|
|
275
|
-
const family: Array<UnitDefinition> | null = findFamily(metricUnit);
|
|
362
|
+
const family: Array<UnitDefinition> | null = findFamily(metricUnit, "all");
|
|
276
363
|
if (!family) {
|
|
277
364
|
return value;
|
|
278
365
|
}
|
|
@@ -280,10 +367,12 @@ export default class MetricUnitUtil {
|
|
|
280
367
|
const fromDef: UnitDefinition | null = findDefinitionInFamily(
|
|
281
368
|
fromUnit,
|
|
282
369
|
family,
|
|
370
|
+
"all",
|
|
283
371
|
);
|
|
284
372
|
const metricDef: UnitDefinition | null = findDefinitionInFamily(
|
|
285
373
|
metricUnit,
|
|
286
374
|
family,
|
|
375
|
+
"all",
|
|
287
376
|
);
|
|
288
377
|
|
|
289
378
|
if (!fromDef || !metricDef) {
|
|
@@ -317,7 +406,7 @@ export default class MetricUnitUtil {
|
|
|
317
406
|
return null;
|
|
318
407
|
}
|
|
319
408
|
|
|
320
|
-
const family: Array<UnitDefinition> | null = findFamily(metricUnit);
|
|
409
|
+
const family: Array<UnitDefinition> | null = findFamily(metricUnit, "all");
|
|
321
410
|
if (!family) {
|
|
322
411
|
return null;
|
|
323
412
|
}
|
|
@@ -335,6 +424,9 @@ export default class MetricUnitUtil {
|
|
|
335
424
|
* Convenience: does the metric unit belong to a family we can offer
|
|
336
425
|
* conversions for? When false, the UI should still render a dropdown,
|
|
337
426
|
* but with just the raw unit.
|
|
427
|
+
*
|
|
428
|
+
* "Offer" is literal: a conversion-only unit ("MiBy") answers false, in
|
|
429
|
+
* step with getCompatibleUnits, which gives it no family list either.
|
|
338
430
|
*/
|
|
339
431
|
public static hasCompatibleUnitFamily(
|
|
340
432
|
metricUnit: string | undefined,
|
|
@@ -342,6 +434,6 @@ export default class MetricUnitUtil {
|
|
|
342
434
|
if (!metricUnit || !metricUnit.trim()) {
|
|
343
435
|
return false;
|
|
344
436
|
}
|
|
345
|
-
return findFamily(metricUnit) !== null;
|
|
437
|
+
return findFamily(metricUnit, "offered") !== null;
|
|
346
438
|
}
|
|
347
439
|
}
|
|
@@ -35,22 +35,39 @@ import ValueFormatter from "../ValueFormatter";
|
|
|
35
35
|
* sample arrive carrying the unit "GB", and ValueFormatter has a
|
|
36
36
|
* ladder for "bytes" but not for "GB" — so 2500 of them rendered
|
|
37
37
|
* "2.5K GB" instead of "2.5 TB". Anything in a MetricUnitUtil family
|
|
38
|
-
* is converted to that family's base before the ladder runs.
|
|
38
|
+
* is converted to that family's base before the ladder runs. That
|
|
39
|
+
* includes the binary (IEC) byte units the vcenter receiver reports
|
|
40
|
+
* memory in: 2048 "MiBy" is restated as 2147483648 bytes and reads
|
|
41
|
+
* "2.15 GB", where it used to read "2048 MiB" and, for a large host,
|
|
42
|
+
* "1048576 MiB".
|
|
39
43
|
*
|
|
40
44
|
* 3. UNITS WORTH HIDING. OTel's dimensionless "1" and UCUM's
|
|
41
45
|
* annotation-only units ("{restarts}", "{packets}") are not
|
|
42
46
|
* dimensions, and printing them produces the "0.06 1" that
|
|
43
47
|
* CompareCriteria and MonitorCriteriaObservationBuilder each grew
|
|
44
|
-
* their own guard against. That rule lives here now
|
|
48
|
+
* their own guard against. That rule lives here now — with one
|
|
49
|
+
* exception: braces around a REAL, scalable unit ("{KiBy/s}", which
|
|
50
|
+
* the vcenter receiver uses for throughput) are unwrapped rather than
|
|
51
|
+
* hidden, because the value in them is a quantity, not a count.
|
|
45
52
|
*/
|
|
46
53
|
export default class MetricValueFormatter {
|
|
47
54
|
/*
|
|
48
55
|
* UCUM annotation-only units — "{thread}", "{packets}", "{errors}".
|
|
49
56
|
* The braces describe what is being counted; the value is a plain
|
|
50
57
|
* count and the text inside them is not a unit a reader should see.
|
|
58
|
+
*
|
|
59
|
+
* Only reached for braces whose inner text is NOT itself a scalable
|
|
60
|
+
* unit: canonicalizeUnit has already unwrapped "{KiBy/s}" to "KiBy/s"
|
|
61
|
+
* (see unwrapScalableAnnotation), so what still matches here is a
|
|
62
|
+
* genuine annotation.
|
|
51
63
|
*/
|
|
52
64
|
private static readonly annotationOnlyUnitPattern: RegExp = /^\{[^{}]*\}$/;
|
|
53
65
|
|
|
66
|
+
/*
|
|
67
|
+
* The same shape, capturing the inner text.
|
|
68
|
+
*/
|
|
69
|
+
private static readonly bracedUnitPattern: RegExp = /^\{([^{}]*)\}$/;
|
|
70
|
+
|
|
54
71
|
/*
|
|
55
72
|
* The per-platform metric catalogs (Kubernetes, Ceph, Proxmox, Docker
|
|
56
73
|
* Swarm) were written for humans reading a metric picker, so they spell
|
|
@@ -93,7 +110,8 @@ export default class MetricValueFormatter {
|
|
|
93
110
|
* Whether `unit` names a real dimension for `metricName` — i.e. whether
|
|
94
111
|
* it is worth attaching to a number at all. False for the empty unit,
|
|
95
112
|
* for the dimensionless "1" on a non-fraction metric, and for
|
|
96
|
-
* annotation-only units.
|
|
113
|
+
* annotation-only units. True for a braced unit whose inner text is a
|
|
114
|
+
* scalable unit ("{KiBy/s}"), which format() renders as that unit.
|
|
97
115
|
*/
|
|
98
116
|
public static hasDisplayableUnit(
|
|
99
117
|
unit: string | null | undefined,
|
|
@@ -128,6 +146,8 @@ export default class MetricValueFormatter {
|
|
|
128
146
|
* format({ value: 1500, unit: "ms" }) → "1.5 sec"
|
|
129
147
|
* format({ value: 3661, unit: "seconds" }) → "1.02 hours"
|
|
130
148
|
* format({ value: 1500000, unit: "By/s" }) → "1.5 MB/s"
|
|
149
|
+
* format({ value: 2048, unit: "MiBy" }) → "2.15 GB"
|
|
150
|
+
* format({ value: 2500000, unit: "{KiBy/s}" }) → "2.56 GB/s"
|
|
131
151
|
* format({ value: 0.2534, unit: "1",
|
|
132
152
|
* metricName: "system.cpu.utilization" }) → "25.34%"
|
|
133
153
|
* format({ value: 87.5, unit: "%" }) → "87.50%"
|
|
@@ -139,6 +159,7 @@ export default class MetricValueFormatter {
|
|
|
139
159
|
* A value with no dimension to report is left bare:
|
|
140
160
|
* format({ value: 1500 }) → "1500"
|
|
141
161
|
* format({ value: 1500, unit: "{restarts}" }) → "1500"
|
|
162
|
+
* format({ value: 1500, unit: "{errors/s}" }) → "1500"
|
|
142
163
|
* format({ value: 3.14159 }) → "3.14"
|
|
143
164
|
*/
|
|
144
165
|
public static format(input: {
|
|
@@ -198,7 +219,7 @@ export default class MetricValueFormatter {
|
|
|
198
219
|
* becomes "m per s2" and "10*3/uL" becomes "10*3 per uL", both longer
|
|
199
220
|
* and less recognisable than what the exporter wrote. getCompactUnit
|
|
200
221
|
* keeps the slash and still expands what is worth expanding
|
|
201
|
-
* ("Cel" → "°C"
|
|
222
|
+
* ("Cel" → "°C").
|
|
202
223
|
*/
|
|
203
224
|
const unitSymbol: string =
|
|
204
225
|
ValueFormatter.getCompactUnit(unit, formatOptions) || unit;
|
|
@@ -229,11 +250,12 @@ export default class MetricValueFormatter {
|
|
|
229
250
|
}
|
|
230
251
|
|
|
231
252
|
/*
|
|
232
|
-
* Trim the unit
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* value ("5 widgets",
|
|
253
|
+
* Trim the unit, unwrap a braced scalable unit ("{KiBy/s}" → "KiBy/s"),
|
|
254
|
+
* and rewrite the catalogs' English spellings of "no dimension" into the
|
|
255
|
+
* UCUM ones the rest of the pipeline understands. Anything else is
|
|
256
|
+
* returned untouched — including its casing, which matters because an
|
|
257
|
+
* unrecognised unit is echoed verbatim next to the value ("5 widgets",
|
|
258
|
+
* not "5 Widgets").
|
|
237
259
|
*/
|
|
238
260
|
private static canonicalizeUnit(unit: string | null | undefined): string {
|
|
239
261
|
const trimmed: string = (unit || "").trim();
|
|
@@ -242,10 +264,40 @@ export default class MetricValueFormatter {
|
|
|
242
264
|
return "";
|
|
243
265
|
}
|
|
244
266
|
|
|
267
|
+
const unwrapped: string =
|
|
268
|
+
MetricValueFormatter.unwrapScalableAnnotation(trimmed);
|
|
269
|
+
|
|
245
270
|
const alias: string | undefined =
|
|
246
|
-
MetricValueFormatter.informalUnitAliases[
|
|
271
|
+
MetricValueFormatter.informalUnitAliases[unwrapped.toLowerCase()];
|
|
272
|
+
|
|
273
|
+
return alias === undefined ? unwrapped : alias;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/*
|
|
277
|
+
* The vcenter receiver declares its throughput metrics as "{KiBy/s}":
|
|
278
|
+
* UCUM annotation braces around what is, in fact, a real unit. The
|
|
279
|
+
* annotation rule used to hide it, so 2500000 of them — about 2.56 GB/s
|
|
280
|
+
* of disk traffic — reached the inbox as a bare "2500000".
|
|
281
|
+
*
|
|
282
|
+
* So a braced unit is unwrapped when, and only when, its inner text is
|
|
283
|
+
* something this formatter can SCALE: a unit with a ladder, a member of
|
|
284
|
+
* a MetricUnitUtil family whose base has one ("KiBy", "GB", "min"), or
|
|
285
|
+
* a rate whose numerator is one of those ("KiBy/s", "By/s"). Every
|
|
286
|
+
* genuine annotation stays hidden exactly as before — "{restarts}",
|
|
287
|
+
* "{cpu}", "{packets/s}" and "{errors/s}" name no unit a ladder knows,
|
|
288
|
+
* so they keep rendering as the bare count.
|
|
289
|
+
*/
|
|
290
|
+
private static unwrapScalableAnnotation(unit: string): string {
|
|
291
|
+
const match: RegExpMatchArray | null = unit.match(
|
|
292
|
+
MetricValueFormatter.bracedUnitPattern,
|
|
293
|
+
);
|
|
294
|
+
const inner: string = (match?.[1] || "").trim();
|
|
295
|
+
|
|
296
|
+
if (!inner) {
|
|
297
|
+
return unit;
|
|
298
|
+
}
|
|
247
299
|
|
|
248
|
-
return
|
|
300
|
+
return MetricValueFormatter.toScalableUnit(1, inner) ? inner : unit;
|
|
249
301
|
}
|
|
250
302
|
|
|
251
303
|
/**
|
|
@@ -273,8 +325,9 @@ export default class MetricValueFormatter {
|
|
|
273
325
|
* - it already has one ("bytes", "ms", "s", "ns");
|
|
274
326
|
* - it is a rate whose NUMERATOR does ("By/s" → scale the bytes, keep
|
|
275
327
|
* the "/s"), which is how 1500000 By/s reads "1.5 MB/s";
|
|
276
|
-
* - it is a prefixed member of a MetricUnitUtil family ("GB", "hours"
|
|
277
|
-
* in which case the value is
|
|
328
|
+
* - it is a prefixed member of a MetricUnitUtil family ("GB", "hours",
|
|
329
|
+
* and the binary "MiBy" / "KiBy"), in which case the value is
|
|
330
|
+
* converted into that family's base first.
|
|
278
331
|
*/
|
|
279
332
|
private static toScalableUnit(
|
|
280
333
|
value: number,
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import Dictionary from "../../Types/Dictionary";
|
|
2
|
+
import MonitorType from "../../Types/Monitor/MonitorType";
|
|
3
|
+
import { getCephMetricByMetricName } from "../../Types/Monitor/CephMetricCatalog";
|
|
4
|
+
import { getDockerMetricByMetricName } from "../../Types/Monitor/DockerMetricCatalog";
|
|
5
|
+
import { getDockerSwarmMetricByMetricName } from "../../Types/Monitor/DockerSwarmMetricCatalog";
|
|
6
|
+
import { getHostMetricByMetricName } from "../../Types/Monitor/HostMetricCatalog";
|
|
7
|
+
import { getIoTMetricByMetricName } from "../../Types/Monitor/IotMetricCatalog";
|
|
8
|
+
import { getKubernetesMetricByMetricName } from "../../Types/Monitor/KubernetesMetricCatalog";
|
|
9
|
+
import { getPodmanMetricByMetricName } from "../../Types/Monitor/PodmanMetricCatalog";
|
|
10
|
+
import { getProxmoxMetricByMetricName } from "../../Types/Monitor/ProxmoxMetricCatalog";
|
|
11
|
+
import { getVMwareMetricByMetricName } from "../../Types/Monitor/VMwareMetricCatalog";
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* The platforms that ship their own metric catalog. Each catalog names the
|
|
15
|
+
* unit its metrics' stored values are in.
|
|
16
|
+
*/
|
|
17
|
+
export type MetricCatalogPlatform =
|
|
18
|
+
| "kubernetes"
|
|
19
|
+
| "proxmox"
|
|
20
|
+
| "vmware"
|
|
21
|
+
| "dockerSwarm"
|
|
22
|
+
| "ceph"
|
|
23
|
+
| "docker"
|
|
24
|
+
| "podman"
|
|
25
|
+
| "host"
|
|
26
|
+
| "iot";
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* What unit a platform monitor's metric values are in.
|
|
30
|
+
*
|
|
31
|
+
* Two sources can answer that, and they disagree often enough to matter:
|
|
32
|
+
*
|
|
33
|
+
* - the unit the OpenTelemetry exporter DECLARED, stored on MetricType
|
|
34
|
+
* (k8s.node.allocatable_memory → "By");
|
|
35
|
+
* - the unit the platform's metric catalog SAYS the values are in
|
|
36
|
+
* (KubernetesMetricCatalog, DockerMetricCatalog, ...).
|
|
37
|
+
*
|
|
38
|
+
* The catalog wins. It was written against what each agent actually sends,
|
|
39
|
+
* and the exporters are not always right about their own numbers:
|
|
40
|
+
* docker_stats declares container.cpu.utilization and
|
|
41
|
+
* container.memory.percent with the unit "1" but sends 0–100. Taking the
|
|
42
|
+
* declared "1" would render 85.3 as "8530.00%", and — worse — a threshold
|
|
43
|
+
* typed in "%" would convert every sample ×100 and fire forever. kubeletstats
|
|
44
|
+
* declares k8s.node.cpu.utilization as "1" but it is a cores gauge.
|
|
45
|
+
*
|
|
46
|
+
* The declared unit is the fallback for everything the catalog does not
|
|
47
|
+
* know, which is how k8s.node.allocatable_memory reads "258 GB" instead of
|
|
48
|
+
* "257760964608" even before it has a catalog entry.
|
|
49
|
+
*/
|
|
50
|
+
export default class PlatformMetricUnitUtil {
|
|
51
|
+
/**
|
|
52
|
+
* The catalog platform a monitor type reads its metrics from, or null for
|
|
53
|
+
* monitor types without one (generic Metrics monitors keep the exporter's
|
|
54
|
+
* declared unit).
|
|
55
|
+
*/
|
|
56
|
+
public static getPlatformForMonitorType(
|
|
57
|
+
monitorType: MonitorType | undefined,
|
|
58
|
+
): MetricCatalogPlatform | null {
|
|
59
|
+
switch (monitorType) {
|
|
60
|
+
case MonitorType.Kubernetes:
|
|
61
|
+
return "kubernetes";
|
|
62
|
+
case MonitorType.Proxmox:
|
|
63
|
+
return "proxmox";
|
|
64
|
+
case MonitorType.VMware:
|
|
65
|
+
return "vmware";
|
|
66
|
+
case MonitorType.DockerSwarm:
|
|
67
|
+
return "dockerSwarm";
|
|
68
|
+
case MonitorType.Ceph:
|
|
69
|
+
return "ceph";
|
|
70
|
+
case MonitorType.Docker:
|
|
71
|
+
return "docker";
|
|
72
|
+
case MonitorType.Podman:
|
|
73
|
+
return "podman";
|
|
74
|
+
case MonitorType.Host:
|
|
75
|
+
return "host";
|
|
76
|
+
case MonitorType.IoTDevice:
|
|
77
|
+
return "iot";
|
|
78
|
+
default:
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The unit the platform's catalog declares for a metric, exactly as the
|
|
85
|
+
* catalog spells it ("bytes", "cores", "ratio", "count", "%"), or
|
|
86
|
+
* undefined when the catalog does not know the metric or gives it no
|
|
87
|
+
* unit.
|
|
88
|
+
*/
|
|
89
|
+
public static getCatalogUnit(input: {
|
|
90
|
+
platform: MetricCatalogPlatform;
|
|
91
|
+
metricName: string;
|
|
92
|
+
}): string | undefined {
|
|
93
|
+
const unit: string | undefined = PlatformMetricUnitUtil.lookupCatalogUnit(
|
|
94
|
+
input.platform,
|
|
95
|
+
input.metricName,
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
return unit && unit.trim() ? unit.trim() : undefined;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The unit a platform metric's values are in, spelled so the rest of the
|
|
103
|
+
* pipeline can convert it: the catalog unit when the catalog has a real
|
|
104
|
+
* one, else the exporter-declared unit, else undefined.
|
|
105
|
+
*
|
|
106
|
+
* The catalogs spell two dimensionless concepts in English. "ratio" (and
|
|
107
|
+
* "fraction") becomes UCUM's "1", which MetricUnitUtil can convert to a
|
|
108
|
+
* "%" threshold and MetricValueFormatter renders as a percentage.
|
|
109
|
+
* "count" names no dimension at all, so it defers to the declared unit
|
|
110
|
+
* ("{restart}", which renders bare the same way) instead of hiding it.
|
|
111
|
+
*/
|
|
112
|
+
public static getMetricUnit(input: {
|
|
113
|
+
platform: MetricCatalogPlatform | null;
|
|
114
|
+
metricName: string;
|
|
115
|
+
declaredUnit?: string | null | undefined;
|
|
116
|
+
}): string | undefined {
|
|
117
|
+
const catalogUnit: string | undefined = input.platform
|
|
118
|
+
? PlatformMetricUnitUtil.toConvertibleUnit(
|
|
119
|
+
PlatformMetricUnitUtil.getCatalogUnit({
|
|
120
|
+
platform: input.platform,
|
|
121
|
+
metricName: input.metricName,
|
|
122
|
+
}),
|
|
123
|
+
)
|
|
124
|
+
: undefined;
|
|
125
|
+
|
|
126
|
+
if (catalogUnit) {
|
|
127
|
+
return catalogUnit;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const declaredUnit: string = (input.declaredUnit || "").trim();
|
|
131
|
+
|
|
132
|
+
return declaredUnit || undefined;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The unit map a platform monitor hands the criteria evaluator: one entry
|
|
137
|
+
* per metric name, keyed lowercased like MetricMonitorResponse's
|
|
138
|
+
* `nativeUnitsByMetricName`, holding getMetricUnit's answer. Metrics with
|
|
139
|
+
* no known unit are left out rather than mapped to "".
|
|
140
|
+
*/
|
|
141
|
+
public static buildUnitsByMetricName(input: {
|
|
142
|
+
platform: MetricCatalogPlatform | null;
|
|
143
|
+
metricNames: Array<string>;
|
|
144
|
+
declaredUnitsByMetricName: Map<string, string>;
|
|
145
|
+
}): Dictionary<string> {
|
|
146
|
+
const unitsByMetricName: Dictionary<string> = {};
|
|
147
|
+
|
|
148
|
+
for (const metricName of input.metricNames) {
|
|
149
|
+
if (!metricName) {
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const unit: string | undefined = PlatformMetricUnitUtil.getMetricUnit({
|
|
154
|
+
platform: input.platform,
|
|
155
|
+
metricName: metricName,
|
|
156
|
+
declaredUnit: input.declaredUnitsByMetricName.get(
|
|
157
|
+
metricName.toLowerCase(),
|
|
158
|
+
),
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
if (unit) {
|
|
162
|
+
unitsByMetricName[metricName.toLowerCase()] = unit;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return unitsByMetricName;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private static toConvertibleUnit(
|
|
170
|
+
unit: string | undefined,
|
|
171
|
+
): string | undefined {
|
|
172
|
+
if (!unit) {
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
switch (unit.toLowerCase()) {
|
|
177
|
+
case "ratio":
|
|
178
|
+
case "fraction":
|
|
179
|
+
return "1";
|
|
180
|
+
case "count":
|
|
181
|
+
case "counts":
|
|
182
|
+
return undefined;
|
|
183
|
+
default:
|
|
184
|
+
return unit;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
private static lookupCatalogUnit(
|
|
189
|
+
platform: MetricCatalogPlatform,
|
|
190
|
+
metricName: string,
|
|
191
|
+
): string | undefined {
|
|
192
|
+
switch (platform) {
|
|
193
|
+
case "kubernetes":
|
|
194
|
+
return getKubernetesMetricByMetricName(metricName)?.unit;
|
|
195
|
+
case "proxmox":
|
|
196
|
+
return getProxmoxMetricByMetricName(metricName)?.unit;
|
|
197
|
+
case "vmware":
|
|
198
|
+
return getVMwareMetricByMetricName(metricName)?.unit;
|
|
199
|
+
case "dockerSwarm":
|
|
200
|
+
return getDockerSwarmMetricByMetricName(metricName)?.unit;
|
|
201
|
+
case "ceph":
|
|
202
|
+
return getCephMetricByMetricName(metricName)?.unit;
|
|
203
|
+
case "docker":
|
|
204
|
+
return getDockerMetricByMetricName(metricName)?.unit;
|
|
205
|
+
case "podman":
|
|
206
|
+
return getPodmanMetricByMetricName(metricName)?.unit;
|
|
207
|
+
case "host":
|
|
208
|
+
return getHostMetricByMetricName(metricName)?.unit;
|
|
209
|
+
case "iot":
|
|
210
|
+
return getIoTMetricByMetricName(metricName)?.unit;
|
|
211
|
+
default:
|
|
212
|
+
return undefined;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|