@oneuptime/common 11.0.1 → 11.0.3
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 +276 -0
- package/Models/DatabaseModels/AlertLabelRule.ts +38 -0
- package/Models/DatabaseModels/AlertOwnerRule.ts +38 -0
- package/Models/DatabaseModels/CephCluster.ts +964 -0
- package/Models/DatabaseModels/CephClusterLabelRule.ts +514 -0
- package/Models/DatabaseModels/CephClusterOwnerRule.ts +596 -0
- package/Models/DatabaseModels/CephClusterOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/CephClusterOwnerUser.ts +486 -0
- package/Models/DatabaseModels/CephResource.ts +809 -0
- package/Models/DatabaseModels/DockerSwarmCluster.ts +989 -0
- package/Models/DatabaseModels/DockerSwarmClusterLabelRule.ts +514 -0
- package/Models/DatabaseModels/DockerSwarmClusterOwnerRule.ts +596 -0
- package/Models/DatabaseModels/DockerSwarmClusterOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/DockerSwarmClusterOwnerUser.ts +486 -0
- package/Models/DatabaseModels/DockerSwarmResource.ts +750 -0
- package/Models/DatabaseModels/Host.ts +64 -0
- package/Models/DatabaseModels/Incident.ts +276 -0
- package/Models/DatabaseModels/IncidentLabelRule.ts +38 -0
- package/Models/DatabaseModels/IncidentOwnerRule.ts +38 -0
- package/Models/DatabaseModels/IncidentTemplate.ts +56 -0
- package/Models/DatabaseModels/Index.ts +48 -0
- package/Models/DatabaseModels/PodmanHost.ts +859 -0
- package/Models/DatabaseModels/PodmanHostLabelRule.ts +514 -0
- package/Models/DatabaseModels/PodmanHostOwnerRule.ts +596 -0
- package/Models/DatabaseModels/PodmanHostOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/PodmanHostOwnerUser.ts +486 -0
- package/Models/DatabaseModels/PodmanResource.ts +498 -0
- package/Models/DatabaseModels/ProxmoxCluster.ts +943 -0
- package/Models/DatabaseModels/ProxmoxClusterLabelRule.ts +514 -0
- package/Models/DatabaseModels/ProxmoxClusterOwnerRule.ts +596 -0
- package/Models/DatabaseModels/ProxmoxClusterOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/ProxmoxClusterOwnerUser.ts +486 -0
- package/Models/DatabaseModels/ProxmoxResource.ts +726 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +220 -0
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.ts +38 -0
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.ts +38 -0
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.ts +56 -0
- package/Models/DatabaseModels/TelemetryException.ts +2 -0
- package/Server/API/BillingInvoiceAPI.ts +47 -7
- package/Server/API/CephResourceAPI.ts +134 -0
- package/Server/API/DashboardAPI.ts +135 -0
- package/Server/API/DockerSwarmResourceAPI.ts +137 -0
- package/Server/API/ProjectAPI.ts +15 -0
- package/Server/API/ProxmoxResourceAPI.ts +132 -0
- package/Server/API/ResellerPlanAPI.ts +17 -0
- package/Server/API/TelemetryAPI.ts +8 -1
- package/Server/Infrastructure/GlobalCache.ts +8 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.ts +163 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781587937032-MigrationName.ts +3199 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.ts +211 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.ts +590 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +10 -0
- package/Server/Infrastructure/Redis.ts +40 -12
- package/Server/Services/AlertLabelRuleEngineService.ts +29 -0
- package/Server/Services/AlertOwnerRuleEngineService.ts +67 -0
- package/Server/Services/AnalyticsDatabaseService.ts +1 -1
- package/Server/Services/BillingService.ts +109 -21
- package/Server/Services/CephClusterLabelRuleEngineService.ts +200 -0
- package/Server/Services/CephClusterLabelRuleService.ts +14 -0
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +218 -0
- package/Server/Services/CephClusterOwnerRuleService.ts +14 -0
- package/Server/Services/CephClusterOwnerTeamService.ts +10 -0
- package/Server/Services/CephClusterOwnerUserService.ts +10 -0
- package/Server/Services/CephClusterService.ts +401 -0
- package/Server/Services/CephResourceService.ts +383 -0
- package/Server/Services/CloudResourceService.ts +11 -3
- package/Server/Services/DockerHostService.ts +11 -3
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +214 -0
- package/Server/Services/DockerSwarmClusterLabelRuleService.ts +14 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +232 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleService.ts +14 -0
- package/Server/Services/DockerSwarmClusterOwnerTeamService.ts +10 -0
- package/Server/Services/DockerSwarmClusterOwnerUserService.ts +10 -0
- package/Server/Services/DockerSwarmClusterService.ts +404 -0
- package/Server/Services/DockerSwarmResourceService.ts +381 -0
- package/Server/Services/ExceptionAggregationService.ts +3 -0
- package/Server/Services/HostService.ts +11 -3
- package/Server/Services/IncidentLabelRuleEngineService.ts +27 -0
- package/Server/Services/IncidentOwnerRuleEngineService.ts +67 -0
- package/Server/Services/IncidentService.ts +11 -0
- package/Server/Services/Index.ts +38 -0
- package/Server/Services/KubernetesClusterService.ts +11 -3
- package/Server/Services/LogAggregationService.ts +3 -0
- package/Server/Services/MetricAggregationService.ts +3 -0
- package/Server/Services/OpenTelemetryIngestService.ts +73 -0
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +198 -0
- package/Server/Services/PodmanHostLabelRuleService.ts +14 -0
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +216 -0
- package/Server/Services/PodmanHostOwnerRuleService.ts +14 -0
- package/Server/Services/PodmanHostOwnerTeamService.ts +10 -0
- package/Server/Services/PodmanHostOwnerUserService.ts +10 -0
- package/Server/Services/PodmanHostService.ts +368 -0
- package/Server/Services/PodmanResourceService.ts +310 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +204 -0
- package/Server/Services/ProxmoxClusterLabelRuleService.ts +14 -0
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +222 -0
- package/Server/Services/ProxmoxClusterOwnerRuleService.ts +14 -0
- package/Server/Services/ProxmoxClusterOwnerTeamService.ts +10 -0
- package/Server/Services/ProxmoxClusterOwnerUserService.ts +10 -0
- package/Server/Services/ProxmoxClusterService.ts +382 -0
- package/Server/Services/ProxmoxResourceService.ts +404 -0
- package/Server/Services/RumApplicationService.ts +11 -3
- package/Server/Services/ScheduledMaintenanceLabelRuleEngineService.ts +29 -0
- package/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.ts +67 -0
- package/Server/Services/ServerlessFunctionService.ts +11 -3
- package/Server/Services/TelemetryUsageBillingService.ts +59 -3
- package/Server/Services/TraceAggregationService.ts +3 -0
- package/Server/Types/AnalyticsDatabase/AggregateBy.ts +8 -23
- package/Server/Types/Database/Permissions/OwnerTableRegistry.ts +13 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +55 -0
- package/Server/Utils/Monitor/MonitorClusterContext.ts +158 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +650 -4
- package/Server/Utils/Monitor/MonitorIncident.ts +175 -7
- package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +56 -6
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +6 -1
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +59 -0
- package/Server/Utils/Profiling.ts +37 -2
- package/Server/Utils/Telemetry/EntityRegistry.ts +4 -0
- package/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.ts +1096 -0
- package/Server/Utils/Telemetry/ResourceFacetResolver.ts +49 -0
- package/Server/Utils/Telemetry/Telemetry.ts +10 -0
- package/Server/Utils/Telemetry/TelemetryEntity.ts +107 -0
- package/Server/Utils/Telemetry.ts +8 -19
- package/Tests/Server/API/BillingInvoiceAPI.test.ts +194 -0
- package/Tests/Server/API/ProjectAPI.test.ts +91 -0
- package/Tests/Server/API/ResellerPlanAPI.test.ts +207 -0
- package/Tests/Server/Infrastructure/GlobalCache.test.ts +100 -0
- package/Tests/Server/Services/BillingService.test.ts +323 -0
- package/Tests/Server/Services/CephResourceService.test.ts +264 -0
- package/Tests/Server/Services/ProxmoxResourceService.test.ts +326 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluator.test.ts +322 -0
- package/Tests/Server/Utils/Monitor/MonitorMaintenanceSuppression.test.ts +14 -0
- package/Tests/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.test.ts +879 -0
- package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +196 -0
- package/Tests/Types/DockerSwarm/DockerSwarmInventoryExtractor.test.ts +667 -0
- package/Tests/Types/Monitor/CephAlertTemplates.test.ts +1231 -0
- package/Tests/Types/Monitor/DockerSwarmAlertTemplates.test.ts +528 -0
- package/Tests/Types/Monitor/ProxmoxAlertTemplates.test.ts +732 -0
- package/Tests/Utils/Telemetry/EntityRelationship.test.ts +49 -0
- package/Tests/Utils/Telemetry/HeartbeatAvailability.test.ts +423 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.ts +74 -0
- package/Types/Dashboard/DashboardComponentType.ts +11 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +4 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerSwarmNodeListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerSwarmServiceListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanContainerListComponent.ts +16 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanHostListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanImageListComponent.ts +16 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanNetworkListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanVolumeListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.ts +16 -0
- package/Types/Dashboard/DashboardTemplates.ts +640 -0
- package/Types/DockerSwarm/DockerSwarmInventoryExtractor.ts +452 -0
- package/Types/Icon/IconProp.ts +3 -0
- package/Types/Monitor/CephAlertTemplates.ts +1647 -0
- package/Types/Monitor/CephMetricCatalog.ts +409 -0
- package/Types/Monitor/DockerSwarmAlertTemplates.ts +461 -0
- package/Types/Monitor/DockerSwarmMetricCatalog.ts +139 -0
- package/Types/Monitor/HostAlertTemplates.ts +455 -0
- package/Types/Monitor/HostMetricCatalog.ts +177 -0
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +65 -0
- package/Types/Monitor/MonitorStep.ts +163 -0
- package/Types/Monitor/MonitorStepCephMonitor.ts +57 -0
- package/Types/Monitor/MonitorStepDockerSwarmMonitor.ts +74 -0
- package/Types/Monitor/MonitorStepHostMonitor.ts +30 -0
- package/Types/Monitor/MonitorStepPodmanMonitor.ts +38 -0
- package/Types/Monitor/MonitorStepProxmoxMonitor.ts +81 -0
- package/Types/Monitor/MonitorType.ts +71 -1
- package/Types/Monitor/PodmanAlertTemplates.ts +507 -0
- package/Types/Monitor/PodmanMetricCatalog.ts +226 -0
- package/Types/Monitor/ProxmoxAlertTemplates.ts +899 -0
- package/Types/Monitor/ProxmoxMetricCatalog.ts +382 -0
- package/Types/Permission.ts +1029 -104
- package/Types/Podman/PodmanInventoryExtractor.ts +343 -0
- package/Types/Telemetry/EntityType.ts +23 -0
- package/Types/Telemetry/ServiceType.ts +4 -0
- package/UI/Components/Icon/Icon.tsx +141 -0
- package/UI/Components/LogsViewer/LogsViewer.tsx +44 -1
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +28 -0
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +15 -5
- package/UI/Utils/Telemetry/Telemetry.ts +16 -21
- package/UI/Utils/TelemetryService.ts +8 -3
- package/Utils/Dashboard/Components/DashboardCephOsdListComponent.ts +63 -0
- package/Utils/Dashboard/Components/DashboardCephPoolListComponent.ts +32 -0
- package/Utils/Dashboard/Components/DashboardCephResourceListShared.ts +61 -0
- package/Utils/Dashboard/Components/DashboardDockerSwarmNodeListComponent.ts +70 -0
- package/Utils/Dashboard/Components/DashboardDockerSwarmResourceListShared.ts +61 -0
- package/Utils/Dashboard/Components/DashboardDockerSwarmServiceListComponent.ts +71 -0
- package/Utils/Dashboard/Components/DashboardPodmanContainerListComponent.ts +100 -0
- package/Utils/Dashboard/Components/DashboardPodmanHostListComponent.ts +88 -0
- package/Utils/Dashboard/Components/DashboardPodmanImageListComponent.ts +97 -0
- package/Utils/Dashboard/Components/DashboardPodmanNetworkListComponent.ts +87 -0
- package/Utils/Dashboard/Components/DashboardPodmanVolumeListComponent.ts +87 -0
- package/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.ts +69 -0
- package/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.ts +55 -0
- package/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.ts +61 -0
- package/Utils/Dashboard/Components/Index.ts +79 -0
- package/Utils/Telemetry/EntityKey.ts +53 -0
- package/Utils/Telemetry/EntityRelationship.ts +6 -0
- package/Utils/Telemetry/HeartbeatAvailability.ts +262 -0
- package/build/dist/Models/DatabaseModels/Alert.js +270 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertLabelRule.js +39 -0
- package/build/dist/Models/DatabaseModels/AlertLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertOwnerRule.js +39 -0
- package/build/dist/Models/DatabaseModels/AlertOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephCluster.js +992 -0
- package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephResource.js +846 -0
- package/build/dist/Models/DatabaseModels/CephResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js +1018 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmResource.js +787 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Host.js +63 -0
- package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +270 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentLabelRule.js +39 -0
- package/build/dist/Models/DatabaseModels/IncidentLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentOwnerRule.js +39 -0
- package/build/dist/Models/DatabaseModels/IncidentOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js +54 -0
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +48 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHost.js +885 -0
- package/build/dist/Models/DatabaseModels/PodmanHost.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/PodmanHostLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanResource.js +526 -0
- package/build/dist/Models/DatabaseModels/PodmanResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +967 -0
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxResource.js +761 -0
- package/build/dist/Models/DatabaseModels/ProxmoxResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +216 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +39 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +39 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +54 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.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/Server/API/BillingInvoiceAPI.js +35 -5
- package/build/dist/Server/API/BillingInvoiceAPI.js.map +1 -1
- package/build/dist/Server/API/CephResourceAPI.js +98 -0
- package/build/dist/Server/API/CephResourceAPI.js.map +1 -0
- package/build/dist/Server/API/DashboardAPI.js +135 -0
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/DockerSwarmResourceAPI.js +100 -0
- package/build/dist/Server/API/DockerSwarmResourceAPI.js.map +1 -0
- package/build/dist/Server/API/ProjectAPI.js +11 -0
- package/build/dist/Server/API/ProjectAPI.js.map +1 -1
- package/build/dist/Server/API/ProxmoxResourceAPI.js +95 -0
- package/build/dist/Server/API/ProxmoxResourceAPI.js.map +1 -0
- package/build/dist/Server/API/ResellerPlanAPI.js +17 -3
- package/build/dist/Server/API/ResellerPlanAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +8 -1
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/GlobalCache.js +7 -2
- package/build/dist/Server/Infrastructure/GlobalCache.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js +76 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781587937032-MigrationName.js +1100 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781587937032-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js +108 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js +253 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js +43 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +10 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Redis.js +31 -8
- package/build/dist/Server/Infrastructure/Redis.js.map +1 -1
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js +30 -4
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js +62 -5
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +85 -23
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterLabelRuleService.js +13 -0
- package/build/dist/Server/Services/CephClusterLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js +9 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterService.js +353 -0
- package/build/dist/Server/Services/CephClusterService.js.map +1 -0
- package/build/dist/Server/Services/CephResourceService.js +257 -0
- package/build/dist/Server/Services/CephResourceService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceService.js +10 -2
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +10 -2
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +168 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleService.js +13 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +188 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js +9 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterService.js +353 -0
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmResourceService.js +258 -0
- package/build/dist/Server/Services/DockerSwarmResourceService.js.map +1 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js +3 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +10 -2
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js +28 -4
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js +62 -5
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +8 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +38 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +10 -2
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +3 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +3 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +69 -9
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleService.js +13 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js +9 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostService.js +319 -0
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -0
- package/build/dist/Server/Services/PodmanResourceService.js +196 -0
- package/build/dist/Server/Services/PodmanResourceService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js +13 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +9 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterService.js +337 -0
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxResourceService.js +285 -0
- package/build/dist/Server/Services/ProxmoxResourceService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationService.js +10 -2
- package/build/dist/Server/Services/RumApplicationService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js +30 -4
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js +62 -5
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionService.js +10 -2
- package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +43 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +3 -0
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +8 -25
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js +13 -0
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +44 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js +118 -0
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +422 -4
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +137 -8
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +32 -6
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +6 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +39 -0
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
- package/build/dist/Server/Utils/Profiling.js +24 -3
- package/build/dist/Server/Utils/Profiling.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +4 -0
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js +854 -0
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +30 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/Telemetry.js +6 -0
- package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +80 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry.js +8 -10
- package/build/dist/Server/Utils/Telemetry.js.map +1 -1
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +69 -0
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js +11 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +4 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmNodeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmNodeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmServiceListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmServiceListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanContainerListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanContainerListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanHostListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanHostListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanImageListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanImageListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanNetworkListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanNetworkListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanVolumeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanVolumeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +562 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/DockerSwarm/DockerSwarmInventoryExtractor.js +359 -0
- package/build/dist/Types/DockerSwarm/DockerSwarmInventoryExtractor.js.map +1 -0
- package/build/dist/Types/Icon/IconProp.js +3 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/Monitor/CephAlertTemplates.js +1379 -0
- package/build/dist/Types/Monitor/CephAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/CephMetricCatalog.js +353 -0
- package/build/dist/Types/Monitor/CephMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/DockerSwarmAlertTemplates.js +358 -0
- package/build/dist/Types/Monitor/DockerSwarmAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/DockerSwarmMetricCatalog.js +103 -0
- package/build/dist/Types/Monitor/DockerSwarmMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/HostAlertTemplates.js +365 -0
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/HostMetricCatalog.js +138 -0
- package/build/dist/Types/Monitor/HostMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStep.js +115 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepCephMonitor.js +34 -0
- package/build/dist/Types/Monitor/MonitorStepCephMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepDockerSwarmMonitor.js +21 -0
- package/build/dist/Types/Monitor/MonitorStepDockerSwarmMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepHostMonitor.js +20 -0
- package/build/dist/Types/Monitor/MonitorStepHostMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepPodmanMonitor.js +21 -0
- package/build/dist/Types/Monitor/MonitorStepPodmanMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js +36 -0
- package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +66 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +410 -0
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/PodmanMetricCatalog.js +192 -0
- package/build/dist/Types/Monitor/PodmanMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js +743 -0
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js +320 -0
- package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js.map +1 -0
- package/build/dist/Types/Permission.js +824 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Podman/PodmanInventoryExtractor.js +293 -0
- package/build/dist/Types/Podman/PodmanInventoryExtractor.js.map +1 -0
- package/build/dist/Types/Telemetry/EntityType.js +23 -0
- package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
- package/build/dist/Types/Telemetry/ServiceType.js +4 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +49 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +30 -2
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +22 -0
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +11 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Utils/Telemetry/Telemetry.js +11 -10
- package/build/dist/UI/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/UI/Utils/TelemetryService.js +6 -2
- package/build/dist/UI/Utils/TelemetryService.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js +50 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js +27 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js +46 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmNodeListComponent.js +55 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmNodeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmResourceListShared.js +46 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmResourceListShared.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmServiceListComponent.js +55 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmServiceListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanContainerListComponent.js +77 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanContainerListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanHostListComponent.js +71 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanHostListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanImageListComponent.js +77 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanImageListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanNetworkListComponent.js +68 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanNetworkListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanVolumeListComponent.js +68 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanVolumeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js +55 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js +42 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js +46 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +44 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Telemetry/EntityKey.js +41 -0
- package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
- package/build/dist/Utils/Telemetry/EntityRelationship.js +3 -0
- package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
- package/build/dist/Utils/Telemetry/HeartbeatAvailability.js +174 -0
- package/build/dist/Utils/Telemetry/HeartbeatAvailability.js.map +1 -0
- package/package.json +29 -21
|
@@ -303,15 +303,23 @@ export class Service extends DatabaseService<Model> {
|
|
|
303
303
|
|
|
304
304
|
@CaptureSpan()
|
|
305
305
|
public async markDisconnectedFunctions(): Promise<void> {
|
|
306
|
-
|
|
306
|
+
/*
|
|
307
|
+
* Threshold must stay well above the 5-minute OTel ingest
|
|
308
|
+
* maintenance fence (MAINTENANCE_FENCE_TTL_SECONDS in
|
|
309
|
+
* OtelIngestBaseService) — lastSeenAt is legitimately up to
|
|
310
|
+
* ~5 minutes stale during continuous telemetry, so a threshold
|
|
311
|
+
* equal to the fence TTL flaps healthy resources. 15 minutes
|
|
312
|
+
* gives 3x headroom.
|
|
313
|
+
*/
|
|
314
|
+
const fifteenMinutesAgo: Date = OneUptimeDate.addRemoveMinutes(
|
|
307
315
|
OneUptimeDate.getCurrentDate(),
|
|
308
|
-
-
|
|
316
|
+
-15,
|
|
309
317
|
);
|
|
310
318
|
|
|
311
319
|
const connectedFunctions: Array<Model> = await this.findBy({
|
|
312
320
|
query: {
|
|
313
321
|
otelCollectorStatus: "connected",
|
|
314
|
-
lastSeenAt: QueryHelper.lessThan(
|
|
322
|
+
lastSeenAt: QueryHelper.lessThan(fifteenMinutesAgo),
|
|
315
323
|
},
|
|
316
324
|
select: {
|
|
317
325
|
_id: true,
|
|
@@ -25,10 +25,16 @@ import logger from "../Utils/Logger";
|
|
|
25
25
|
import ServiceModel from "../../Models/DatabaseModels/Service";
|
|
26
26
|
import HostService from "./HostService";
|
|
27
27
|
import DockerHostService from "./DockerHostService";
|
|
28
|
+
import PodmanHostService from "./PodmanHostService";
|
|
28
29
|
import KubernetesClusterService from "./KubernetesClusterService";
|
|
30
|
+
import ProxmoxClusterService from "./ProxmoxClusterService";
|
|
31
|
+
import CephClusterService from "./CephClusterService";
|
|
29
32
|
import Host from "../../Models/DatabaseModels/Host";
|
|
30
33
|
import DockerHost from "../../Models/DatabaseModels/DockerHost";
|
|
34
|
+
import PodmanHost from "../../Models/DatabaseModels/PodmanHost";
|
|
31
35
|
import KubernetesCluster from "../../Models/DatabaseModels/KubernetesCluster";
|
|
36
|
+
import ProxmoxCluster from "../../Models/DatabaseModels/ProxmoxCluster";
|
|
37
|
+
import CephCluster from "../../Models/DatabaseModels/CephCluster";
|
|
32
38
|
import ServiceType from "../../Types/Telemetry/ServiceType";
|
|
33
39
|
import {
|
|
34
40
|
AverageSpanRowSizeInBytes,
|
|
@@ -347,9 +353,10 @@ export class Service extends DatabaseService<Model> {
|
|
|
347
353
|
/*
|
|
348
354
|
* Map of resourceId -> retainTelemetryDataForDays for every resource in
|
|
349
355
|
* the project that can own telemetry (Service, Host, DockerHost,
|
|
350
|
-
* KubernetesCluster). Used to scale billed
|
|
351
|
-
* applied to each resource's telemetry.
|
|
352
|
-
* (and the unattributed bucket) fall back
|
|
356
|
+
* KubernetesCluster, ProxmoxCluster, CephCluster). Used to scale billed
|
|
357
|
+
* cost by the actual retention applied to each resource's telemetry.
|
|
358
|
+
* Resources without an override (and the unattributed bucket) fall back
|
|
359
|
+
* to the project default.
|
|
353
360
|
*/
|
|
354
361
|
@CaptureSpan()
|
|
355
362
|
private async buildTelemetryRetentionMap(
|
|
@@ -405,6 +412,22 @@ export class Service extends DatabaseService<Model> {
|
|
|
405
412
|
}
|
|
406
413
|
}
|
|
407
414
|
|
|
415
|
+
const podmanHosts: Array<PodmanHost> = await PodmanHostService.findBy({
|
|
416
|
+
query: { projectId: projectId },
|
|
417
|
+
select: { _id: true, retainTelemetryDataForDays: true },
|
|
418
|
+
skip: 0,
|
|
419
|
+
limit: LIMIT_MAX,
|
|
420
|
+
props: { isRoot: true },
|
|
421
|
+
});
|
|
422
|
+
for (const podmanHost of podmanHosts) {
|
|
423
|
+
if (podmanHost.id && podmanHost.retainTelemetryDataForDays) {
|
|
424
|
+
retentionByServiceId.set(
|
|
425
|
+
podmanHost.id.toString(),
|
|
426
|
+
podmanHost.retainTelemetryDataForDays,
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
408
431
|
const clusters: Array<KubernetesCluster> =
|
|
409
432
|
await KubernetesClusterService.findBy({
|
|
410
433
|
query: { projectId: projectId },
|
|
@@ -422,6 +445,39 @@ export class Service extends DatabaseService<Model> {
|
|
|
422
445
|
}
|
|
423
446
|
}
|
|
424
447
|
|
|
448
|
+
const proxmoxClusters: Array<ProxmoxCluster> =
|
|
449
|
+
await ProxmoxClusterService.findBy({
|
|
450
|
+
query: { projectId: projectId },
|
|
451
|
+
select: { _id: true, retainTelemetryDataForDays: true },
|
|
452
|
+
skip: 0,
|
|
453
|
+
limit: LIMIT_MAX,
|
|
454
|
+
props: { isRoot: true },
|
|
455
|
+
});
|
|
456
|
+
for (const proxmoxCluster of proxmoxClusters) {
|
|
457
|
+
if (proxmoxCluster.id && proxmoxCluster.retainTelemetryDataForDays) {
|
|
458
|
+
retentionByServiceId.set(
|
|
459
|
+
proxmoxCluster.id.toString(),
|
|
460
|
+
proxmoxCluster.retainTelemetryDataForDays,
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const cephClusters: Array<CephCluster> = await CephClusterService.findBy({
|
|
466
|
+
query: { projectId: projectId },
|
|
467
|
+
select: { _id: true, retainTelemetryDataForDays: true },
|
|
468
|
+
skip: 0,
|
|
469
|
+
limit: LIMIT_MAX,
|
|
470
|
+
props: { isRoot: true },
|
|
471
|
+
});
|
|
472
|
+
for (const cephCluster of cephClusters) {
|
|
473
|
+
if (cephCluster.id && cephCluster.retainTelemetryDataForDays) {
|
|
474
|
+
retentionByServiceId.set(
|
|
475
|
+
cephCluster.id.toString(),
|
|
476
|
+
cephCluster.retainTelemetryDataForDays,
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
425
481
|
return retentionByServiceId;
|
|
426
482
|
}
|
|
427
483
|
|
|
@@ -158,7 +158,10 @@ export class TraceAggregationService {
|
|
|
158
158
|
new Map([
|
|
159
159
|
["hostId", ServiceType.Host],
|
|
160
160
|
["dockerHostId", ServiceType.DockerHost],
|
|
161
|
+
["podmanHostId", ServiceType.PodmanHost],
|
|
161
162
|
["kubernetesClusterId", ServiceType.KubernetesCluster],
|
|
163
|
+
["proxmoxClusterId", ServiceType.ProxmoxCluster],
|
|
164
|
+
["cephClusterId", ServiceType.CephCluster],
|
|
162
165
|
["serverlessFunctionId", ServiceType.ServerlessFunction],
|
|
163
166
|
["cloudResourceId", ServiceType.CloudResource],
|
|
164
167
|
["rumApplicationId", ServiceType.RealUserMonitor],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import AggregationInterval from "../../../Types/BaseDatabase/AggregationInterval";
|
|
2
|
+
import AggregationIntervalUtil from "../../../Types/BaseDatabase/AggregationIntervalUtil";
|
|
2
3
|
import CommonAggregateBy from "../../../Types/BaseDatabase/AggregateBy";
|
|
3
4
|
import AnalyticsBaseModel from "../../../Models/AnalyticsModels/AnalyticsBaseModel/AnalyticsBaseModel";
|
|
4
5
|
import DatabaseCommonInteractionProps from "../../../Types/BaseDatabase/DatabaseCommonInteractionProps";
|
|
5
|
-
import OneUptimeDate from "../../../Types/Date";
|
|
6
6
|
import CaptureSpan from "../../Utils/Telemetry/CaptureSpan";
|
|
7
7
|
|
|
8
8
|
export default interface AggregateBy<TBaseModel extends AnalyticsBaseModel>
|
|
@@ -11,32 +11,17 @@ export default interface AggregateBy<TBaseModel extends AnalyticsBaseModel>
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export class AggregateUtil {
|
|
14
|
+
/*
|
|
15
|
+
* Delegates to the isomorphic AggregationIntervalUtil so browser
|
|
16
|
+
* code reconstructing the server's bucket grid (heartbeat
|
|
17
|
+
* availability charts) always agrees with the interval the
|
|
18
|
+
* statement generator compiles into `toStartOfInterval(...)`.
|
|
19
|
+
*/
|
|
14
20
|
@CaptureSpan()
|
|
15
21
|
public static getAggregationInterval(data: {
|
|
16
22
|
startDate: Date;
|
|
17
23
|
endDate: Date;
|
|
18
24
|
}): AggregationInterval {
|
|
19
|
-
|
|
20
|
-
data.endDate = OneUptimeDate.fromString(data.endDate);
|
|
21
|
-
|
|
22
|
-
const diff: number = data.endDate.getTime() - data.startDate.getTime();
|
|
23
|
-
|
|
24
|
-
if (diff <= 1000 * 60 * 60 * 3) {
|
|
25
|
-
// if less than 3 hours, then get minute precision
|
|
26
|
-
return AggregationInterval.Minute;
|
|
27
|
-
} else if (diff <= 1000 * 60 * 60 * 24 * 7) {
|
|
28
|
-
// 3 days
|
|
29
|
-
return AggregationInterval.Hour;
|
|
30
|
-
} else if (diff <= 1000 * 60 * 60 * 24 * 7 * 6) {
|
|
31
|
-
// 3 weeks
|
|
32
|
-
return AggregationInterval.Day;
|
|
33
|
-
} else if (diff <= 1000 * 60 * 60 * 24 * 30 * 6) {
|
|
34
|
-
// 3 months
|
|
35
|
-
return AggregationInterval.Week;
|
|
36
|
-
} else if (diff <= 1000 * 60 * 60 * 24 * 365 * 6) {
|
|
37
|
-
// 3 years
|
|
38
|
-
return AggregationInterval.Month;
|
|
39
|
-
}
|
|
40
|
-
return AggregationInterval.Year;
|
|
25
|
+
return AggregationIntervalUtil.getAggregationIntervalForWindow(data);
|
|
41
26
|
}
|
|
42
27
|
}
|
|
@@ -18,6 +18,8 @@ import HostOwnerTeamService from "../../../Services/HostOwnerTeamService";
|
|
|
18
18
|
import HostOwnerUserService from "../../../Services/HostOwnerUserService";
|
|
19
19
|
import DockerHostOwnerTeamService from "../../../Services/DockerHostOwnerTeamService";
|
|
20
20
|
import DockerHostOwnerUserService from "../../../Services/DockerHostOwnerUserService";
|
|
21
|
+
import PodmanHostOwnerTeamService from "../../../Services/PodmanHostOwnerTeamService";
|
|
22
|
+
import PodmanHostOwnerUserService from "../../../Services/PodmanHostOwnerUserService";
|
|
21
23
|
import KubernetesClusterOwnerTeamService from "../../../Services/KubernetesClusterOwnerTeamService";
|
|
22
24
|
import KubernetesClusterOwnerUserService from "../../../Services/KubernetesClusterOwnerUserService";
|
|
23
25
|
import ServerlessFunctionOwnerTeamService from "../../../Services/ServerlessFunctionOwnerTeamService";
|
|
@@ -40,6 +42,7 @@ import ServiceService from "../../../Services/ServiceService";
|
|
|
40
42
|
import MonitorService from "../../../Services/MonitorService";
|
|
41
43
|
import HostService from "../../../Services/HostService";
|
|
42
44
|
import DockerHostService from "../../../Services/DockerHostService";
|
|
45
|
+
import PodmanHostService from "../../../Services/PodmanHostService";
|
|
43
46
|
import KubernetesClusterService from "../../../Services/KubernetesClusterService";
|
|
44
47
|
import ServerlessFunctionService from "../../../Services/ServerlessFunctionService";
|
|
45
48
|
import CloudResourceService from "../../../Services/CloudResourceService";
|
|
@@ -180,6 +183,16 @@ const ownerTableRegistry: Map<string, OwnerTablePair> = new Map<
|
|
|
180
183
|
modelService: DockerHostService,
|
|
181
184
|
},
|
|
182
185
|
],
|
|
186
|
+
[
|
|
187
|
+
"PodmanHost",
|
|
188
|
+
{
|
|
189
|
+
ownerUserService: PodmanHostOwnerUserService,
|
|
190
|
+
ownerTeamService: PodmanHostOwnerTeamService,
|
|
191
|
+
fkColumn: "podmanHostId",
|
|
192
|
+
canOwnTelemetry: true,
|
|
193
|
+
modelService: PodmanHostService,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
183
196
|
[
|
|
184
197
|
"KubernetesCluster",
|
|
185
198
|
{
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import Alert from "../../../Models/DatabaseModels/Alert";
|
|
2
2
|
import AlertSeverity from "../../../Models/DatabaseModels/AlertSeverity";
|
|
3
3
|
import AlertStateTimeline from "../../../Models/DatabaseModels/AlertStateTimeline";
|
|
4
|
+
import CephCluster from "../../../Models/DatabaseModels/CephCluster";
|
|
5
|
+
import DockerSwarmCluster from "../../../Models/DatabaseModels/DockerSwarmCluster";
|
|
4
6
|
import Host from "../../../Models/DatabaseModels/Host";
|
|
5
7
|
import Label from "../../../Models/DatabaseModels/Label";
|
|
6
8
|
import Monitor from "../../../Models/DatabaseModels/Monitor";
|
|
7
9
|
import OnCallDutyPolicy from "../../../Models/DatabaseModels/OnCallDutyPolicy";
|
|
10
|
+
import ProxmoxCluster from "../../../Models/DatabaseModels/ProxmoxCluster";
|
|
8
11
|
import Service from "../../../Models/DatabaseModels/Service";
|
|
9
12
|
import SortOrder from "../../../Types/BaseDatabase/SortOrder";
|
|
10
13
|
import { LIMIT_PER_PROJECT } from "../../../Types/Database/LimitMax";
|
|
@@ -24,6 +27,9 @@ import ServiceService from "../../Services/ServiceService";
|
|
|
24
27
|
import logger, { LogAttributes } from "../Logger";
|
|
25
28
|
import CaptureSpan from "../Telemetry/CaptureSpan";
|
|
26
29
|
import DataToProcess from "./DataToProcess";
|
|
30
|
+
import MonitorClusterContextUtil, {
|
|
31
|
+
MonitorClusterContext,
|
|
32
|
+
} from "./MonitorClusterContext";
|
|
27
33
|
import MonitorTemplateUtil from "./MonitorTemplateUtil";
|
|
28
34
|
import { JSONObject } from "../../../Types/JSON";
|
|
29
35
|
import OneUptimeDate from "../../../Types/Date";
|
|
@@ -159,6 +165,19 @@ export default class MonitorAlert {
|
|
|
159
165
|
return;
|
|
160
166
|
}
|
|
161
167
|
|
|
168
|
+
/*
|
|
169
|
+
* Proxmox/Ceph monitors: resolve the monitored cluster once per
|
|
170
|
+
* evaluation (lookup-only, from the step config's clusterIdentifier)
|
|
171
|
+
* so every alert created below is attached to it. Series labels
|
|
172
|
+
* cannot supply this — they carry datapoint labels (`id`,
|
|
173
|
+
* `ceph_daemon`, `pool_id`), not cluster identity, and ungrouped
|
|
174
|
+
* templates have no series at all. No-op for other monitor types.
|
|
175
|
+
*/
|
|
176
|
+
const clusterContext: MonitorClusterContext =
|
|
177
|
+
await MonitorClusterContextUtil.resolveClusterContextForMonitor({
|
|
178
|
+
monitor: input.monitor,
|
|
179
|
+
});
|
|
180
|
+
|
|
162
181
|
const seriesToProcess: Array<PerSeriesCriteriaMatch | undefined> =
|
|
163
182
|
input.matchesPerSeries && input.matchesPerSeries.length > 0
|
|
164
183
|
? input.matchesPerSeries
|
|
@@ -376,6 +395,42 @@ export default class MonitorAlert {
|
|
|
376
395
|
}
|
|
377
396
|
}
|
|
378
397
|
|
|
398
|
+
/*
|
|
399
|
+
* Deterministic Proxmox/Ceph cluster link from the monitor's
|
|
400
|
+
* step config (resolved once above). Series labels never carry
|
|
401
|
+
* cluster identity for these monitor types, so this — not the
|
|
402
|
+
* label path above — is what makes the per-cluster Activity
|
|
403
|
+
* tabs and badge counts see monitor-created alerts. Runs for
|
|
404
|
+
* both grouped and ungrouped alerts.
|
|
405
|
+
*/
|
|
406
|
+
if (clusterContext.proxmoxClusterIds.length > 0) {
|
|
407
|
+
alert.proxmoxClusters = clusterContext.proxmoxClusterIds.map(
|
|
408
|
+
(id: string): ProxmoxCluster => {
|
|
409
|
+
const cluster: ProxmoxCluster = new ProxmoxCluster();
|
|
410
|
+
cluster._id = id;
|
|
411
|
+
return cluster;
|
|
412
|
+
},
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
if (clusterContext.cephClusterIds.length > 0) {
|
|
416
|
+
alert.cephClusters = clusterContext.cephClusterIds.map(
|
|
417
|
+
(id: string): CephCluster => {
|
|
418
|
+
const cluster: CephCluster = new CephCluster();
|
|
419
|
+
cluster._id = id;
|
|
420
|
+
return cluster;
|
|
421
|
+
},
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
if (clusterContext.dockerSwarmClusterIds.length > 0) {
|
|
425
|
+
alert.dockerSwarmClusters = clusterContext.dockerSwarmClusterIds.map(
|
|
426
|
+
(id: string): DockerSwarmCluster => {
|
|
427
|
+
const cluster: DockerSwarmCluster = new DockerSwarmCluster();
|
|
428
|
+
cluster._id = id;
|
|
429
|
+
return cluster;
|
|
430
|
+
},
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
|
|
379
434
|
alert.onCallDutyPolicies =
|
|
380
435
|
criteriaAlert.onCallPolicyIds?.map((id: ObjectID) => {
|
|
381
436
|
const onCallPolicy: OnCallDutyPolicy = new OnCallDutyPolicy();
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import CephCluster from "../../../Models/DatabaseModels/CephCluster";
|
|
2
|
+
import DockerSwarmCluster from "../../../Models/DatabaseModels/DockerSwarmCluster";
|
|
3
|
+
import Monitor from "../../../Models/DatabaseModels/Monitor";
|
|
4
|
+
import ProxmoxCluster from "../../../Models/DatabaseModels/ProxmoxCluster";
|
|
5
|
+
import MonitorStep from "../../../Types/Monitor/MonitorStep";
|
|
6
|
+
import MonitorType from "../../../Types/Monitor/MonitorType";
|
|
7
|
+
import CephClusterService from "../../Services/CephClusterService";
|
|
8
|
+
import DockerSwarmClusterService from "../../Services/DockerSwarmClusterService";
|
|
9
|
+
import ProxmoxClusterService from "../../Services/ProxmoxClusterService";
|
|
10
|
+
import QueryHelper from "../../Types/Database/QueryHelper";
|
|
11
|
+
import logger from "../Logger";
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* WI-11 contract: incidents/alerts created by Proxmox/Ceph monitors must
|
|
15
|
+
* be attached to the cluster they monitor — the per-cluster Activity
|
|
16
|
+
* pages and SideMenu badge counts query `proxmoxClusters` /
|
|
17
|
+
* `cephClusters` on Incident/Alert. Series labels cannot supply this
|
|
18
|
+
* identity: the shipped templates group by datapoint labels (`id`,
|
|
19
|
+
* `ceph_daemon`, `pool_id`), and ungrouped templates (e.g.
|
|
20
|
+
* ceph-health-error) have no series at all. The deterministic source is
|
|
21
|
+
* the monitor step config, which always carries `clusterIdentifier`
|
|
22
|
+
* (validated as required by MonitorStep), so the incident/alert creation
|
|
23
|
+
* paths resolve the cluster row from it once per evaluation.
|
|
24
|
+
*/
|
|
25
|
+
export interface MonitorClusterContext {
|
|
26
|
+
proxmoxClusterIds: Array<string>;
|
|
27
|
+
cephClusterIds: Array<string>;
|
|
28
|
+
dockerSwarmClusterIds: Array<string>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default class MonitorClusterContextUtil {
|
|
32
|
+
/*
|
|
33
|
+
* Resolve the Proxmox/Ceph cluster rows referenced by the monitor's
|
|
34
|
+
* step configs. Lookup-only — row creation belongs to ingest
|
|
35
|
+
* discovery (findOrCreateByName); a monitor pointing at a cluster
|
|
36
|
+
* that never sent data simply links nothing. The lookup is
|
|
37
|
+
* case-insensitive and project-scoped, matching the ingest contract
|
|
38
|
+
* (the agent-stamped name and the user-typed step identifier may
|
|
39
|
+
* differ only by case). Returns empty arrays for every other monitor
|
|
40
|
+
* type without touching the database.
|
|
41
|
+
*/
|
|
42
|
+
public static async resolveClusterContextForMonitor(input: {
|
|
43
|
+
monitor: Monitor;
|
|
44
|
+
}): Promise<MonitorClusterContext> {
|
|
45
|
+
const context: MonitorClusterContext = {
|
|
46
|
+
proxmoxClusterIds: [],
|
|
47
|
+
cephClusterIds: [],
|
|
48
|
+
dockerSwarmClusterIds: [],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const monitorType: MonitorType | undefined = input.monitor.monitorType;
|
|
52
|
+
|
|
53
|
+
if (
|
|
54
|
+
monitorType !== MonitorType.Proxmox &&
|
|
55
|
+
monitorType !== MonitorType.Ceph &&
|
|
56
|
+
monitorType !== MonitorType.DockerSwarm
|
|
57
|
+
) {
|
|
58
|
+
return context;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!input.monitor.projectId) {
|
|
62
|
+
return context;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const monitorSteps: Array<MonitorStep> =
|
|
66
|
+
input.monitor.monitorSteps?.data?.monitorStepsInstanceArray || [];
|
|
67
|
+
|
|
68
|
+
const clusterIdentifiers: Set<string> = new Set<string>();
|
|
69
|
+
|
|
70
|
+
for (const monitorStep of monitorSteps) {
|
|
71
|
+
let clusterIdentifier: string | undefined = undefined;
|
|
72
|
+
|
|
73
|
+
if (monitorType === MonitorType.Proxmox) {
|
|
74
|
+
clusterIdentifier = monitorStep.data?.proxmoxMonitor?.clusterIdentifier;
|
|
75
|
+
} else if (monitorType === MonitorType.Ceph) {
|
|
76
|
+
clusterIdentifier = monitorStep.data?.cephMonitor?.clusterIdentifier;
|
|
77
|
+
} else if (monitorType === MonitorType.DockerSwarm) {
|
|
78
|
+
clusterIdentifier =
|
|
79
|
+
monitorStep.data?.dockerSwarmMonitor?.clusterIdentifier;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (clusterIdentifier && clusterIdentifier.trim().length > 0) {
|
|
83
|
+
clusterIdentifiers.add(clusterIdentifier.trim());
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
* Cluster linking is best-effort context — a lookup failure must
|
|
89
|
+
* never block incident/alert creation, so errors are logged and
|
|
90
|
+
* swallowed per identifier.
|
|
91
|
+
*/
|
|
92
|
+
for (const clusterIdentifier of clusterIdentifiers) {
|
|
93
|
+
try {
|
|
94
|
+
if (monitorType === MonitorType.Proxmox) {
|
|
95
|
+
const proxmoxCluster: ProxmoxCluster | null =
|
|
96
|
+
await ProxmoxClusterService.findOneBy({
|
|
97
|
+
query: {
|
|
98
|
+
projectId: input.monitor.projectId,
|
|
99
|
+
name: QueryHelper.findWithSameText(clusterIdentifier),
|
|
100
|
+
},
|
|
101
|
+
select: {
|
|
102
|
+
_id: true,
|
|
103
|
+
},
|
|
104
|
+
props: {
|
|
105
|
+
isRoot: true,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
if (proxmoxCluster?._id) {
|
|
110
|
+
context.proxmoxClusterIds.push(String(proxmoxCluster._id));
|
|
111
|
+
}
|
|
112
|
+
} else if (monitorType === MonitorType.Ceph) {
|
|
113
|
+
const cephCluster: CephCluster | null =
|
|
114
|
+
await CephClusterService.findOneBy({
|
|
115
|
+
query: {
|
|
116
|
+
projectId: input.monitor.projectId,
|
|
117
|
+
name: QueryHelper.findWithSameText(clusterIdentifier),
|
|
118
|
+
},
|
|
119
|
+
select: {
|
|
120
|
+
_id: true,
|
|
121
|
+
},
|
|
122
|
+
props: {
|
|
123
|
+
isRoot: true,
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
if (cephCluster?._id) {
|
|
128
|
+
context.cephClusterIds.push(String(cephCluster._id));
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
const dockerSwarmCluster: DockerSwarmCluster | null =
|
|
132
|
+
await DockerSwarmClusterService.findOneBy({
|
|
133
|
+
query: {
|
|
134
|
+
projectId: input.monitor.projectId,
|
|
135
|
+
name: QueryHelper.findWithSameText(clusterIdentifier),
|
|
136
|
+
},
|
|
137
|
+
select: {
|
|
138
|
+
_id: true,
|
|
139
|
+
},
|
|
140
|
+
props: {
|
|
141
|
+
isRoot: true,
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
if (dockerSwarmCluster?._id) {
|
|
146
|
+
context.dockerSwarmClusterIds.push(String(dockerSwarmCluster._id));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
} catch (err) {
|
|
150
|
+
logger.error(
|
|
151
|
+
`Failed to resolve ${monitorType} cluster "${clusterIdentifier}" for monitor ${input.monitor.id?.toString()}: ${err}`,
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return context;
|
|
157
|
+
}
|
|
158
|
+
}
|