@oneuptime/common 11.0.1 → 11.0.2
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 +110 -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/Host.ts +64 -0
- package/Models/DatabaseModels/Incident.ts +110 -0
- package/Models/DatabaseModels/Index.ts +24 -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 +110 -0
- package/Server/API/BillingInvoiceAPI.ts +47 -7
- package/Server/API/CephResourceAPI.ts +134 -0
- package/Server/API/DashboardAPI.ts +46 -0
- package/Server/API/ProjectAPI.ts +15 -0
- package/Server/API/ProxmoxResourceAPI.ts +132 -0
- package/Server/API/ResellerPlanAPI.ts +17 -0
- package/Server/Infrastructure/GlobalCache.ts +8 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.ts +163 -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 +8 -0
- package/Server/Infrastructure/Redis.ts +40 -12
- 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/ExceptionAggregationService.ts +2 -0
- package/Server/Services/HostService.ts +11 -3
- package/Server/Services/Index.ts +24 -0
- package/Server/Services/KubernetesClusterService.ts +11 -3
- package/Server/Services/LogAggregationService.ts +2 -0
- package/Server/Services/MetricAggregationService.ts +2 -0
- package/Server/Services/OpenTelemetryIngestService.ts +36 -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/ServerlessFunctionService.ts +11 -3
- package/Server/Services/TelemetryUsageBillingService.ts +41 -3
- package/Server/Services/TraceAggregationService.ts +2 -0
- package/Server/Types/AnalyticsDatabase/AggregateBy.ts +8 -23
- package/Server/Utils/Monitor/MonitorAlert.ts +45 -0
- package/Server/Utils/Monitor/MonitorClusterContext.ts +129 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +344 -4
- package/Server/Utils/Monitor/MonitorIncident.ts +130 -7
- package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +39 -6
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +3 -1
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +33 -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/TelemetryEntity.ts +85 -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 +13 -0
- package/Tests/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.test.ts +879 -0
- package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +196 -0
- package/Tests/Types/Monitor/CephAlertTemplates.test.ts +1231 -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 +4 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.ts +16 -0
- package/Types/Dashboard/DashboardTemplates.ts +446 -0
- package/Types/Icon/IconProp.ts +2 -0
- package/Types/Monitor/CephAlertTemplates.ts +1647 -0
- package/Types/Monitor/CephMetricCatalog.ts +409 -0
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +44 -0
- package/Types/Monitor/MonitorStep.ts +64 -0
- package/Types/Monitor/MonitorStepCephMonitor.ts +57 -0
- package/Types/Monitor/MonitorStepProxmoxMonitor.ts +81 -0
- package/Types/Monitor/MonitorType.ts +29 -1
- package/Types/Monitor/ProxmoxAlertTemplates.ts +899 -0
- package/Types/Monitor/ProxmoxMetricCatalog.ts +382 -0
- package/Types/Permission.ts +464 -0
- package/Types/Telemetry/EntityType.ts +11 -0
- package/Types/Telemetry/ServiceType.ts +2 -0
- package/UI/Components/Icon/Icon.tsx +84 -0
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +9 -5
- package/UI/Utils/Telemetry/Telemetry.ts +16 -21
- package/UI/Utils/TelemetryService.ts +7 -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/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 +28 -0
- package/Utils/Telemetry/EntityKey.ts +35 -0
- package/Utils/Telemetry/EntityRelationship.ts +6 -0
- package/Utils/Telemetry/HeartbeatAvailability.ts +262 -0
- package/build/dist/Models/DatabaseModels/Alert.js +108 -0
- package/build/dist/Models/DatabaseModels/Alert.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/Host.js +63 -0
- package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +108 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +24 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- 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 +108 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.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 +46 -0
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- 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/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/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 +8 -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/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/ExceptionAggregationService.js +2 -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/Index.js +24 -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 +2 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +2 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +37 -7
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- 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/ServerlessFunctionService.js +10 -2
- package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +30 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +2 -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/Utils/Monitor/MonitorAlert.js +36 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js +90 -0
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +228 -4
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +103 -8
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +23 -6
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +3 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +23 -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/TelemetryEntity.js +62 -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 +4 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +2 -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/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 +394 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/Icon/IconProp.js +2 -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/MonitorStep.js +46 -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/MonitorStepProxmoxMonitor.js +36 -0
- package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +27 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- 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 +408 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Telemetry/EntityType.js +11 -0
- package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
- package/build/dist/Types/Telemetry/ServiceType.js +2 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +33 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +5 -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 +5 -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/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 +16 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Telemetry/EntityKey.js +27 -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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import CephCluster from "../../../Models/DatabaseModels/CephCluster";
|
|
1
2
|
import DockerHost from "../../../Models/DatabaseModels/DockerHost";
|
|
2
3
|
import Host from "../../../Models/DatabaseModels/Host";
|
|
3
4
|
import Incident from "../../../Models/DatabaseModels/Incident";
|
|
@@ -8,6 +9,7 @@ import KubernetesCluster from "../../../Models/DatabaseModels/KubernetesCluster"
|
|
|
8
9
|
import Label from "../../../Models/DatabaseModels/Label";
|
|
9
10
|
import Monitor from "../../../Models/DatabaseModels/Monitor";
|
|
10
11
|
import OnCallDutyPolicy from "../../../Models/DatabaseModels/OnCallDutyPolicy";
|
|
12
|
+
import ProxmoxCluster from "../../../Models/DatabaseModels/ProxmoxCluster";
|
|
11
13
|
import Service from "../../../Models/DatabaseModels/Service";
|
|
12
14
|
import Includes from "../../../Types/BaseDatabase/Includes";
|
|
13
15
|
import SortOrder from "../../../Types/BaseDatabase/SortOrder";
|
|
@@ -20,10 +22,12 @@ import ObjectID from "../../../Types/ObjectID";
|
|
|
20
22
|
import ProbeMonitorResponse from "../../../Types/Probe/ProbeMonitorResponse";
|
|
21
23
|
import { TelemetryQuery } from "../../../Types/Telemetry/TelemetryQuery";
|
|
22
24
|
import { DisableAutomaticIncidentCreation } from "../../EnvironmentConfig";
|
|
25
|
+
import CephClusterService from "../../Services/CephClusterService";
|
|
23
26
|
import DockerHostService from "../../Services/DockerHostService";
|
|
24
27
|
import HostService from "../../Services/HostService";
|
|
25
28
|
import IncidentService from "../../Services/IncidentService";
|
|
26
29
|
import KubernetesClusterService from "../../Services/KubernetesClusterService";
|
|
30
|
+
import ProxmoxClusterService from "../../Services/ProxmoxClusterService";
|
|
27
31
|
import ServiceService from "../../Services/ServiceService";
|
|
28
32
|
import IncidentSeverityService from "../../Services/IncidentSeverityService";
|
|
29
33
|
import IncidentStateTimelineService from "../../Services/IncidentStateTimelineService";
|
|
@@ -37,6 +41,9 @@ import OneUptimeDate from "../../../Types/Date";
|
|
|
37
41
|
import MonitorEvaluationSummary from "../../../Types/Monitor/MonitorEvaluationSummary";
|
|
38
42
|
import { IncidentMemberRoleAssignment } from "../../../Types/Monitor/CriteriaIncident";
|
|
39
43
|
import { PerSeriesCriteriaMatch } from "../../../Types/Probe/ProbeApiIngestResponse";
|
|
44
|
+
import MonitorClusterContextUtil, {
|
|
45
|
+
MonitorClusterContext,
|
|
46
|
+
} from "./MonitorClusterContext";
|
|
40
47
|
import SeriesResourceLabels, {
|
|
41
48
|
SeriesResourceRefs,
|
|
42
49
|
} from "./SeriesResourceLabels";
|
|
@@ -196,6 +203,19 @@ export default class MonitorIncident {
|
|
|
196
203
|
return;
|
|
197
204
|
}
|
|
198
205
|
|
|
206
|
+
/*
|
|
207
|
+
* Proxmox/Ceph monitors: resolve the monitored cluster once per
|
|
208
|
+
* evaluation (lookup-only, from the step config's clusterIdentifier)
|
|
209
|
+
* so every incident created below is attached to it. Series labels
|
|
210
|
+
* cannot supply this — they carry datapoint labels (`id`,
|
|
211
|
+
* `ceph_daemon`, `pool_id`), not cluster identity, and ungrouped
|
|
212
|
+
* templates have no series at all. No-op for other monitor types.
|
|
213
|
+
*/
|
|
214
|
+
const clusterContext: MonitorClusterContext =
|
|
215
|
+
await MonitorClusterContextUtil.resolveClusterContextForMonitor({
|
|
216
|
+
monitor: input.monitor,
|
|
217
|
+
});
|
|
218
|
+
|
|
199
219
|
/*
|
|
200
220
|
* Series-less path: one incident per criteriaIncident template as
|
|
201
221
|
* before. Series-aware path: one incident per (series × template).
|
|
@@ -384,6 +404,15 @@ export default class MonitorIncident {
|
|
|
384
404
|
});
|
|
385
405
|
}
|
|
386
406
|
|
|
407
|
+
/*
|
|
408
|
+
* Deterministic Proxmox/Ceph cluster link from the monitor's
|
|
409
|
+
* step config (resolved once above). Runs for both grouped and
|
|
410
|
+
* ungrouped incidents and merges with anything the series-label
|
|
411
|
+
* path resolved, so the per-cluster Activity tabs always see
|
|
412
|
+
* monitor-created incidents.
|
|
413
|
+
*/
|
|
414
|
+
this.attachClusterContext({ incident, clusterContext });
|
|
415
|
+
|
|
387
416
|
incident.onCallDutyPolicies =
|
|
388
417
|
criteriaIncident.onCallPolicyIds?.map((id: ObjectID) => {
|
|
389
418
|
const onCallPolicy: OnCallDutyPolicy = new OnCallDutyPolicy();
|
|
@@ -527,13 +556,14 @@ export default class MonitorIncident {
|
|
|
527
556
|
}
|
|
528
557
|
|
|
529
558
|
/*
|
|
530
|
-
* Pull every host / docker-host / k8s-cluster /
|
|
531
|
-
* out of the series labels and
|
|
532
|
-
* records to the incident. The
|
|
533
|
-
*
|
|
534
|
-
* suppression path so the two
|
|
535
|
-
* identify which resource). Lookups
|
|
536
|
-
* stale or hostile stamp can't pull in
|
|
559
|
+
* Pull every host / docker-host / k8s-cluster / proxmox-cluster /
|
|
560
|
+
* ceph-cluster / service identifier out of the series labels and
|
|
561
|
+
* attach the matching project-scoped records to the incident. The
|
|
562
|
+
* label-key → resource-type mapping lives in SeriesResourceLabels
|
|
563
|
+
* (shared with the scheduled-maintenance suppression path so the two
|
|
564
|
+
* never disagree about which labels identify which resource). Lookups
|
|
565
|
+
* are always project-scoped so a stale or hostile stamp can't pull in
|
|
566
|
+
* a record from another tenant.
|
|
537
567
|
*/
|
|
538
568
|
private static async linkResourceContextFromSeries(input: {
|
|
539
569
|
incident: Incident;
|
|
@@ -549,6 +579,8 @@ export default class MonitorIncident {
|
|
|
549
579
|
resolvedDockerHosts,
|
|
550
580
|
resolvedClusters,
|
|
551
581
|
resolvedServices,
|
|
582
|
+
resolvedProxmoxClusters,
|
|
583
|
+
resolvedCephClusters,
|
|
552
584
|
] = await Promise.all([
|
|
553
585
|
this.resolveResourceIds({
|
|
554
586
|
ids: refs.hostIds,
|
|
@@ -578,6 +610,20 @@ export default class MonitorIncident {
|
|
|
578
610
|
projectId: input.projectId,
|
|
579
611
|
findBy: ServiceService.findBy.bind(ServiceService),
|
|
580
612
|
}),
|
|
613
|
+
this.resolveResourceIds({
|
|
614
|
+
ids: [],
|
|
615
|
+
names: refs.proxmoxClusterNames,
|
|
616
|
+
nameColumn: "name",
|
|
617
|
+
projectId: input.projectId,
|
|
618
|
+
findBy: ProxmoxClusterService.findBy.bind(ProxmoxClusterService),
|
|
619
|
+
}),
|
|
620
|
+
this.resolveResourceIds({
|
|
621
|
+
ids: [],
|
|
622
|
+
names: refs.cephClusterNames,
|
|
623
|
+
nameColumn: "name",
|
|
624
|
+
projectId: input.projectId,
|
|
625
|
+
findBy: CephClusterService.findBy.bind(CephClusterService),
|
|
626
|
+
}),
|
|
581
627
|
]);
|
|
582
628
|
|
|
583
629
|
if (resolvedHosts.length > 0) {
|
|
@@ -612,6 +658,83 @@ export default class MonitorIncident {
|
|
|
612
658
|
return service;
|
|
613
659
|
});
|
|
614
660
|
}
|
|
661
|
+
if (resolvedProxmoxClusters.length > 0) {
|
|
662
|
+
input.incident.proxmoxClusters = resolvedProxmoxClusters.map(
|
|
663
|
+
(id: string): ProxmoxCluster => {
|
|
664
|
+
const cluster: ProxmoxCluster = new ProxmoxCluster();
|
|
665
|
+
cluster._id = id;
|
|
666
|
+
return cluster;
|
|
667
|
+
},
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
if (resolvedCephClusters.length > 0) {
|
|
671
|
+
input.incident.cephClusters = resolvedCephClusters.map(
|
|
672
|
+
(id: string): CephCluster => {
|
|
673
|
+
const cluster: CephCluster = new CephCluster();
|
|
674
|
+
cluster._id = id;
|
|
675
|
+
return cluster;
|
|
676
|
+
},
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/*
|
|
682
|
+
* Attach the monitor-step-resolved Proxmox/Ceph cluster ids to the
|
|
683
|
+
* incident, merging with (never overwriting) anything the
|
|
684
|
+
* series-label path already linked. Both paths can resolve the same
|
|
685
|
+
* cluster, so dedupe by id.
|
|
686
|
+
*/
|
|
687
|
+
private static attachClusterContext(input: {
|
|
688
|
+
incident: Incident;
|
|
689
|
+
clusterContext: MonitorClusterContext;
|
|
690
|
+
}): void {
|
|
691
|
+
if (input.clusterContext.proxmoxClusterIds.length > 0) {
|
|
692
|
+
const existingIds: Set<string> = new Set<string>(
|
|
693
|
+
(input.incident.proxmoxClusters || []).map(
|
|
694
|
+
(cluster: ProxmoxCluster) => {
|
|
695
|
+
return String(cluster._id);
|
|
696
|
+
},
|
|
697
|
+
),
|
|
698
|
+
);
|
|
699
|
+
|
|
700
|
+
const merged: Array<ProxmoxCluster> = [
|
|
701
|
+
...(input.incident.proxmoxClusters || []),
|
|
702
|
+
];
|
|
703
|
+
|
|
704
|
+
for (const id of input.clusterContext.proxmoxClusterIds) {
|
|
705
|
+
if (existingIds.has(id)) {
|
|
706
|
+
continue;
|
|
707
|
+
}
|
|
708
|
+
const cluster: ProxmoxCluster = new ProxmoxCluster();
|
|
709
|
+
cluster._id = id;
|
|
710
|
+
merged.push(cluster);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
input.incident.proxmoxClusters = merged;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
if (input.clusterContext.cephClusterIds.length > 0) {
|
|
717
|
+
const existingIds: Set<string> = new Set<string>(
|
|
718
|
+
(input.incident.cephClusters || []).map((cluster: CephCluster) => {
|
|
719
|
+
return String(cluster._id);
|
|
720
|
+
}),
|
|
721
|
+
);
|
|
722
|
+
|
|
723
|
+
const merged: Array<CephCluster> = [
|
|
724
|
+
...(input.incident.cephClusters || []),
|
|
725
|
+
];
|
|
726
|
+
|
|
727
|
+
for (const id of input.clusterContext.cephClusterIds) {
|
|
728
|
+
if (existingIds.has(id)) {
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
const cluster: CephCluster = new CephCluster();
|
|
732
|
+
cluster._id = id;
|
|
733
|
+
merged.push(cluster);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
input.incident.cephClusters = merged;
|
|
737
|
+
}
|
|
615
738
|
}
|
|
616
739
|
|
|
617
740
|
/*
|
|
@@ -24,6 +24,12 @@ export interface MaintainedResourceKeys {
|
|
|
24
24
|
hosts: ResourceKeySet;
|
|
25
25
|
dockerHosts: ResourceKeySet;
|
|
26
26
|
kubernetesClusters: ResourceKeySet;
|
|
27
|
+
/*
|
|
28
|
+
* Proxmox/Ceph clusters have no `oneuptime.*.id` label stamp, so only
|
|
29
|
+
* the name set is ever matched; the id set exists for shape parity.
|
|
30
|
+
*/
|
|
31
|
+
proxmoxClusters: ResourceKeySet;
|
|
32
|
+
cephClusters: ResourceKeySet;
|
|
27
33
|
services: ResourceKeySet;
|
|
28
34
|
}
|
|
29
35
|
|
|
@@ -45,7 +51,8 @@ export interface MaintainedResourceKeys {
|
|
|
45
51
|
* incident/alert creation loops can skip exactly those series while the
|
|
46
52
|
* other 90 hosts keep alerting. It covers every resource type a
|
|
47
53
|
* maintenance event can attach to AND a series can identify: Host,
|
|
48
|
-
* DockerHost, KubernetesCluster, and
|
|
54
|
+
* DockerHost, KubernetesCluster, ProxmoxCluster, CephCluster, and
|
|
55
|
+
* Service.
|
|
49
56
|
*/
|
|
50
57
|
export default class MonitorMaintenanceSuppression {
|
|
51
58
|
/*
|
|
@@ -113,6 +120,14 @@ export default class MonitorMaintenanceSuppression {
|
|
|
113
120
|
refs.kubernetesClusterNames,
|
|
114
121
|
input.maintained.kubernetesClusters.names,
|
|
115
122
|
) ||
|
|
123
|
+
this.intersects(
|
|
124
|
+
refs.proxmoxClusterNames,
|
|
125
|
+
input.maintained.proxmoxClusters.names,
|
|
126
|
+
) ||
|
|
127
|
+
this.intersects(
|
|
128
|
+
refs.cephClusterNames,
|
|
129
|
+
input.maintained.cephClusters.names,
|
|
130
|
+
) ||
|
|
116
131
|
this.intersects(refs.serviceIds, input.maintained.services.ids) ||
|
|
117
132
|
this.intersects(refs.serviceNames, input.maintained.services.names);
|
|
118
133
|
|
|
@@ -143,6 +158,10 @@ export default class MonitorMaintenanceSuppression {
|
|
|
143
158
|
maintained.dockerHosts.names.size > 0 ||
|
|
144
159
|
maintained.kubernetesClusters.ids.size > 0 ||
|
|
145
160
|
maintained.kubernetesClusters.names.size > 0 ||
|
|
161
|
+
maintained.proxmoxClusters.ids.size > 0 ||
|
|
162
|
+
maintained.proxmoxClusters.names.size > 0 ||
|
|
163
|
+
maintained.cephClusters.ids.size > 0 ||
|
|
164
|
+
maintained.cephClusters.names.size > 0 ||
|
|
146
165
|
maintained.services.ids.size > 0 ||
|
|
147
166
|
maintained.services.names.size > 0
|
|
148
167
|
);
|
|
@@ -150,11 +169,11 @@ export default class MonitorMaintenanceSuppression {
|
|
|
150
169
|
|
|
151
170
|
/*
|
|
152
171
|
* Collect the ids + identifiers of every Host / DockerHost /
|
|
153
|
-
* KubernetesCluster /
|
|
154
|
-
* in this project. Monitors attached
|
|
155
|
-
* not collected here — those are
|
|
156
|
-
* whole-monitor disable flag, which
|
|
157
|
-
* we ever reach per-series creation.
|
|
172
|
+
* KubernetesCluster / ProxmoxCluster / CephCluster / Service attached
|
|
173
|
+
* to an ongoing maintenance event in this project. Monitors attached
|
|
174
|
+
* to the event are intentionally not collected here — those are
|
|
175
|
+
* already handled upstream by the whole-monitor disable flag, which
|
|
176
|
+
* short-circuits evaluation before we ever reach per-series creation.
|
|
158
177
|
*/
|
|
159
178
|
private static async getResourcesUnderOngoingMaintenance(
|
|
160
179
|
projectId: ObjectID,
|
|
@@ -163,6 +182,8 @@ export default class MonitorMaintenanceSuppression {
|
|
|
163
182
|
hosts: { ids: new Set<string>(), names: new Set<string>() },
|
|
164
183
|
dockerHosts: { ids: new Set<string>(), names: new Set<string>() },
|
|
165
184
|
kubernetesClusters: { ids: new Set<string>(), names: new Set<string>() },
|
|
185
|
+
proxmoxClusters: { ids: new Set<string>(), names: new Set<string>() },
|
|
186
|
+
cephClusters: { ids: new Set<string>(), names: new Set<string>() },
|
|
166
187
|
services: { ids: new Set<string>(), names: new Set<string>() },
|
|
167
188
|
};
|
|
168
189
|
|
|
@@ -179,6 +200,8 @@ export default class MonitorMaintenanceSuppression {
|
|
|
179
200
|
hosts: { _id: true, hostIdentifier: true },
|
|
180
201
|
dockerHosts: { _id: true, hostIdentifier: true },
|
|
181
202
|
kubernetesClusters: { _id: true, clusterIdentifier: true },
|
|
203
|
+
proxmoxClusters: { _id: true, name: true },
|
|
204
|
+
cephClusters: { _id: true, name: true },
|
|
182
205
|
services: { _id: true, name: true },
|
|
183
206
|
},
|
|
184
207
|
skip: 0,
|
|
@@ -206,6 +229,16 @@ export default class MonitorMaintenanceSuppression {
|
|
|
206
229
|
cluster.clusterIdentifier,
|
|
207
230
|
);
|
|
208
231
|
}
|
|
232
|
+
for (const proxmoxCluster of event.proxmoxClusters || []) {
|
|
233
|
+
this.addKey(
|
|
234
|
+
maintained.proxmoxClusters,
|
|
235
|
+
proxmoxCluster._id,
|
|
236
|
+
proxmoxCluster.name,
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
for (const cephCluster of event.cephClusters || []) {
|
|
240
|
+
this.addKey(maintained.cephClusters, cephCluster._id, cephCluster.name);
|
|
241
|
+
}
|
|
209
242
|
for (const service of event.services || []) {
|
|
210
243
|
this.addKey(maintained.services, service._id, service.name);
|
|
211
244
|
}
|
|
@@ -360,7 +360,9 @@ export default class MonitorTemplateUtil {
|
|
|
360
360
|
if (
|
|
361
361
|
data.monitorType === MonitorType.Metrics ||
|
|
362
362
|
data.monitorType === MonitorType.Kubernetes ||
|
|
363
|
-
data.monitorType === MonitorType.Docker
|
|
363
|
+
data.monitorType === MonitorType.Docker ||
|
|
364
|
+
data.monitorType === MonitorType.Proxmox ||
|
|
365
|
+
data.monitorType === MonitorType.Ceph
|
|
364
366
|
) {
|
|
365
367
|
const metricResponse: MetricMonitorResponse =
|
|
366
368
|
data.dataToProcess as MetricMonitorResponse;
|
|
@@ -60,6 +60,29 @@ export const KubernetesClusterNameLabelKeys: ReadonlyArray<string> = [
|
|
|
60
60
|
"k8s.cluster.name",
|
|
61
61
|
];
|
|
62
62
|
|
|
63
|
+
/*
|
|
64
|
+
* Proxmox/Ceph cluster identity rides the agent-stamped resource
|
|
65
|
+
* attribute (`proxmox.cluster.name` / `ceph.cluster.name`) and its
|
|
66
|
+
* ClickHouse `resource.`-prefixed twin. Ingest keys cluster rows by
|
|
67
|
+
* name only — there is no `oneuptime.*.id` stamp for these clusters —
|
|
68
|
+
* so only name keys exist. The name maps to the cluster model's `name`
|
|
69
|
+
* column. Note the shipped Proxmox/Ceph alert templates group by
|
|
70
|
+
* datapoint labels (`id`, `ceph_daemon`, `pool_id`), so their series
|
|
71
|
+
* labels do NOT carry these keys; the deterministic cluster link for
|
|
72
|
+
* those monitors comes from the monitor step config instead (see
|
|
73
|
+
* MonitorClusterContext). These keys cover user-built monitors that
|
|
74
|
+
* group by the cluster attribute, exactly like the K8s keys above.
|
|
75
|
+
*/
|
|
76
|
+
export const ProxmoxClusterNameLabelKeys: ReadonlyArray<string> = [
|
|
77
|
+
"resource.proxmox.cluster.name",
|
|
78
|
+
"proxmox.cluster.name",
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
export const CephClusterNameLabelKeys: ReadonlyArray<string> = [
|
|
82
|
+
"resource.ceph.cluster.name",
|
|
83
|
+
"ceph.cluster.name",
|
|
84
|
+
];
|
|
85
|
+
|
|
63
86
|
/*
|
|
64
87
|
* Services come from OTel-ingested telemetry. The ingest pipeline
|
|
65
88
|
* auto-creates a Service row keyed by `service.name`, so any series
|
|
@@ -91,6 +114,8 @@ export interface SeriesResourceRefs {
|
|
|
91
114
|
dockerHostNames: Array<string>;
|
|
92
115
|
kubernetesClusterIds: Array<string>;
|
|
93
116
|
kubernetesClusterNames: Array<string>;
|
|
117
|
+
proxmoxClusterNames: Array<string>;
|
|
118
|
+
cephClusterNames: Array<string>;
|
|
94
119
|
serviceIds: Array<string>;
|
|
95
120
|
serviceNames: Array<string>;
|
|
96
121
|
}
|
|
@@ -149,6 +174,14 @@ export default class SeriesResourceLabels {
|
|
|
149
174
|
seriesLabels,
|
|
150
175
|
KubernetesClusterNameLabelKeys,
|
|
151
176
|
),
|
|
177
|
+
proxmoxClusterNames: this.collectLabelValues(
|
|
178
|
+
seriesLabels,
|
|
179
|
+
ProxmoxClusterNameLabelKeys,
|
|
180
|
+
),
|
|
181
|
+
cephClusterNames: this.collectLabelValues(
|
|
182
|
+
seriesLabels,
|
|
183
|
+
CephClusterNameLabelKeys,
|
|
184
|
+
),
|
|
152
185
|
serviceIds: this.collectLabelValues(seriesLabels, ServiceIdLabelKeys),
|
|
153
186
|
serviceNames: this.collectLabelValues(seriesLabels, ServiceNameLabelKeys),
|
|
154
187
|
};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import Pyroscope from "@pyroscope/nodejs";
|
|
2
1
|
import { EnableProfiling } from "../EnvironmentConfig";
|
|
3
2
|
import logger, { LogAttributes } from "./Logger";
|
|
4
3
|
import GracefulShutdown, { ShutdownPriority } from "./GracefulShutdown";
|
|
5
4
|
|
|
5
|
+
/*
|
|
6
|
+
* Type-only import: erased at compile time, so it emits NO runtime require.
|
|
7
|
+
* @pyroscope/nodejs pulls in @datadog/pprof, whose native (node-gyp) binding loads
|
|
8
|
+
* at require() time. When no prebuilt binary exists for the running Node ABI (e.g. a
|
|
9
|
+
* newer Node major than the pprof build ships for), that require throws — so the module
|
|
10
|
+
* must never be imported at the top level, or the throw takes down the whole process
|
|
11
|
+
* before init() is even reached. We load it lazily and defensively inside init() instead.
|
|
12
|
+
*/
|
|
13
|
+
type PyroscopeModule = typeof import("@pyroscope/nodejs");
|
|
14
|
+
|
|
6
15
|
export default class Profiling {
|
|
16
|
+
private static pyroscope: PyroscopeModule | null = null;
|
|
17
|
+
|
|
7
18
|
public static init(data: { serviceName: string }): void {
|
|
8
19
|
if (!EnableProfiling) {
|
|
9
20
|
return;
|
|
@@ -24,6 +35,25 @@ export default class Profiling {
|
|
|
24
35
|
return;
|
|
25
36
|
}
|
|
26
37
|
|
|
38
|
+
let Pyroscope: PyroscopeModule;
|
|
39
|
+
try {
|
|
40
|
+
/*
|
|
41
|
+
* Lazy load so the native pprof binding is only required when profiling is actually
|
|
42
|
+
* enabled, and so a load failure (missing/incompatible prebuilt binary for the running
|
|
43
|
+
* Node ABI) is caught here and degrades to "profiling disabled" instead of crashing
|
|
44
|
+
* the server. Profiling is a best-effort, optional feature.
|
|
45
|
+
*/
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
47
|
+
Pyroscope = require("@pyroscope/nodejs") as PyroscopeModule;
|
|
48
|
+
} catch (err) {
|
|
49
|
+
logger.warn(
|
|
50
|
+
"Profiling enabled but the profiler native module could not be loaded. Continuing without profiling.",
|
|
51
|
+
profilingLogAttributes,
|
|
52
|
+
);
|
|
53
|
+
logger.warn(err, profilingLogAttributes);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
27
57
|
try {
|
|
28
58
|
Pyroscope.init({
|
|
29
59
|
appName: data.serviceName,
|
|
@@ -36,6 +66,8 @@ export default class Profiling {
|
|
|
36
66
|
|
|
37
67
|
Pyroscope.start();
|
|
38
68
|
|
|
69
|
+
this.pyroscope = Pyroscope;
|
|
70
|
+
|
|
39
71
|
logger.info(
|
|
40
72
|
`Profiling initialized for service: ${data.serviceName} -> ${serverAddress}`,
|
|
41
73
|
profilingLogAttributes,
|
|
@@ -43,6 +75,7 @@ export default class Profiling {
|
|
|
43
75
|
} catch (err) {
|
|
44
76
|
logger.error("Failed to initialize profiling:", profilingLogAttributes);
|
|
45
77
|
logger.error(err, profilingLogAttributes);
|
|
78
|
+
return;
|
|
46
79
|
}
|
|
47
80
|
|
|
48
81
|
// Stop the profiler last (Telemetry tier), alongside the OTEL flush.
|
|
@@ -51,7 +84,9 @@ export default class Profiling {
|
|
|
51
84
|
ShutdownPriority.Telemetry,
|
|
52
85
|
async (): Promise<void> => {
|
|
53
86
|
try {
|
|
54
|
-
|
|
87
|
+
if (this.pyroscope) {
|
|
88
|
+
await this.pyroscope.stop();
|
|
89
|
+
}
|
|
55
90
|
} catch (err) {
|
|
56
91
|
logger.error("Error stopping profiler:", profilingLogAttributes);
|
|
57
92
|
logger.error(err, profilingLogAttributes);
|
|
@@ -60,6 +60,10 @@ export const DEFAULT_ENTITY_BUDGET: ReadonlyMap<EntityType, number> = new Map<
|
|
|
60
60
|
[EntityType.KubernetesNamespace, 1000],
|
|
61
61
|
[EntityType.KubernetesPod, 5000],
|
|
62
62
|
[EntityType.KubernetesDeployment, 5000],
|
|
63
|
+
[EntityType.ProxmoxCluster, 10000],
|
|
64
|
+
[EntityType.ProxmoxNode, 1000],
|
|
65
|
+
[EntityType.ProxmoxGuest, 5000],
|
|
66
|
+
[EntityType.CephCluster, 10000],
|
|
63
67
|
]);
|
|
64
68
|
|
|
65
69
|
// For types not in the map (future promotions of high-churn types).
|