@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
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import MonitorType from "../../../Types/Monitor/MonitorType";
|
|
2
|
+
import CephClusterService from "../../Services/CephClusterService";
|
|
3
|
+
import DockerSwarmClusterService from "../../Services/DockerSwarmClusterService";
|
|
4
|
+
import ProxmoxClusterService from "../../Services/ProxmoxClusterService";
|
|
5
|
+
import QueryHelper from "../../Types/Database/QueryHelper";
|
|
6
|
+
import logger from "../Logger";
|
|
7
|
+
export default class MonitorClusterContextUtil {
|
|
8
|
+
/*
|
|
9
|
+
* Resolve the Proxmox/Ceph cluster rows referenced by the monitor's
|
|
10
|
+
* step configs. Lookup-only — row creation belongs to ingest
|
|
11
|
+
* discovery (findOrCreateByName); a monitor pointing at a cluster
|
|
12
|
+
* that never sent data simply links nothing. The lookup is
|
|
13
|
+
* case-insensitive and project-scoped, matching the ingest contract
|
|
14
|
+
* (the agent-stamped name and the user-typed step identifier may
|
|
15
|
+
* differ only by case). Returns empty arrays for every other monitor
|
|
16
|
+
* type without touching the database.
|
|
17
|
+
*/
|
|
18
|
+
static async resolveClusterContextForMonitor(input) {
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
20
|
+
const context = {
|
|
21
|
+
proxmoxClusterIds: [],
|
|
22
|
+
cephClusterIds: [],
|
|
23
|
+
dockerSwarmClusterIds: [],
|
|
24
|
+
};
|
|
25
|
+
const monitorType = input.monitor.monitorType;
|
|
26
|
+
if (monitorType !== MonitorType.Proxmox &&
|
|
27
|
+
monitorType !== MonitorType.Ceph &&
|
|
28
|
+
monitorType !== MonitorType.DockerSwarm) {
|
|
29
|
+
return context;
|
|
30
|
+
}
|
|
31
|
+
if (!input.monitor.projectId) {
|
|
32
|
+
return context;
|
|
33
|
+
}
|
|
34
|
+
const monitorSteps = ((_b = (_a = input.monitor.monitorSteps) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.monitorStepsInstanceArray) || [];
|
|
35
|
+
const clusterIdentifiers = new Set();
|
|
36
|
+
for (const monitorStep of monitorSteps) {
|
|
37
|
+
let clusterIdentifier = undefined;
|
|
38
|
+
if (monitorType === MonitorType.Proxmox) {
|
|
39
|
+
clusterIdentifier = (_d = (_c = monitorStep.data) === null || _c === void 0 ? void 0 : _c.proxmoxMonitor) === null || _d === void 0 ? void 0 : _d.clusterIdentifier;
|
|
40
|
+
}
|
|
41
|
+
else if (monitorType === MonitorType.Ceph) {
|
|
42
|
+
clusterIdentifier = (_f = (_e = monitorStep.data) === null || _e === void 0 ? void 0 : _e.cephMonitor) === null || _f === void 0 ? void 0 : _f.clusterIdentifier;
|
|
43
|
+
}
|
|
44
|
+
else if (monitorType === MonitorType.DockerSwarm) {
|
|
45
|
+
clusterIdentifier =
|
|
46
|
+
(_h = (_g = monitorStep.data) === null || _g === void 0 ? void 0 : _g.dockerSwarmMonitor) === null || _h === void 0 ? void 0 : _h.clusterIdentifier;
|
|
47
|
+
}
|
|
48
|
+
if (clusterIdentifier && clusterIdentifier.trim().length > 0) {
|
|
49
|
+
clusterIdentifiers.add(clusterIdentifier.trim());
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/*
|
|
53
|
+
* Cluster linking is best-effort context — a lookup failure must
|
|
54
|
+
* never block incident/alert creation, so errors are logged and
|
|
55
|
+
* swallowed per identifier.
|
|
56
|
+
*/
|
|
57
|
+
for (const clusterIdentifier of clusterIdentifiers) {
|
|
58
|
+
try {
|
|
59
|
+
if (monitorType === MonitorType.Proxmox) {
|
|
60
|
+
const proxmoxCluster = await ProxmoxClusterService.findOneBy({
|
|
61
|
+
query: {
|
|
62
|
+
projectId: input.monitor.projectId,
|
|
63
|
+
name: QueryHelper.findWithSameText(clusterIdentifier),
|
|
64
|
+
},
|
|
65
|
+
select: {
|
|
66
|
+
_id: true,
|
|
67
|
+
},
|
|
68
|
+
props: {
|
|
69
|
+
isRoot: true,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
if (proxmoxCluster === null || proxmoxCluster === void 0 ? void 0 : proxmoxCluster._id) {
|
|
73
|
+
context.proxmoxClusterIds.push(String(proxmoxCluster._id));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else if (monitorType === MonitorType.Ceph) {
|
|
77
|
+
const cephCluster = await CephClusterService.findOneBy({
|
|
78
|
+
query: {
|
|
79
|
+
projectId: input.monitor.projectId,
|
|
80
|
+
name: QueryHelper.findWithSameText(clusterIdentifier),
|
|
81
|
+
},
|
|
82
|
+
select: {
|
|
83
|
+
_id: true,
|
|
84
|
+
},
|
|
85
|
+
props: {
|
|
86
|
+
isRoot: true,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
if (cephCluster === null || cephCluster === void 0 ? void 0 : cephCluster._id) {
|
|
90
|
+
context.cephClusterIds.push(String(cephCluster._id));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
const dockerSwarmCluster = await DockerSwarmClusterService.findOneBy({
|
|
95
|
+
query: {
|
|
96
|
+
projectId: input.monitor.projectId,
|
|
97
|
+
name: QueryHelper.findWithSameText(clusterIdentifier),
|
|
98
|
+
},
|
|
99
|
+
select: {
|
|
100
|
+
_id: true,
|
|
101
|
+
},
|
|
102
|
+
props: {
|
|
103
|
+
isRoot: true,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
if (dockerSwarmCluster === null || dockerSwarmCluster === void 0 ? void 0 : dockerSwarmCluster._id) {
|
|
107
|
+
context.dockerSwarmClusterIds.push(String(dockerSwarmCluster._id));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
logger.error(`Failed to resolve ${monitorType} cluster "${clusterIdentifier}" for monitor ${(_j = input.monitor.id) === null || _j === void 0 ? void 0 : _j.toString()}: ${err}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return context;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=MonitorClusterContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonitorClusterContext.js","sourceRoot":"","sources":["../../../../../Server/Utils/Monitor/MonitorClusterContext.ts"],"names":[],"mappings":"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"}
|
|
@@ -148,8 +148,8 @@ ${contextBlock}
|
|
|
148
148
|
return input.probeApiIngestResponse;
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
151
|
-
* For metric-backed monitors (Metrics/Kubernetes/Docker)
|
|
152
|
-
* per-series aggregated results, re-evaluate the matched criteria
|
|
151
|
+
* For metric-backed monitors (Metrics/Kubernetes/Docker/Proxmox/Ceph)
|
|
152
|
+
* with per-series aggregated results, re-evaluate the matched criteria
|
|
153
153
|
* once per series and return one entry per series that breached.
|
|
154
154
|
* Returns an empty array when the monitor is not series-aware or
|
|
155
155
|
* no series matched — the caller falls back to the single-incident
|
|
@@ -159,7 +159,12 @@ ${contextBlock}
|
|
|
159
159
|
var _a, _b, _c, _d;
|
|
160
160
|
if (input.monitor.monitorType !== MonitorType.Metrics &&
|
|
161
161
|
input.monitor.monitorType !== MonitorType.Kubernetes &&
|
|
162
|
-
input.monitor.monitorType !== MonitorType.Docker
|
|
162
|
+
input.monitor.monitorType !== MonitorType.Docker &&
|
|
163
|
+
input.monitor.monitorType !== MonitorType.Host &&
|
|
164
|
+
input.monitor.monitorType !== MonitorType.Podman &&
|
|
165
|
+
input.monitor.monitorType !== MonitorType.DockerSwarm &&
|
|
166
|
+
input.monitor.monitorType !== MonitorType.Proxmox &&
|
|
167
|
+
input.monitor.monitorType !== MonitorType.Ceph) {
|
|
163
168
|
return [];
|
|
164
169
|
}
|
|
165
170
|
const metricResponse = input.dataToProcess;
|
|
@@ -473,7 +478,12 @@ ${contextBlock}
|
|
|
473
478
|
}
|
|
474
479
|
if (input.monitor.monitorType === MonitorType.Metrics ||
|
|
475
480
|
input.monitor.monitorType === MonitorType.Kubernetes ||
|
|
476
|
-
input.monitor.monitorType === MonitorType.Docker
|
|
481
|
+
input.monitor.monitorType === MonitorType.Docker ||
|
|
482
|
+
input.monitor.monitorType === MonitorType.Host ||
|
|
483
|
+
input.monitor.monitorType === MonitorType.Podman ||
|
|
484
|
+
input.monitor.monitorType === MonitorType.DockerSwarm ||
|
|
485
|
+
input.monitor.monitorType === MonitorType.Proxmox ||
|
|
486
|
+
input.monitor.monitorType === MonitorType.Ceph) {
|
|
477
487
|
const metricMonitorResult = await MetricMonitorCriteria.isMonitorInstanceCriteriaFilterMet({
|
|
478
488
|
dataToProcess: input.dataToProcess,
|
|
479
489
|
criteriaFilter: input.criteriaFilter,
|
|
@@ -566,6 +576,26 @@ ${contextBlock}
|
|
|
566
576
|
if (input.monitor.monitorType === MonitorType.Docker) {
|
|
567
577
|
return MonitorCriteriaEvaluator.buildDockerRootCauseContext(input);
|
|
568
578
|
}
|
|
579
|
+
// Handle Host monitors with resource context
|
|
580
|
+
if (input.monitor.monitorType === MonitorType.Host) {
|
|
581
|
+
return MonitorCriteriaEvaluator.buildHostRootCauseContext(input);
|
|
582
|
+
}
|
|
583
|
+
// Handle Podman monitors with resource context
|
|
584
|
+
if (input.monitor.monitorType === MonitorType.Podman) {
|
|
585
|
+
return MonitorCriteriaEvaluator.buildPodmanRootCauseContext(input);
|
|
586
|
+
}
|
|
587
|
+
// Handle Proxmox monitors with resource context
|
|
588
|
+
if (input.monitor.monitorType === MonitorType.Proxmox) {
|
|
589
|
+
return MonitorCriteriaEvaluator.buildProxmoxRootCauseContext(input);
|
|
590
|
+
}
|
|
591
|
+
// Handle Docker Swarm monitors with resource context
|
|
592
|
+
if (input.monitor.monitorType === MonitorType.DockerSwarm) {
|
|
593
|
+
return MonitorCriteriaEvaluator.buildDockerSwarmRootCauseContext(input);
|
|
594
|
+
}
|
|
595
|
+
// Handle Ceph monitors with resource context
|
|
596
|
+
if (input.monitor.monitorType === MonitorType.Ceph) {
|
|
597
|
+
return MonitorCriteriaEvaluator.buildCephRootCauseContext(input);
|
|
598
|
+
}
|
|
569
599
|
// Handle generic Metric monitors with metric identity + breaching series
|
|
570
600
|
if (input.monitor.monitorType === MonitorType.Metrics &&
|
|
571
601
|
input.criteriaInstance) {
|
|
@@ -1094,6 +1124,394 @@ ${contextBlock}
|
|
|
1094
1124
|
}
|
|
1095
1125
|
return sections.length > 0 ? sections.join("\n") : null;
|
|
1096
1126
|
}
|
|
1127
|
+
static buildHostRootCauseContext(input) {
|
|
1128
|
+
var _a, _b, _c, _d, _e;
|
|
1129
|
+
const metricResponse = input.dataToProcess;
|
|
1130
|
+
const sections = [];
|
|
1131
|
+
// Host context
|
|
1132
|
+
const hostMonitor = (_a = input.monitorStep.data) === null || _a === void 0 ? void 0 : _a.hostMonitor;
|
|
1133
|
+
if (hostMonitor) {
|
|
1134
|
+
const hostDetails = [];
|
|
1135
|
+
hostDetails.push(`- Host: ${hostMonitor.hostIdentifier || "Unknown"}`);
|
|
1136
|
+
// Add metric name from the query config
|
|
1137
|
+
if (((_c = (_b = hostMonitor.metricViewConfig) === null || _b === void 0 ? void 0 : _b.queryConfigs) === null || _c === void 0 ? void 0 : _c.length) > 0 &&
|
|
1138
|
+
hostMonitor.metricViewConfig.queryConfigs[0]) {
|
|
1139
|
+
const metricName = (_e = (_d = hostMonitor.metricViewConfig.queryConfigs[0]
|
|
1140
|
+
.metricQueryData) === null || _d === void 0 ? void 0 : _d.filterData) === null || _e === void 0 ? void 0 : _e.metricName;
|
|
1141
|
+
if (metricName) {
|
|
1142
|
+
hostDetails.push(`- Metric: \`${metricName}\``);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
sections.push(`**Host Details**\n${hostDetails.join("\n")}`);
|
|
1146
|
+
}
|
|
1147
|
+
// Metric results summary
|
|
1148
|
+
if (metricResponse.metricResult && metricResponse.metricResult.length > 0) {
|
|
1149
|
+
const resultDetails = [];
|
|
1150
|
+
for (const result of metricResponse.metricResult) {
|
|
1151
|
+
if (result.data && result.data.length > 0) {
|
|
1152
|
+
resultDetails.push(`- ${result.data.length} metric data point(s) returned`);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
if (resultDetails.length > 0) {
|
|
1156
|
+
sections.push(`\n\n**Metric Summary**\n${resultDetails.join("\n")}`);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
return sections.length > 0 ? sections.join("\n") : null;
|
|
1160
|
+
}
|
|
1161
|
+
static buildPodmanRootCauseContext(input) {
|
|
1162
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1163
|
+
const metricResponse = input.dataToProcess;
|
|
1164
|
+
const sections = [];
|
|
1165
|
+
// Podman host context
|
|
1166
|
+
const podmanMonitor = (_a = input.monitorStep.data) === null || _a === void 0 ? void 0 : _a.podmanMonitor;
|
|
1167
|
+
if (podmanMonitor) {
|
|
1168
|
+
const hostDetails = [];
|
|
1169
|
+
hostDetails.push(`- Host: ${podmanMonitor.hostIdentifier || "Unknown"}`);
|
|
1170
|
+
if ((_b = podmanMonitor.containerFilters) === null || _b === void 0 ? void 0 : _b.containerName) {
|
|
1171
|
+
hostDetails.push(`- Container Name Filter: ${podmanMonitor.containerFilters.containerName}`);
|
|
1172
|
+
}
|
|
1173
|
+
if ((_c = podmanMonitor.containerFilters) === null || _c === void 0 ? void 0 : _c.containerImage) {
|
|
1174
|
+
hostDetails.push(`- Container Image Filter: ${podmanMonitor.containerFilters.containerImage}`);
|
|
1175
|
+
}
|
|
1176
|
+
// Add metric name from the query config
|
|
1177
|
+
if (((_e = (_d = podmanMonitor.metricViewConfig) === null || _d === void 0 ? void 0 : _d.queryConfigs) === null || _e === void 0 ? void 0 : _e.length) > 0 &&
|
|
1178
|
+
podmanMonitor.metricViewConfig.queryConfigs[0]) {
|
|
1179
|
+
const metricName = (_g = (_f = podmanMonitor.metricViewConfig
|
|
1180
|
+
.queryConfigs[0].metricQueryData) === null || _f === void 0 ? void 0 : _f.filterData) === null || _g === void 0 ? void 0 : _g.metricName;
|
|
1181
|
+
if (metricName) {
|
|
1182
|
+
hostDetails.push(`- Metric: \`${metricName}\``);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
sections.push(`**Podman Host Details**\n${hostDetails.join("\n")}`);
|
|
1186
|
+
}
|
|
1187
|
+
// Metric results summary
|
|
1188
|
+
if (metricResponse.metricResult && metricResponse.metricResult.length > 0) {
|
|
1189
|
+
const resultDetails = [];
|
|
1190
|
+
for (const result of metricResponse.metricResult) {
|
|
1191
|
+
if (result.data && result.data.length > 0) {
|
|
1192
|
+
resultDetails.push(`- ${result.data.length} metric data point(s) returned`);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
if (resultDetails.length > 0) {
|
|
1196
|
+
sections.push(`\n\n**Metric Summary**\n${resultDetails.join("\n")}`);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
return sections.length > 0 ? sections.join("\n") : null;
|
|
1200
|
+
}
|
|
1201
|
+
static buildProxmoxRootCauseContext(input) {
|
|
1202
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1203
|
+
const metricResponse = input.dataToProcess;
|
|
1204
|
+
const breakdown = metricResponse.proxmoxResourceBreakdown;
|
|
1205
|
+
const sections = [];
|
|
1206
|
+
// Proxmox cluster context
|
|
1207
|
+
const proxmoxMonitor = (_a = input.monitorStep.data) === null || _a === void 0 ? void 0 : _a.proxmoxMonitor;
|
|
1208
|
+
if (proxmoxMonitor || breakdown) {
|
|
1209
|
+
const clusterDetails = [];
|
|
1210
|
+
clusterDetails.push(`- Cluster: ${(breakdown === null || breakdown === void 0 ? void 0 : breakdown.clusterName) || (proxmoxMonitor === null || proxmoxMonitor === void 0 ? void 0 : proxmoxMonitor.clusterIdentifier) || "Unknown"}`);
|
|
1211
|
+
if (breakdown) {
|
|
1212
|
+
clusterDetails.push(`- Metric: ${breakdown.metricFriendlyName} (\`${breakdown.metricName}\`)`);
|
|
1213
|
+
}
|
|
1214
|
+
else if (proxmoxMonitor &&
|
|
1215
|
+
((_c = (_b = proxmoxMonitor.metricViewConfig) === null || _b === void 0 ? void 0 : _b.queryConfigs) === null || _c === void 0 ? void 0 : _c.length) > 0 &&
|
|
1216
|
+
proxmoxMonitor.metricViewConfig.queryConfigs[0]) {
|
|
1217
|
+
const metricName = (_e = (_d = proxmoxMonitor.metricViewConfig
|
|
1218
|
+
.queryConfigs[0].metricQueryData) === null || _d === void 0 ? void 0 : _d.filterData) === null || _e === void 0 ? void 0 : _e.metricName;
|
|
1219
|
+
if (metricName) {
|
|
1220
|
+
clusterDetails.push(`- Metric: \`${metricName}\``);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
if ((_f = proxmoxMonitor === null || proxmoxMonitor === void 0 ? void 0 : proxmoxMonitor.resourceFilters) === null || _f === void 0 ? void 0 : _f.scope) {
|
|
1224
|
+
clusterDetails.push(`- Scope Filter: ${proxmoxMonitor.resourceFilters.scope}`);
|
|
1225
|
+
}
|
|
1226
|
+
if ((_g = proxmoxMonitor === null || proxmoxMonitor === void 0 ? void 0 : proxmoxMonitor.resourceFilters) === null || _g === void 0 ? void 0 : _g.pveId) {
|
|
1227
|
+
clusterDetails.push(`- Resource ID Filter: ${proxmoxMonitor.resourceFilters.pveId}`);
|
|
1228
|
+
}
|
|
1229
|
+
if ((_h = proxmoxMonitor === null || proxmoxMonitor === void 0 ? void 0 : proxmoxMonitor.resourceFilters) === null || _h === void 0 ? void 0 : _h.nodeName) {
|
|
1230
|
+
clusterDetails.push(`- Node Filter: ${proxmoxMonitor.resourceFilters.nodeName}`);
|
|
1231
|
+
}
|
|
1232
|
+
if ((_j = proxmoxMonitor === null || proxmoxMonitor === void 0 ? void 0 : proxmoxMonitor.resourceFilters) === null || _j === void 0 ? void 0 : _j.guestId) {
|
|
1233
|
+
clusterDetails.push(`- Guest ID Filter: ${proxmoxMonitor.resourceFilters.guestId}`);
|
|
1234
|
+
}
|
|
1235
|
+
sections.push(`**Proxmox Cluster Details**\n${clusterDetails.join("\n")}`);
|
|
1236
|
+
}
|
|
1237
|
+
// Affected resources (Resource / Type / Node / Value)
|
|
1238
|
+
let renderedBreakdownTable = false;
|
|
1239
|
+
if (breakdown && breakdown.affectedResources.length > 0) {
|
|
1240
|
+
/*
|
|
1241
|
+
* K8s-parity render: drop zero-value rows, worst (highest)
|
|
1242
|
+
* first, top 10. Note that for availability metrics (pve_up)
|
|
1243
|
+
* zero-valued rows ARE the down resources — those still drive
|
|
1244
|
+
* alerting through the per-series criteria evaluation; this
|
|
1245
|
+
* table is supplementary context only.
|
|
1246
|
+
*/
|
|
1247
|
+
const sortedResources = [
|
|
1248
|
+
...breakdown.affectedResources,
|
|
1249
|
+
]
|
|
1250
|
+
.filter((r) => {
|
|
1251
|
+
return r.metricValue > 0;
|
|
1252
|
+
})
|
|
1253
|
+
.sort((a, b) => {
|
|
1254
|
+
return b.metricValue - a.metricValue;
|
|
1255
|
+
});
|
|
1256
|
+
/*
|
|
1257
|
+
* Skip the table when no row carries any identity label
|
|
1258
|
+
* (cluster-wide series) — it would add nothing.
|
|
1259
|
+
*/
|
|
1260
|
+
const hasIdentity = sortedResources.some((r) => {
|
|
1261
|
+
return r.resourceId || r.resourceName || r.nodeName;
|
|
1262
|
+
});
|
|
1263
|
+
if (sortedResources.length > 0 && hasIdentity) {
|
|
1264
|
+
const resourcesToShow = sortedResources.slice(0, 10);
|
|
1265
|
+
const resourceLines = [];
|
|
1266
|
+
resourceLines.push(`| Resource | Type | Node | Value |`);
|
|
1267
|
+
resourceLines.push(`| --- | --- | --- | --- |`);
|
|
1268
|
+
for (const resource of resourcesToShow) {
|
|
1269
|
+
let resourceCell = "-";
|
|
1270
|
+
if (resource.resourceName && resource.resourceId) {
|
|
1271
|
+
resourceCell = `\`${resource.resourceName}\` (\`${resource.resourceId}\`)`;
|
|
1272
|
+
}
|
|
1273
|
+
else if (resource.resourceId) {
|
|
1274
|
+
resourceCell = `\`${resource.resourceId}\``;
|
|
1275
|
+
}
|
|
1276
|
+
else if (resource.resourceName) {
|
|
1277
|
+
resourceCell = `\`${resource.resourceName}\``;
|
|
1278
|
+
}
|
|
1279
|
+
const typeCell = resource.resourceType || resource.scope || "-";
|
|
1280
|
+
const nodeCell = resource.nodeName
|
|
1281
|
+
? `\`${resource.nodeName}\``
|
|
1282
|
+
: "-";
|
|
1283
|
+
resourceLines.push(`| ${resourceCell} | ${typeCell} | ${nodeCell} | **${resource.metricValue}** |`);
|
|
1284
|
+
}
|
|
1285
|
+
if (sortedResources.length > 10) {
|
|
1286
|
+
resourceLines.push(`\n*... and ${sortedResources.length - 10} more affected resources*`);
|
|
1287
|
+
}
|
|
1288
|
+
sections.push(`\n\n**Affected Resources** (${sortedResources.length} total)\n\n${resourceLines.join("\n")}`);
|
|
1289
|
+
renderedBreakdownTable = true;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
// Metric results summary (fallback context when no table rendered)
|
|
1293
|
+
if (!renderedBreakdownTable &&
|
|
1294
|
+
metricResponse.metricResult &&
|
|
1295
|
+
metricResponse.metricResult.length > 0) {
|
|
1296
|
+
const resultDetails = [];
|
|
1297
|
+
for (const result of metricResponse.metricResult) {
|
|
1298
|
+
if (result.data && result.data.length > 0) {
|
|
1299
|
+
resultDetails.push(`- ${result.data.length} metric data point(s) returned`);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
if (resultDetails.length > 0) {
|
|
1303
|
+
sections.push(`\n\n**Metric Summary**\n${resultDetails.join("\n")}`);
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
return sections.length > 0 ? sections.join("\n") : null;
|
|
1307
|
+
}
|
|
1308
|
+
static buildDockerSwarmRootCauseContext(input) {
|
|
1309
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1310
|
+
const metricResponse = input.dataToProcess;
|
|
1311
|
+
const breakdown = metricResponse.dockerSwarmResourceBreakdown;
|
|
1312
|
+
const sections = [];
|
|
1313
|
+
// Docker Swarm cluster context
|
|
1314
|
+
const dockerSwarmMonitor = (_a = input.monitorStep.data) === null || _a === void 0 ? void 0 : _a.dockerSwarmMonitor;
|
|
1315
|
+
if (dockerSwarmMonitor || breakdown) {
|
|
1316
|
+
const clusterDetails = [];
|
|
1317
|
+
clusterDetails.push(`- Cluster: ${(breakdown === null || breakdown === void 0 ? void 0 : breakdown.clusterName) || (dockerSwarmMonitor === null || dockerSwarmMonitor === void 0 ? void 0 : dockerSwarmMonitor.clusterIdentifier) || "Unknown"}`);
|
|
1318
|
+
if (breakdown) {
|
|
1319
|
+
clusterDetails.push(`- Metric: ${breakdown.metricFriendlyName} (\`${breakdown.metricName}\`)`);
|
|
1320
|
+
}
|
|
1321
|
+
else if (dockerSwarmMonitor &&
|
|
1322
|
+
((_c = (_b = dockerSwarmMonitor.metricViewConfig) === null || _b === void 0 ? void 0 : _b.queryConfigs) === null || _c === void 0 ? void 0 : _c.length) > 0 &&
|
|
1323
|
+
dockerSwarmMonitor.metricViewConfig.queryConfigs[0]) {
|
|
1324
|
+
const metricName = (_e = (_d = dockerSwarmMonitor.metricViewConfig
|
|
1325
|
+
.queryConfigs[0].metricQueryData) === null || _d === void 0 ? void 0 : _d.filterData) === null || _e === void 0 ? void 0 : _e.metricName;
|
|
1326
|
+
if (metricName) {
|
|
1327
|
+
clusterDetails.push(`- Metric: \`${metricName}\``);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
if ((_f = dockerSwarmMonitor === null || dockerSwarmMonitor === void 0 ? void 0 : dockerSwarmMonitor.resourceFilters) === null || _f === void 0 ? void 0 : _f.serviceName) {
|
|
1331
|
+
clusterDetails.push(`- Service Filter: ${dockerSwarmMonitor.resourceFilters.serviceName}`);
|
|
1332
|
+
}
|
|
1333
|
+
if ((_g = dockerSwarmMonitor === null || dockerSwarmMonitor === void 0 ? void 0 : dockerSwarmMonitor.resourceFilters) === null || _g === void 0 ? void 0 : _g.nodeName) {
|
|
1334
|
+
clusterDetails.push(`- Node Filter: ${dockerSwarmMonitor.resourceFilters.nodeName}`);
|
|
1335
|
+
}
|
|
1336
|
+
if ((_h = dockerSwarmMonitor === null || dockerSwarmMonitor === void 0 ? void 0 : dockerSwarmMonitor.resourceFilters) === null || _h === void 0 ? void 0 : _h.containerName) {
|
|
1337
|
+
clusterDetails.push(`- Container Name Filter: ${dockerSwarmMonitor.resourceFilters.containerName}`);
|
|
1338
|
+
}
|
|
1339
|
+
if ((_j = dockerSwarmMonitor === null || dockerSwarmMonitor === void 0 ? void 0 : dockerSwarmMonitor.resourceFilters) === null || _j === void 0 ? void 0 : _j.containerImage) {
|
|
1340
|
+
clusterDetails.push(`- Container Image Filter: ${dockerSwarmMonitor.resourceFilters.containerImage}`);
|
|
1341
|
+
}
|
|
1342
|
+
sections.push(`**Docker Swarm Cluster Details**\n${clusterDetails.join("\n")}`);
|
|
1343
|
+
}
|
|
1344
|
+
// Affected resources (Task / Service / Node / Value)
|
|
1345
|
+
let renderedBreakdownTable = false;
|
|
1346
|
+
if (breakdown && breakdown.affectedResources.length > 0) {
|
|
1347
|
+
/*
|
|
1348
|
+
* K8s/Proxmox-parity render: drop zero-value rows, worst (highest)
|
|
1349
|
+
* first, top 10. For the task-down template the breaching rows ARE
|
|
1350
|
+
* the zero-uptime ones — those still drive alerting through the
|
|
1351
|
+
* per-series criteria evaluation; this table is supplementary
|
|
1352
|
+
* context only.
|
|
1353
|
+
*/
|
|
1354
|
+
const sortedResources = [
|
|
1355
|
+
...breakdown.affectedResources,
|
|
1356
|
+
]
|
|
1357
|
+
.filter((r) => {
|
|
1358
|
+
return r.metricValue > 0;
|
|
1359
|
+
})
|
|
1360
|
+
.sort((a, b) => {
|
|
1361
|
+
return b.metricValue - a.metricValue;
|
|
1362
|
+
});
|
|
1363
|
+
/*
|
|
1364
|
+
* Skip the table when no row carries any identity label
|
|
1365
|
+
* (cluster-wide series) — it would add nothing.
|
|
1366
|
+
*/
|
|
1367
|
+
const hasIdentity = sortedResources.some((r) => {
|
|
1368
|
+
return r.containerName || r.serviceName || r.nodeName;
|
|
1369
|
+
});
|
|
1370
|
+
if (sortedResources.length > 0 && hasIdentity) {
|
|
1371
|
+
const resourcesToShow = sortedResources.slice(0, 10);
|
|
1372
|
+
const resourceLines = [];
|
|
1373
|
+
resourceLines.push(`| Task / Container | Service | Node | Value |`);
|
|
1374
|
+
resourceLines.push(`| --- | --- | --- | --- |`);
|
|
1375
|
+
for (const resource of resourcesToShow) {
|
|
1376
|
+
const taskCell = resource.containerName
|
|
1377
|
+
? `\`${resource.containerName}\``
|
|
1378
|
+
: "-";
|
|
1379
|
+
const serviceCell = resource.serviceName
|
|
1380
|
+
? `\`${resource.serviceName}\``
|
|
1381
|
+
: "-";
|
|
1382
|
+
const nodeCell = resource.nodeName
|
|
1383
|
+
? `\`${resource.nodeName}\``
|
|
1384
|
+
: "-";
|
|
1385
|
+
resourceLines.push(`| ${taskCell} | ${serviceCell} | ${nodeCell} | **${resource.metricValue}** |`);
|
|
1386
|
+
}
|
|
1387
|
+
if (sortedResources.length > 10) {
|
|
1388
|
+
resourceLines.push(`\n*... and ${sortedResources.length - 10} more affected tasks*`);
|
|
1389
|
+
}
|
|
1390
|
+
sections.push(`\n\n**Affected Tasks** (${sortedResources.length} total)\n\n${resourceLines.join("\n")}`);
|
|
1391
|
+
renderedBreakdownTable = true;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
// Metric results summary (fallback context when no table rendered)
|
|
1395
|
+
if (!renderedBreakdownTable &&
|
|
1396
|
+
metricResponse.metricResult &&
|
|
1397
|
+
metricResponse.metricResult.length > 0) {
|
|
1398
|
+
const resultDetails = [];
|
|
1399
|
+
for (const result of metricResponse.metricResult) {
|
|
1400
|
+
if (result.data && result.data.length > 0) {
|
|
1401
|
+
resultDetails.push(`- ${result.data.length} metric data point(s) returned`);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
if (resultDetails.length > 0) {
|
|
1405
|
+
sections.push(`\n\n**Metric Summary**\n${resultDetails.join("\n")}`);
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
return sections.length > 0 ? sections.join("\n") : null;
|
|
1409
|
+
}
|
|
1410
|
+
static buildCephRootCauseContext(input) {
|
|
1411
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1412
|
+
const metricResponse = input.dataToProcess;
|
|
1413
|
+
const breakdown = metricResponse.cephResourceBreakdown;
|
|
1414
|
+
const sections = [];
|
|
1415
|
+
// Ceph cluster context
|
|
1416
|
+
const cephMonitor = (_a = input.monitorStep.data) === null || _a === void 0 ? void 0 : _a.cephMonitor;
|
|
1417
|
+
if (cephMonitor || breakdown) {
|
|
1418
|
+
const clusterDetails = [];
|
|
1419
|
+
clusterDetails.push(`- Cluster: ${(breakdown === null || breakdown === void 0 ? void 0 : breakdown.clusterName) || (cephMonitor === null || cephMonitor === void 0 ? void 0 : cephMonitor.clusterIdentifier) || "Unknown"}`);
|
|
1420
|
+
if (breakdown) {
|
|
1421
|
+
clusterDetails.push(`- Metric: ${breakdown.metricFriendlyName} (\`${breakdown.metricName}\`)`);
|
|
1422
|
+
}
|
|
1423
|
+
else if (cephMonitor &&
|
|
1424
|
+
((_c = (_b = cephMonitor.metricViewConfig) === null || _b === void 0 ? void 0 : _b.queryConfigs) === null || _c === void 0 ? void 0 : _c.length) > 0 &&
|
|
1425
|
+
cephMonitor.metricViewConfig.queryConfigs[0]) {
|
|
1426
|
+
const metricName = (_e = (_d = cephMonitor.metricViewConfig.queryConfigs[0]
|
|
1427
|
+
.metricQueryData) === null || _d === void 0 ? void 0 : _d.filterData) === null || _e === void 0 ? void 0 : _e.metricName;
|
|
1428
|
+
if (metricName) {
|
|
1429
|
+
clusterDetails.push(`- Metric: \`${metricName}\``);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
if ((_f = cephMonitor === null || cephMonitor === void 0 ? void 0 : cephMonitor.resourceFilters) === null || _f === void 0 ? void 0 : _f.osdId) {
|
|
1433
|
+
clusterDetails.push(`- OSD Filter: ${cephMonitor.resourceFilters.osdId}`);
|
|
1434
|
+
}
|
|
1435
|
+
if ((_g = cephMonitor === null || cephMonitor === void 0 ? void 0 : cephMonitor.resourceFilters) === null || _g === void 0 ? void 0 : _g.poolId) {
|
|
1436
|
+
clusterDetails.push(`- Pool ID Filter: ${cephMonitor.resourceFilters.poolId}`);
|
|
1437
|
+
}
|
|
1438
|
+
sections.push(`**Ceph Cluster Details**\n${clusterDetails.join("\n")}`);
|
|
1439
|
+
}
|
|
1440
|
+
// Affected resources (Daemon / Pool / Host / Value)
|
|
1441
|
+
let renderedBreakdownTable = false;
|
|
1442
|
+
if (breakdown && breakdown.affectedResources.length > 0) {
|
|
1443
|
+
/*
|
|
1444
|
+
* K8s-parity render: drop zero-value rows, worst (highest)
|
|
1445
|
+
* first, top 10. Note that for availability metrics
|
|
1446
|
+
* (ceph_osd_up / ceph_osd_in / ceph_mon_quorum_status)
|
|
1447
|
+
* zero-valued rows ARE the down resources — those still drive
|
|
1448
|
+
* alerting through the per-series criteria evaluation; this
|
|
1449
|
+
* table is supplementary context only.
|
|
1450
|
+
*/
|
|
1451
|
+
const sortedResources = [
|
|
1452
|
+
...breakdown.affectedResources,
|
|
1453
|
+
]
|
|
1454
|
+
.filter((r) => {
|
|
1455
|
+
return r.metricValue > 0;
|
|
1456
|
+
})
|
|
1457
|
+
.sort((a, b) => {
|
|
1458
|
+
return b.metricValue - a.metricValue;
|
|
1459
|
+
});
|
|
1460
|
+
/*
|
|
1461
|
+
* Skip the table when no row carries any identity label
|
|
1462
|
+
* (cluster-wide series like ceph_health_status) — it would add
|
|
1463
|
+
* nothing.
|
|
1464
|
+
*/
|
|
1465
|
+
const hasIdentity = sortedResources.some((r) => {
|
|
1466
|
+
return r.daemon || r.poolId || r.poolName || r.hostname;
|
|
1467
|
+
});
|
|
1468
|
+
if (sortedResources.length > 0 && hasIdentity) {
|
|
1469
|
+
const resourcesToShow = sortedResources.slice(0, 10);
|
|
1470
|
+
const resourceLines = [];
|
|
1471
|
+
resourceLines.push(`| Daemon | Pool | Host | Value |`);
|
|
1472
|
+
resourceLines.push(`| --- | --- | --- | --- |`);
|
|
1473
|
+
for (const resource of resourcesToShow) {
|
|
1474
|
+
const daemonCell = resource.daemon
|
|
1475
|
+
? `\`${resource.daemon}\``
|
|
1476
|
+
: "-";
|
|
1477
|
+
let poolCell = "-";
|
|
1478
|
+
if (resource.poolName && resource.poolId) {
|
|
1479
|
+
poolCell = `\`${resource.poolName}\` (\`${resource.poolId}\`)`;
|
|
1480
|
+
}
|
|
1481
|
+
else if (resource.poolName) {
|
|
1482
|
+
poolCell = `\`${resource.poolName}\``;
|
|
1483
|
+
}
|
|
1484
|
+
else if (resource.poolId) {
|
|
1485
|
+
poolCell = `\`${resource.poolId}\``;
|
|
1486
|
+
}
|
|
1487
|
+
const hostCell = resource.hostname
|
|
1488
|
+
? `\`${resource.hostname}\``
|
|
1489
|
+
: "-";
|
|
1490
|
+
resourceLines.push(`| ${daemonCell} | ${poolCell} | ${hostCell} | **${resource.metricValue}** |`);
|
|
1491
|
+
}
|
|
1492
|
+
if (sortedResources.length > 10) {
|
|
1493
|
+
resourceLines.push(`\n*... and ${sortedResources.length - 10} more affected resources*`);
|
|
1494
|
+
}
|
|
1495
|
+
sections.push(`\n\n**Affected Resources** (${sortedResources.length} total)\n\n${resourceLines.join("\n")}`);
|
|
1496
|
+
renderedBreakdownTable = true;
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
// Metric results summary (fallback context when no table rendered)
|
|
1500
|
+
if (!renderedBreakdownTable &&
|
|
1501
|
+
metricResponse.metricResult &&
|
|
1502
|
+
metricResponse.metricResult.length > 0) {
|
|
1503
|
+
const resultDetails = [];
|
|
1504
|
+
for (const result of metricResponse.metricResult) {
|
|
1505
|
+
if (result.data && result.data.length > 0) {
|
|
1506
|
+
resultDetails.push(`- ${result.data.length} metric data point(s) returned`);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
if (resultDetails.length > 0) {
|
|
1510
|
+
sections.push(`\n\n**Metric Summary**\n${resultDetails.join("\n")}`);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
return sections.length > 0 ? sections.join("\n") : null;
|
|
1514
|
+
}
|
|
1097
1515
|
static buildKubernetesRootCauseAnalysis(input) {
|
|
1098
1516
|
const { breakdown, topResource } = input;
|
|
1099
1517
|
const metricName = breakdown.metricName;
|