@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.
Files changed (341) hide show
  1. package/Models/DatabaseModels/Alert.ts +110 -0
  2. package/Models/DatabaseModels/CephCluster.ts +964 -0
  3. package/Models/DatabaseModels/CephClusterLabelRule.ts +514 -0
  4. package/Models/DatabaseModels/CephClusterOwnerRule.ts +596 -0
  5. package/Models/DatabaseModels/CephClusterOwnerTeam.ts +487 -0
  6. package/Models/DatabaseModels/CephClusterOwnerUser.ts +486 -0
  7. package/Models/DatabaseModels/CephResource.ts +809 -0
  8. package/Models/DatabaseModels/Host.ts +64 -0
  9. package/Models/DatabaseModels/Incident.ts +110 -0
  10. package/Models/DatabaseModels/Index.ts +24 -0
  11. package/Models/DatabaseModels/ProxmoxCluster.ts +943 -0
  12. package/Models/DatabaseModels/ProxmoxClusterLabelRule.ts +514 -0
  13. package/Models/DatabaseModels/ProxmoxClusterOwnerRule.ts +596 -0
  14. package/Models/DatabaseModels/ProxmoxClusterOwnerTeam.ts +487 -0
  15. package/Models/DatabaseModels/ProxmoxClusterOwnerUser.ts +486 -0
  16. package/Models/DatabaseModels/ProxmoxResource.ts +726 -0
  17. package/Models/DatabaseModels/ScheduledMaintenance.ts +110 -0
  18. package/Server/API/BillingInvoiceAPI.ts +47 -7
  19. package/Server/API/CephResourceAPI.ts +134 -0
  20. package/Server/API/DashboardAPI.ts +46 -0
  21. package/Server/API/ProjectAPI.ts +15 -0
  22. package/Server/API/ProxmoxResourceAPI.ts +132 -0
  23. package/Server/API/ResellerPlanAPI.ts +17 -0
  24. package/Server/Infrastructure/GlobalCache.ts +8 -2
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.ts +163 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.ts +211 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.ts +590 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.ts +64 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
  30. package/Server/Infrastructure/Redis.ts +40 -12
  31. package/Server/Services/AnalyticsDatabaseService.ts +1 -1
  32. package/Server/Services/BillingService.ts +109 -21
  33. package/Server/Services/CephClusterLabelRuleEngineService.ts +200 -0
  34. package/Server/Services/CephClusterLabelRuleService.ts +14 -0
  35. package/Server/Services/CephClusterOwnerRuleEngineService.ts +218 -0
  36. package/Server/Services/CephClusterOwnerRuleService.ts +14 -0
  37. package/Server/Services/CephClusterOwnerTeamService.ts +10 -0
  38. package/Server/Services/CephClusterOwnerUserService.ts +10 -0
  39. package/Server/Services/CephClusterService.ts +401 -0
  40. package/Server/Services/CephResourceService.ts +383 -0
  41. package/Server/Services/CloudResourceService.ts +11 -3
  42. package/Server/Services/DockerHostService.ts +11 -3
  43. package/Server/Services/ExceptionAggregationService.ts +2 -0
  44. package/Server/Services/HostService.ts +11 -3
  45. package/Server/Services/Index.ts +24 -0
  46. package/Server/Services/KubernetesClusterService.ts +11 -3
  47. package/Server/Services/LogAggregationService.ts +2 -0
  48. package/Server/Services/MetricAggregationService.ts +2 -0
  49. package/Server/Services/OpenTelemetryIngestService.ts +36 -0
  50. package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +204 -0
  51. package/Server/Services/ProxmoxClusterLabelRuleService.ts +14 -0
  52. package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +222 -0
  53. package/Server/Services/ProxmoxClusterOwnerRuleService.ts +14 -0
  54. package/Server/Services/ProxmoxClusterOwnerTeamService.ts +10 -0
  55. package/Server/Services/ProxmoxClusterOwnerUserService.ts +10 -0
  56. package/Server/Services/ProxmoxClusterService.ts +382 -0
  57. package/Server/Services/ProxmoxResourceService.ts +404 -0
  58. package/Server/Services/RumApplicationService.ts +11 -3
  59. package/Server/Services/ServerlessFunctionService.ts +11 -3
  60. package/Server/Services/TelemetryUsageBillingService.ts +41 -3
  61. package/Server/Services/TraceAggregationService.ts +2 -0
  62. package/Server/Types/AnalyticsDatabase/AggregateBy.ts +8 -23
  63. package/Server/Utils/Monitor/MonitorAlert.ts +45 -0
  64. package/Server/Utils/Monitor/MonitorClusterContext.ts +129 -0
  65. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +344 -4
  66. package/Server/Utils/Monitor/MonitorIncident.ts +130 -7
  67. package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +39 -6
  68. package/Server/Utils/Monitor/MonitorTemplateUtil.ts +3 -1
  69. package/Server/Utils/Monitor/SeriesResourceLabels.ts +33 -0
  70. package/Server/Utils/Profiling.ts +37 -2
  71. package/Server/Utils/Telemetry/EntityRegistry.ts +4 -0
  72. package/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.ts +1096 -0
  73. package/Server/Utils/Telemetry/TelemetryEntity.ts +85 -0
  74. package/Server/Utils/Telemetry.ts +8 -19
  75. package/Tests/Server/API/BillingInvoiceAPI.test.ts +194 -0
  76. package/Tests/Server/API/ProjectAPI.test.ts +91 -0
  77. package/Tests/Server/API/ResellerPlanAPI.test.ts +207 -0
  78. package/Tests/Server/Infrastructure/GlobalCache.test.ts +100 -0
  79. package/Tests/Server/Services/BillingService.test.ts +323 -0
  80. package/Tests/Server/Services/CephResourceService.test.ts +264 -0
  81. package/Tests/Server/Services/ProxmoxResourceService.test.ts +326 -0
  82. package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluator.test.ts +322 -0
  83. package/Tests/Server/Utils/Monitor/MonitorMaintenanceSuppression.test.ts +13 -0
  84. package/Tests/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.test.ts +879 -0
  85. package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +196 -0
  86. package/Tests/Types/Monitor/CephAlertTemplates.test.ts +1231 -0
  87. package/Tests/Types/Monitor/ProxmoxAlertTemplates.test.ts +732 -0
  88. package/Tests/Utils/Telemetry/EntityRelationship.test.ts +49 -0
  89. package/Tests/Utils/Telemetry/HeartbeatAvailability.test.ts +423 -0
  90. package/Types/BaseDatabase/AggregationIntervalUtil.ts +74 -0
  91. package/Types/Dashboard/DashboardComponentType.ts +4 -0
  92. package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +2 -0
  93. package/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.ts +15 -0
  94. package/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.ts +14 -0
  95. package/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.ts +17 -0
  96. package/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.ts +16 -0
  97. package/Types/Dashboard/DashboardTemplates.ts +446 -0
  98. package/Types/Icon/IconProp.ts +2 -0
  99. package/Types/Monitor/CephAlertTemplates.ts +1647 -0
  100. package/Types/Monitor/CephMetricCatalog.ts +409 -0
  101. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +44 -0
  102. package/Types/Monitor/MonitorStep.ts +64 -0
  103. package/Types/Monitor/MonitorStepCephMonitor.ts +57 -0
  104. package/Types/Monitor/MonitorStepProxmoxMonitor.ts +81 -0
  105. package/Types/Monitor/MonitorType.ts +29 -1
  106. package/Types/Monitor/ProxmoxAlertTemplates.ts +899 -0
  107. package/Types/Monitor/ProxmoxMetricCatalog.ts +382 -0
  108. package/Types/Permission.ts +464 -0
  109. package/Types/Telemetry/EntityType.ts +11 -0
  110. package/Types/Telemetry/ServiceType.ts +2 -0
  111. package/UI/Components/Icon/Icon.tsx +84 -0
  112. package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +9 -5
  113. package/UI/Utils/Telemetry/Telemetry.ts +16 -21
  114. package/UI/Utils/TelemetryService.ts +7 -3
  115. package/Utils/Dashboard/Components/DashboardCephOsdListComponent.ts +63 -0
  116. package/Utils/Dashboard/Components/DashboardCephPoolListComponent.ts +32 -0
  117. package/Utils/Dashboard/Components/DashboardCephResourceListShared.ts +61 -0
  118. package/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.ts +69 -0
  119. package/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.ts +55 -0
  120. package/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.ts +61 -0
  121. package/Utils/Dashboard/Components/Index.ts +28 -0
  122. package/Utils/Telemetry/EntityKey.ts +35 -0
  123. package/Utils/Telemetry/EntityRelationship.ts +6 -0
  124. package/Utils/Telemetry/HeartbeatAvailability.ts +262 -0
  125. package/build/dist/Models/DatabaseModels/Alert.js +108 -0
  126. package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
  127. package/build/dist/Models/DatabaseModels/CephCluster.js +992 -0
  128. package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -0
  129. package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js +522 -0
  130. package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js.map +1 -0
  131. package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js +603 -0
  132. package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js.map +1 -0
  133. package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js +503 -0
  134. package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js.map +1 -0
  135. package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js +502 -0
  136. package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js.map +1 -0
  137. package/build/dist/Models/DatabaseModels/CephResource.js +846 -0
  138. package/build/dist/Models/DatabaseModels/CephResource.js.map +1 -0
  139. package/build/dist/Models/DatabaseModels/Host.js +63 -0
  140. package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
  141. package/build/dist/Models/DatabaseModels/Incident.js +108 -0
  142. package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
  143. package/build/dist/Models/DatabaseModels/Index.js +24 -0
  144. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  145. package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +967 -0
  146. package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -0
  147. package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js +522 -0
  148. package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js.map +1 -0
  149. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js +603 -0
  150. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js.map +1 -0
  151. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js +503 -0
  152. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js.map +1 -0
  153. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js +502 -0
  154. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js.map +1 -0
  155. package/build/dist/Models/DatabaseModels/ProxmoxResource.js +761 -0
  156. package/build/dist/Models/DatabaseModels/ProxmoxResource.js.map +1 -0
  157. package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +108 -0
  158. package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
  159. package/build/dist/Server/API/BillingInvoiceAPI.js +35 -5
  160. package/build/dist/Server/API/BillingInvoiceAPI.js.map +1 -1
  161. package/build/dist/Server/API/CephResourceAPI.js +98 -0
  162. package/build/dist/Server/API/CephResourceAPI.js.map +1 -0
  163. package/build/dist/Server/API/DashboardAPI.js +46 -0
  164. package/build/dist/Server/API/DashboardAPI.js.map +1 -1
  165. package/build/dist/Server/API/ProjectAPI.js +11 -0
  166. package/build/dist/Server/API/ProjectAPI.js.map +1 -1
  167. package/build/dist/Server/API/ProxmoxResourceAPI.js +95 -0
  168. package/build/dist/Server/API/ProxmoxResourceAPI.js.map +1 -0
  169. package/build/dist/Server/API/ResellerPlanAPI.js +17 -3
  170. package/build/dist/Server/API/ResellerPlanAPI.js.map +1 -1
  171. package/build/dist/Server/Infrastructure/GlobalCache.js +7 -2
  172. package/build/dist/Server/Infrastructure/GlobalCache.js.map +1 -1
  173. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js +76 -0
  174. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js.map +1 -0
  175. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js +108 -0
  176. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js.map +1 -0
  177. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js +253 -0
  178. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js.map +1 -0
  179. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js +43 -0
  180. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js.map +1 -0
  181. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
  182. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  183. package/build/dist/Server/Infrastructure/Redis.js +31 -8
  184. package/build/dist/Server/Infrastructure/Redis.js.map +1 -1
  185. package/build/dist/Server/Services/AnalyticsDatabaseService.js +1 -1
  186. package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
  187. package/build/dist/Server/Services/BillingService.js +85 -23
  188. package/build/dist/Server/Services/BillingService.js.map +1 -1
  189. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +166 -0
  190. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -0
  191. package/build/dist/Server/Services/CephClusterLabelRuleService.js +13 -0
  192. package/build/dist/Server/Services/CephClusterLabelRuleService.js.map +1 -0
  193. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +186 -0
  194. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -0
  195. package/build/dist/Server/Services/CephClusterOwnerRuleService.js +13 -0
  196. package/build/dist/Server/Services/CephClusterOwnerRuleService.js.map +1 -0
  197. package/build/dist/Server/Services/CephClusterOwnerTeamService.js +9 -0
  198. package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -0
  199. package/build/dist/Server/Services/CephClusterOwnerUserService.js +9 -0
  200. package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -0
  201. package/build/dist/Server/Services/CephClusterService.js +353 -0
  202. package/build/dist/Server/Services/CephClusterService.js.map +1 -0
  203. package/build/dist/Server/Services/CephResourceService.js +257 -0
  204. package/build/dist/Server/Services/CephResourceService.js.map +1 -0
  205. package/build/dist/Server/Services/CloudResourceService.js +10 -2
  206. package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
  207. package/build/dist/Server/Services/DockerHostService.js +10 -2
  208. package/build/dist/Server/Services/DockerHostService.js.map +1 -1
  209. package/build/dist/Server/Services/ExceptionAggregationService.js +2 -0
  210. package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
  211. package/build/dist/Server/Services/HostService.js +10 -2
  212. package/build/dist/Server/Services/HostService.js.map +1 -1
  213. package/build/dist/Server/Services/Index.js +24 -0
  214. package/build/dist/Server/Services/Index.js.map +1 -1
  215. package/build/dist/Server/Services/KubernetesClusterService.js +10 -2
  216. package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
  217. package/build/dist/Server/Services/LogAggregationService.js +2 -0
  218. package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
  219. package/build/dist/Server/Services/MetricAggregationService.js +2 -0
  220. package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
  221. package/build/dist/Server/Services/OpenTelemetryIngestService.js +37 -7
  222. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  223. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +166 -0
  224. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -0
  225. package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js +13 -0
  226. package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js.map +1 -0
  227. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +186 -0
  228. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -0
  229. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js +13 -0
  230. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js.map +1 -0
  231. package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +9 -0
  232. package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -0
  233. package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +9 -0
  234. package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -0
  235. package/build/dist/Server/Services/ProxmoxClusterService.js +337 -0
  236. package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -0
  237. package/build/dist/Server/Services/ProxmoxResourceService.js +285 -0
  238. package/build/dist/Server/Services/ProxmoxResourceService.js.map +1 -0
  239. package/build/dist/Server/Services/RumApplicationService.js +10 -2
  240. package/build/dist/Server/Services/RumApplicationService.js.map +1 -1
  241. package/build/dist/Server/Services/ServerlessFunctionService.js +10 -2
  242. package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -1
  243. package/build/dist/Server/Services/TelemetryUsageBillingService.js +30 -3
  244. package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
  245. package/build/dist/Server/Services/TraceAggregationService.js +2 -0
  246. package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
  247. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +8 -25
  248. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
  249. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +36 -0
  250. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  251. package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js +90 -0
  252. package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js.map +1 -0
  253. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +228 -4
  254. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  255. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +103 -8
  256. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  257. package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +23 -6
  258. package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
  259. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +3 -1
  260. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
  261. package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +23 -0
  262. package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
  263. package/build/dist/Server/Utils/Profiling.js +24 -3
  264. package/build/dist/Server/Utils/Profiling.js.map +1 -1
  265. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +4 -0
  266. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
  267. package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js +854 -0
  268. package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js.map +1 -0
  269. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +62 -0
  270. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
  271. package/build/dist/Server/Utils/Telemetry.js +8 -10
  272. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  273. package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +69 -0
  274. package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -0
  275. package/build/dist/Types/Dashboard/DashboardComponentType.js +4 -0
  276. package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
  277. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +2 -0
  278. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
  279. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js +2 -0
  280. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js.map +1 -0
  281. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js +2 -0
  282. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js.map +1 -0
  283. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js +2 -0
  284. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js.map +1 -0
  285. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js +2 -0
  286. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js.map +1 -0
  287. package/build/dist/Types/Dashboard/DashboardTemplates.js +394 -0
  288. package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
  289. package/build/dist/Types/Icon/IconProp.js +2 -0
  290. package/build/dist/Types/Icon/IconProp.js.map +1 -1
  291. package/build/dist/Types/Monitor/CephAlertTemplates.js +1379 -0
  292. package/build/dist/Types/Monitor/CephAlertTemplates.js.map +1 -0
  293. package/build/dist/Types/Monitor/CephMetricCatalog.js +353 -0
  294. package/build/dist/Types/Monitor/CephMetricCatalog.js.map +1 -0
  295. package/build/dist/Types/Monitor/MonitorStep.js +46 -0
  296. package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
  297. package/build/dist/Types/Monitor/MonitorStepCephMonitor.js +34 -0
  298. package/build/dist/Types/Monitor/MonitorStepCephMonitor.js.map +1 -0
  299. package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js +36 -0
  300. package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js.map +1 -0
  301. package/build/dist/Types/Monitor/MonitorType.js +27 -1
  302. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  303. package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js +743 -0
  304. package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js.map +1 -0
  305. package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js +320 -0
  306. package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js.map +1 -0
  307. package/build/dist/Types/Permission.js +408 -0
  308. package/build/dist/Types/Permission.js.map +1 -1
  309. package/build/dist/Types/Telemetry/EntityType.js +11 -0
  310. package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
  311. package/build/dist/Types/Telemetry/ServiceType.js +2 -0
  312. package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
  313. package/build/dist/UI/Components/Icon/Icon.js +33 -0
  314. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  315. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +5 -1
  316. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
  317. package/build/dist/UI/Utils/Telemetry/Telemetry.js +11 -10
  318. package/build/dist/UI/Utils/Telemetry/Telemetry.js.map +1 -1
  319. package/build/dist/UI/Utils/TelemetryService.js +5 -2
  320. package/build/dist/UI/Utils/TelemetryService.js.map +1 -1
  321. package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js +50 -0
  322. package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js.map +1 -0
  323. package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js +27 -0
  324. package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js.map +1 -0
  325. package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js +46 -0
  326. package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js.map +1 -0
  327. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js +55 -0
  328. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js.map +1 -0
  329. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js +42 -0
  330. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js.map +1 -0
  331. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js +46 -0
  332. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js.map +1 -0
  333. package/build/dist/Utils/Dashboard/Components/Index.js +16 -0
  334. package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
  335. package/build/dist/Utils/Telemetry/EntityKey.js +27 -0
  336. package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
  337. package/build/dist/Utils/Telemetry/EntityRelationship.js +3 -0
  338. package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
  339. package/build/dist/Utils/Telemetry/HeartbeatAvailability.js +174 -0
  340. package/build/dist/Utils/Telemetry/HeartbeatAvailability.js.map +1 -0
  341. package/package.json +29 -21
@@ -0,0 +1,409 @@
1
+ import { CephResourceScope } from "./MonitorStepCephMonitor";
2
+ import MetricsAggregationType from "../Metrics/MetricsAggregationType";
3
+
4
+ export type CephMetricCategory = "Cluster Health" | "OSD" | "Pool" | "PG";
5
+
6
+ export interface CephMetricDefinition {
7
+ id: string;
8
+ friendlyName: string;
9
+ description: string;
10
+ metricName: string;
11
+ category: CephMetricCategory;
12
+ defaultAggregation: MetricsAggregationType;
13
+ defaultResourceScope: CephResourceScope;
14
+ unit?: string;
15
+ }
16
+
17
+ /*
18
+ * Metric names follow the ceph-mgr Prometheus module naming scheme.
19
+ * Per-daemon series carry a `ceph_daemon` datapoint label (e.g. "osd.3",
20
+ * "mon.a"); per-pool series carry a `pool_id` label only — the pool name
21
+ * exists solely on `ceph_pool_metadata`, so filter/group pool data series
22
+ * by `pool_id` and join the metadata series when a display name is needed.
23
+ */
24
+ const cephMetricCatalog: Array<CephMetricDefinition> = [
25
+ // Cluster Health Metrics
26
+ {
27
+ id: "ceph-health-status",
28
+ friendlyName: "Cluster Health Status",
29
+ description:
30
+ "Overall Ceph cluster health: 0 = HEALTH_OK, 1 = HEALTH_WARN, 2 = HEALTH_ERR. The single most important Ceph metric to alert on.",
31
+ metricName: "ceph_health_status",
32
+ category: "Cluster Health",
33
+ defaultAggregation: MetricsAggregationType.Max,
34
+ defaultResourceScope: CephResourceScope.Cluster,
35
+ },
36
+ {
37
+ id: "ceph-health-detail",
38
+ friendlyName: "Health Check Detail",
39
+ description:
40
+ "One series per active health check (e.g. OSD_DOWN, PG_DEGRADED) with name and severity labels. Exposed by the mgr prometheus module on Quincy and later — absent on older releases.",
41
+ metricName: "ceph_health_detail",
42
+ category: "Cluster Health",
43
+ defaultAggregation: MetricsAggregationType.Max,
44
+ defaultResourceScope: CephResourceScope.Cluster,
45
+ unit: "count",
46
+ },
47
+ {
48
+ id: "ceph-healthcheck-slow-ops",
49
+ friendlyName: "Slow Operations",
50
+ description:
51
+ "Number of slow OSD/monitor operations reported by the SLOW_OPS health check. Non-zero values surface as client I/O latency or hangs.",
52
+ metricName: "ceph_healthcheck_slow_ops",
53
+ category: "Cluster Health",
54
+ defaultAggregation: MetricsAggregationType.Max,
55
+ defaultResourceScope: CephResourceScope.Cluster,
56
+ unit: "count",
57
+ },
58
+ {
59
+ id: "ceph-daemon-health-metrics",
60
+ friendlyName: "Daemon Health Metrics",
61
+ description:
62
+ "Per-daemon health metrics from the mgr, keyed by a type label (e.g. SLOW_OPS, PENDING_CREATING_PGS) and a ceph_daemon label. Filter type = SLOW_OPS and group by ceph_daemon to pinpoint the exact OSD or monitor reporting slow operations.",
63
+ metricName: "ceph_daemon_health_metrics",
64
+ category: "Cluster Health",
65
+ defaultAggregation: MetricsAggregationType.Max,
66
+ defaultResourceScope: CephResourceScope.Osd,
67
+ unit: "count",
68
+ },
69
+ {
70
+ id: "ceph-mon-quorum-status",
71
+ friendlyName: "Monitor Quorum Status",
72
+ description:
73
+ "Whether each Ceph monitor daemon is in quorum (1) or not (0). One series per monitor — sum to count members in quorum, or take the minimum to detect any monitor out of quorum.",
74
+ metricName: "ceph_mon_quorum_status",
75
+ category: "Cluster Health",
76
+ defaultAggregation: MetricsAggregationType.Sum,
77
+ defaultResourceScope: CephResourceScope.Mon,
78
+ unit: "count",
79
+ },
80
+ {
81
+ id: "ceph-mon-metadata",
82
+ friendlyName: "Monitor Metadata",
83
+ description:
84
+ "Metadata series for each monitor daemon (value is always 1) carrying hostname and ceph_version labels. Sum it to count monitors in the cluster.",
85
+ metricName: "ceph_mon_metadata",
86
+ category: "Cluster Health",
87
+ defaultAggregation: MetricsAggregationType.Sum,
88
+ defaultResourceScope: CephResourceScope.Mon,
89
+ unit: "count",
90
+ },
91
+ {
92
+ id: "ceph-cluster-total-bytes",
93
+ friendlyName: "Cluster Total Capacity",
94
+ description:
95
+ "Total raw storage capacity of the cluster across all OSDs, before replication or erasure-coding overhead.",
96
+ metricName: "ceph_cluster_total_bytes",
97
+ category: "Cluster Health",
98
+ defaultAggregation: MetricsAggregationType.Max,
99
+ defaultResourceScope: CephResourceScope.Cluster,
100
+ unit: "bytes",
101
+ },
102
+ {
103
+ id: "ceph-cluster-total-used-bytes",
104
+ friendlyName: "Cluster Used Capacity",
105
+ description:
106
+ "Raw storage currently used across all OSDs. Compare against Cluster Total Capacity to track how full the cluster is.",
107
+ metricName: "ceph_cluster_total_used_bytes",
108
+ category: "Cluster Health",
109
+ defaultAggregation: MetricsAggregationType.Max,
110
+ defaultResourceScope: CephResourceScope.Cluster,
111
+ unit: "bytes",
112
+ },
113
+
114
+ // OSD Metrics
115
+ {
116
+ id: "ceph-osd-up",
117
+ friendlyName: "OSD Up",
118
+ description:
119
+ "Whether each OSD daemon is up (1) or down (0). One series per OSD — take the minimum to detect any OSD down, or sum to count OSDs that are up.",
120
+ metricName: "ceph_osd_up",
121
+ category: "OSD",
122
+ defaultAggregation: MetricsAggregationType.Sum,
123
+ defaultResourceScope: CephResourceScope.Osd,
124
+ unit: "count",
125
+ },
126
+ {
127
+ id: "ceph-osd-in",
128
+ friendlyName: "OSD In",
129
+ description:
130
+ "Whether each OSD is in the cluster (1) or marked out (0). An OSD that is up but out no longer stores data and triggers rebalancing.",
131
+ metricName: "ceph_osd_in",
132
+ category: "OSD",
133
+ defaultAggregation: MetricsAggregationType.Sum,
134
+ defaultResourceScope: CephResourceScope.Osd,
135
+ unit: "count",
136
+ },
137
+ {
138
+ id: "ceph-osd-apply-latency",
139
+ friendlyName: "OSD Apply Latency",
140
+ description:
141
+ "Time for each OSD to apply an operation to its backing store, in milliseconds. Sustained high values point to a failing or saturated disk.",
142
+ metricName: "ceph_osd_apply_latency_ms",
143
+ category: "OSD",
144
+ defaultAggregation: MetricsAggregationType.Avg,
145
+ defaultResourceScope: CephResourceScope.Osd,
146
+ unit: "ms",
147
+ },
148
+ {
149
+ id: "ceph-osd-commit-latency",
150
+ friendlyName: "OSD Commit Latency",
151
+ description:
152
+ "Time for each OSD to commit an operation to its journal/WAL, in milliseconds. Compare against apply latency to distinguish journal from backing-store slowness.",
153
+ metricName: "ceph_osd_commit_latency_ms",
154
+ category: "OSD",
155
+ defaultAggregation: MetricsAggregationType.Avg,
156
+ defaultResourceScope: CephResourceScope.Osd,
157
+ unit: "ms",
158
+ },
159
+ {
160
+ id: "ceph-osd-stat-bytes",
161
+ friendlyName: "OSD Total Capacity",
162
+ description: "Total raw capacity of each OSD's backing device.",
163
+ metricName: "ceph_osd_stat_bytes",
164
+ category: "OSD",
165
+ defaultAggregation: MetricsAggregationType.Max,
166
+ defaultResourceScope: CephResourceScope.Osd,
167
+ unit: "bytes",
168
+ },
169
+ {
170
+ id: "ceph-osd-stat-bytes-used",
171
+ friendlyName: "OSD Used Capacity",
172
+ description:
173
+ "Raw bytes used on each OSD. Compare against OSD Total Capacity to spot imbalanced or nearfull OSDs before they block writes.",
174
+ metricName: "ceph_osd_stat_bytes_used",
175
+ category: "OSD",
176
+ defaultAggregation: MetricsAggregationType.Max,
177
+ defaultResourceScope: CephResourceScope.Osd,
178
+ unit: "bytes",
179
+ },
180
+ {
181
+ id: "ceph-osd-numpg",
182
+ friendlyName: "OSD Placement Groups",
183
+ description:
184
+ "Number of placement groups hosted by each OSD. Outliers indicate CRUSH imbalance — overloaded OSDs become latency hotspots.",
185
+ metricName: "ceph_osd_numpg",
186
+ category: "OSD",
187
+ defaultAggregation: MetricsAggregationType.Max,
188
+ defaultResourceScope: CephResourceScope.Osd,
189
+ unit: "count",
190
+ },
191
+ {
192
+ id: "ceph-osd-metadata",
193
+ friendlyName: "OSD Metadata",
194
+ description:
195
+ "Metadata series for each OSD daemon (value is always 1) carrying hostname, device_class, and ceph_version labels. Sum it to count OSDs in the cluster.",
196
+ metricName: "ceph_osd_metadata",
197
+ category: "OSD",
198
+ defaultAggregation: MetricsAggregationType.Sum,
199
+ defaultResourceScope: CephResourceScope.Osd,
200
+ unit: "count",
201
+ },
202
+
203
+ // Pool Metrics
204
+ {
205
+ id: "ceph-pool-stored",
206
+ friendlyName: "Pool Stored Data",
207
+ description:
208
+ "Logical data stored in each pool, before replication or erasure-coding overhead.",
209
+ metricName: "ceph_pool_stored",
210
+ category: "Pool",
211
+ defaultAggregation: MetricsAggregationType.Max,
212
+ defaultResourceScope: CephResourceScope.Pool,
213
+ unit: "bytes",
214
+ },
215
+ {
216
+ id: "ceph-pool-max-avail",
217
+ friendlyName: "Pool Max Available",
218
+ description:
219
+ "Estimated space still writable to each pool given current cluster capacity and the pool's replication factor. Alert when this gets low to avoid a full pool.",
220
+ metricName: "ceph_pool_max_avail",
221
+ category: "Pool",
222
+ defaultAggregation: MetricsAggregationType.Min,
223
+ defaultResourceScope: CephResourceScope.Pool,
224
+ unit: "bytes",
225
+ },
226
+ {
227
+ id: "ceph-pool-objects",
228
+ friendlyName: "Pool Object Count",
229
+ description: "Number of objects stored in each pool.",
230
+ metricName: "ceph_pool_objects",
231
+ category: "Pool",
232
+ defaultAggregation: MetricsAggregationType.Max,
233
+ defaultResourceScope: CephResourceScope.Pool,
234
+ unit: "count",
235
+ },
236
+ {
237
+ id: "ceph-pool-rd",
238
+ friendlyName: "Pool Read Operations",
239
+ description:
240
+ "Cumulative read operations served by each pool. Chart as a rate to see read IOPS.",
241
+ metricName: "ceph_pool_rd",
242
+ category: "Pool",
243
+ defaultAggregation: MetricsAggregationType.Sum,
244
+ defaultResourceScope: CephResourceScope.Pool,
245
+ unit: "ops",
246
+ },
247
+ {
248
+ id: "ceph-pool-wr",
249
+ friendlyName: "Pool Write Operations",
250
+ description:
251
+ "Cumulative write operations served by each pool. Chart as a rate to see write IOPS.",
252
+ metricName: "ceph_pool_wr",
253
+ category: "Pool",
254
+ defaultAggregation: MetricsAggregationType.Sum,
255
+ defaultResourceScope: CephResourceScope.Pool,
256
+ unit: "ops",
257
+ },
258
+ {
259
+ id: "ceph-pool-rd-bytes",
260
+ friendlyName: "Pool Read Throughput",
261
+ description:
262
+ "Cumulative bytes read from each pool. Chart as a rate to see read throughput.",
263
+ metricName: "ceph_pool_rd_bytes",
264
+ category: "Pool",
265
+ defaultAggregation: MetricsAggregationType.Sum,
266
+ defaultResourceScope: CephResourceScope.Pool,
267
+ unit: "bytes",
268
+ },
269
+ {
270
+ id: "ceph-pool-wr-bytes",
271
+ friendlyName: "Pool Write Throughput",
272
+ description:
273
+ "Cumulative bytes written to each pool. Chart as a rate to see write throughput.",
274
+ metricName: "ceph_pool_wr_bytes",
275
+ category: "Pool",
276
+ defaultAggregation: MetricsAggregationType.Sum,
277
+ defaultResourceScope: CephResourceScope.Pool,
278
+ unit: "bytes",
279
+ },
280
+ {
281
+ id: "ceph-pool-metadata",
282
+ friendlyName: "Pool Metadata",
283
+ description:
284
+ "Metadata series for each pool (value is always 1) carrying the pool's name label — the ONLY series that maps pool_id to a name. Sum it to count pools in the cluster.",
285
+ metricName: "ceph_pool_metadata",
286
+ category: "Pool",
287
+ defaultAggregation: MetricsAggregationType.Sum,
288
+ defaultResourceScope: CephResourceScope.Pool,
289
+ unit: "count",
290
+ },
291
+
292
+ /*
293
+ * PG (Placement Group) Metrics
294
+ *
295
+ * All ceph_pg_* state metrics are exported PER POOL with a `pool_id`
296
+ * datapoint label on every supported release (Nautilus and later) —
297
+ * they are NOT single cluster-wide gauges. Sum across pools for a
298
+ * cluster-wide count; Max yields only the largest pool's value.
299
+ */
300
+ {
301
+ id: "ceph-pg-total",
302
+ friendlyName: "Total PGs",
303
+ description:
304
+ "Number of placement groups per pool (pool_id label). Sum across pools for the cluster-wide total; subtract Active PGs (also summed) to count PGs unable to serve I/O.",
305
+ metricName: "ceph_pg_total",
306
+ category: "PG",
307
+ defaultAggregation: MetricsAggregationType.Sum,
308
+ defaultResourceScope: CephResourceScope.Pool,
309
+ unit: "count",
310
+ },
311
+ {
312
+ id: "ceph-pg-active",
313
+ friendlyName: "Active PGs",
314
+ description:
315
+ "Number of placement groups in the active state (able to serve I/O) per pool (pool_id label). In a healthy cluster the sum across pools equals the summed total PG count.",
316
+ metricName: "ceph_pg_active",
317
+ category: "PG",
318
+ defaultAggregation: MetricsAggregationType.Sum,
319
+ defaultResourceScope: CephResourceScope.Pool,
320
+ unit: "count",
321
+ },
322
+ {
323
+ id: "ceph-pg-clean",
324
+ friendlyName: "Clean PGs",
325
+ description:
326
+ "Number of placement groups in the clean state (fully replicated, no recovery pending) per pool (pool_id label). In a healthy cluster the sum across pools equals the summed total PG count.",
327
+ metricName: "ceph_pg_clean",
328
+ category: "PG",
329
+ defaultAggregation: MetricsAggregationType.Sum,
330
+ defaultResourceScope: CephResourceScope.Pool,
331
+ unit: "count",
332
+ },
333
+ {
334
+ id: "ceph-pg-degraded",
335
+ friendlyName: "Degraded PGs",
336
+ description:
337
+ "Number of placement groups with fewer data replicas than configured, per pool (pool_id label). Non-zero values mean redundancy is reduced — typically after an OSD failure.",
338
+ metricName: "ceph_pg_degraded",
339
+ category: "PG",
340
+ defaultAggregation: MetricsAggregationType.Max,
341
+ defaultResourceScope: CephResourceScope.Pool,
342
+ unit: "count",
343
+ },
344
+ {
345
+ id: "ceph-pg-undersized",
346
+ friendlyName: "Undersized PGs",
347
+ description:
348
+ "Number of placement groups mapped to fewer OSDs than their configured replica count, per pool (pool_id label). Sustained non-zero values mean the cluster cannot restore full redundancy.",
349
+ metricName: "ceph_pg_undersized",
350
+ category: "PG",
351
+ defaultAggregation: MetricsAggregationType.Max,
352
+ defaultResourceScope: CephResourceScope.Pool,
353
+ unit: "count",
354
+ },
355
+ {
356
+ id: "ceph-num-objects-degraded",
357
+ friendlyName: "Degraded Objects",
358
+ description:
359
+ "Number of objects with fewer replicas than configured. Should trend to zero as recovery completes after an OSD failure.",
360
+ metricName: "ceph_num_objects_degraded",
361
+ category: "PG",
362
+ defaultAggregation: MetricsAggregationType.Max,
363
+ defaultResourceScope: CephResourceScope.Cluster,
364
+ unit: "count",
365
+ },
366
+ {
367
+ id: "ceph-num-objects-misplaced",
368
+ friendlyName: "Misplaced Objects",
369
+ description:
370
+ "Number of objects not stored on their CRUSH-intended OSDs (data is safe, placement is wrong). Non-zero during rebalancing — should trend to zero.",
371
+ metricName: "ceph_num_objects_misplaced",
372
+ category: "PG",
373
+ defaultAggregation: MetricsAggregationType.Max,
374
+ defaultResourceScope: CephResourceScope.Cluster,
375
+ unit: "count",
376
+ },
377
+ ];
378
+
379
+ export function getAllCephMetrics(): Array<CephMetricDefinition> {
380
+ return cephMetricCatalog;
381
+ }
382
+
383
+ export function getCephMetricsByCategory(
384
+ category: CephMetricCategory,
385
+ ): Array<CephMetricDefinition> {
386
+ return cephMetricCatalog.filter((m: CephMetricDefinition) => {
387
+ return m.category === category;
388
+ });
389
+ }
390
+
391
+ export function getCephMetricById(
392
+ id: string,
393
+ ): CephMetricDefinition | undefined {
394
+ return cephMetricCatalog.find((m: CephMetricDefinition) => {
395
+ return m.id === id;
396
+ });
397
+ }
398
+
399
+ export function getCephMetricByMetricName(
400
+ metricName: string,
401
+ ): CephMetricDefinition | undefined {
402
+ return cephMetricCatalog.find((m: CephMetricDefinition) => {
403
+ return m.metricName === metricName;
404
+ });
405
+ }
406
+
407
+ export function getAllCephMetricCategories(): Array<CephMetricCategory> {
408
+ return ["Cluster Health", "OSD", "Pool", "PG"];
409
+ }
@@ -24,6 +24,48 @@ export interface KubernetesResourceBreakdown {
24
24
  attributes: Dictionary<string>;
25
25
  }
26
26
 
27
+ export interface ProxmoxAffectedResource {
28
+ /** Raw pve-exporter `id` datapoint label, e.g. "node/pve1", "qemu/100". */
29
+ resourceId?: string | undefined;
30
+ /** `name` label — present only on the pve_*_info metadata series. */
31
+ resourceName?: string | undefined;
32
+ /** Agent-stamped `pve.type` attribute (node | qemu | lxc | storage). */
33
+ resourceType?: string | undefined;
34
+ /** Agent-stamped `pve.scope` attribute (cluster | node | guest | storage). */
35
+ scope?: string | undefined;
36
+ /** `node` label — present only on the pve_*_info metadata series. */
37
+ nodeName?: string | undefined;
38
+ metricValue: number;
39
+ }
40
+
41
+ export interface ProxmoxResourceBreakdown {
42
+ clusterName: string;
43
+ metricName: string;
44
+ metricFriendlyName: string;
45
+ affectedResources: Array<ProxmoxAffectedResource>;
46
+ attributes: Dictionary<string>;
47
+ }
48
+
49
+ export interface CephAffectedResource {
50
+ /** `ceph_daemon` datapoint label, e.g. "osd.3", "mon.a". */
51
+ daemon?: string | undefined;
52
+ /** `pool_id` label — the only pool identity on pool data series. */
53
+ poolId?: string | undefined;
54
+ /** Pool `name` label — present only on ceph_pool_metadata. */
55
+ poolName?: string | undefined;
56
+ /** `hostname` label — present only on the *_metadata series. */
57
+ hostname?: string | undefined;
58
+ metricValue: number;
59
+ }
60
+
61
+ export interface CephResourceBreakdown {
62
+ clusterName: string;
63
+ metricName: string;
64
+ metricFriendlyName: string;
65
+ affectedResources: Array<CephAffectedResource>;
66
+ attributes: Dictionary<string>;
67
+ }
68
+
27
69
  export default interface MetricMonitorResponse {
28
70
  projectId: ObjectID;
29
71
  startAndEndDate?: InBetween<Date>;
@@ -32,6 +74,8 @@ export default interface MetricMonitorResponse {
32
74
  monitorId: ObjectID;
33
75
  evaluationSummary?: MonitorEvaluationSummary | undefined;
34
76
  kubernetesResourceBreakdown?: KubernetesResourceBreakdown | undefined;
77
+ proxmoxResourceBreakdown?: ProxmoxResourceBreakdown | undefined;
78
+ cephResourceBreakdown?: CephResourceBreakdown | undefined;
35
79
  /**
36
80
  * Per-series breakdown when any queryConfig sets groupByAttributeKeys.
37
81
  * Each entry carries a fingerprint, the label values identifying that
@@ -50,6 +50,12 @@ import MonitorStepKubernetesMonitor, {
50
50
  import MonitorStepDockerMonitor, {
51
51
  MonitorStepDockerMonitorUtil,
52
52
  } from "./MonitorStepDockerMonitor";
53
+ import MonitorStepProxmoxMonitor, {
54
+ MonitorStepProxmoxMonitorUtil,
55
+ } from "./MonitorStepProxmoxMonitor";
56
+ import MonitorStepCephMonitor, {
57
+ MonitorStepCephMonitorUtil,
58
+ } from "./MonitorStepCephMonitor";
53
59
  import Zod, { ZodSchema } from "../../Utils/Schema/Zod";
54
60
 
55
61
  /*
@@ -169,6 +175,12 @@ export interface MonitorStepType {
169
175
 
170
176
  // Docker monitor
171
177
  dockerMonitor?: MonitorStepDockerMonitor | undefined;
178
+
179
+ // Proxmox monitor
180
+ proxmoxMonitor?: MonitorStepProxmoxMonitor | undefined;
181
+
182
+ // Ceph monitor
183
+ cephMonitor?: MonitorStepCephMonitor | undefined;
172
184
  }
173
185
 
174
186
  export default class MonitorStep extends DatabaseProperty {
@@ -208,6 +220,8 @@ export default class MonitorStep extends DatabaseProperty {
208
220
  externalStatusPageMonitor: undefined,
209
221
  kubernetesMonitor: undefined,
210
222
  dockerMonitor: undefined,
223
+ proxmoxMonitor: undefined,
224
+ cephMonitor: undefined,
211
225
  };
212
226
  }
213
227
 
@@ -252,6 +266,8 @@ export default class MonitorStep extends DatabaseProperty {
252
266
  externalStatusPageMonitor: undefined,
253
267
  kubernetesMonitor: undefined,
254
268
  dockerMonitor: undefined,
269
+ proxmoxMonitor: undefined,
270
+ cephMonitor: undefined,
255
271
  };
256
272
 
257
273
  return monitorStep;
@@ -441,6 +457,18 @@ export default class MonitorStep extends DatabaseProperty {
441
457
  return this;
442
458
  }
443
459
 
460
+ public setProxmoxMonitor(
461
+ proxmoxMonitor: MonitorStepProxmoxMonitor,
462
+ ): MonitorStep {
463
+ this.data!.proxmoxMonitor = proxmoxMonitor;
464
+ return this;
465
+ }
466
+
467
+ public setCephMonitor(cephMonitor: MonitorStepCephMonitor): MonitorStep {
468
+ this.data!.cephMonitor = cephMonitor;
469
+ return this;
470
+ }
471
+
444
472
  public setCustomCode(customCode: string): MonitorStep {
445
473
  this.data!.customCode = customCode;
446
474
  return this;
@@ -477,6 +505,8 @@ export default class MonitorStep extends DatabaseProperty {
477
505
  exceptionMonitor: undefined,
478
506
  kubernetesMonitor: undefined,
479
507
  dockerMonitor: undefined,
508
+ proxmoxMonitor: undefined,
509
+ cephMonitor: undefined,
480
510
  },
481
511
  };
482
512
  }
@@ -643,6 +673,26 @@ export default class MonitorStep extends DatabaseProperty {
643
673
  }
644
674
  }
645
675
 
676
+ if (monitorType === MonitorType.Proxmox) {
677
+ if (!value.data.proxmoxMonitor) {
678
+ return "Proxmox monitor configuration is required";
679
+ }
680
+
681
+ if (!value.data.proxmoxMonitor.clusterIdentifier) {
682
+ return "Proxmox cluster is required";
683
+ }
684
+ }
685
+
686
+ if (monitorType === MonitorType.Ceph) {
687
+ if (!value.data.cephMonitor) {
688
+ return "Ceph monitor configuration is required";
689
+ }
690
+
691
+ if (!value.data.cephMonitor.clusterIdentifier) {
692
+ return "Ceph cluster is required";
693
+ }
694
+ }
695
+
646
696
  return null;
647
697
  }
648
698
 
@@ -726,6 +776,12 @@ export default class MonitorStep extends DatabaseProperty {
726
776
  dockerMonitor: this.data.dockerMonitor
727
777
  ? MonitorStepDockerMonitorUtil.toJSON(this.data.dockerMonitor)
728
778
  : undefined,
779
+ proxmoxMonitor: this.data.proxmoxMonitor
780
+ ? MonitorStepProxmoxMonitorUtil.toJSON(this.data.proxmoxMonitor)
781
+ : undefined,
782
+ cephMonitor: this.data.cephMonitor
783
+ ? MonitorStepCephMonitorUtil.toJSON(this.data.cephMonitor)
784
+ : undefined,
729
785
  },
730
786
  });
731
787
  }
@@ -864,6 +920,12 @@ export default class MonitorStep extends DatabaseProperty {
864
920
  dockerMonitor: json["dockerMonitor"]
865
921
  ? (json["dockerMonitor"] as JSONObject)
866
922
  : undefined,
923
+ proxmoxMonitor: json["proxmoxMonitor"]
924
+ ? (json["proxmoxMonitor"] as JSONObject)
925
+ : undefined,
926
+ cephMonitor: json["cephMonitor"]
927
+ ? (json["cephMonitor"] as JSONObject)
928
+ : undefined,
867
929
  }) as any;
868
930
 
869
931
  return monitorStep;
@@ -902,6 +964,8 @@ export default class MonitorStep extends DatabaseProperty {
902
964
  externalStatusPageMonitor: Zod.any().optional(),
903
965
  kubernetesMonitor: Zod.any().optional(),
904
966
  dockerMonitor: Zod.any().optional(),
967
+ proxmoxMonitor: Zod.any().optional(),
968
+ cephMonitor: Zod.any().optional(),
905
969
  }).openapi({
906
970
  type: "object",
907
971
  example: {
@@ -0,0 +1,57 @@
1
+ import { JSONObject } from "../JSON";
2
+ import MetricsViewConfig from "../Metrics/MetricsViewConfig";
3
+ import RollingTime from "../RollingTime/RollingTime";
4
+
5
+ /**
6
+ * The kind of Ceph resource a metric series belongs to. Unlike Proxmox
7
+ * there is no agent-stamped scope attribute — ceph-mgr series are already
8
+ * equality-filterable by `ceph_daemon` / `pool_id` — so this enum is a
9
+ * catalog/UI hint only, never a query filter.
10
+ */
11
+ export enum CephResourceScope {
12
+ Cluster = "Cluster",
13
+ Mon = "Mon",
14
+ Osd = "OSD",
15
+ Pool = "Pool",
16
+ }
17
+
18
+ export interface CephResourceFilters {
19
+ osdId?: string | undefined; // datapoint label `ceph_daemon` (e.g. "osd.3")
20
+ /**
21
+ * → equality on the `pool_id` datapoint label (e.g. "2"). Pool data
22
+ * series (ceph_pool_stored, ceph_pool_max_avail, ceph_pool_rd/wr…)
23
+ * carry ONLY `pool_id` — there is no pool-name label on data series;
24
+ * the name exists solely on ceph_pool_metadata. Filter by id and join
25
+ * ceph_pool_metadata when a display name is needed.
26
+ */
27
+ poolId?: string | undefined;
28
+ }
29
+
30
+ export default interface MonitorStepCephMonitor {
31
+ clusterIdentifier: string;
32
+ resourceFilters: CephResourceFilters;
33
+ metricViewConfig: MetricsViewConfig;
34
+ rollingTime: RollingTime;
35
+ }
36
+
37
+ export class MonitorStepCephMonitorUtil {
38
+ public static getDefault(): MonitorStepCephMonitor {
39
+ return {
40
+ clusterIdentifier: "",
41
+ resourceFilters: {},
42
+ metricViewConfig: {
43
+ queryConfigs: [],
44
+ formulaConfigs: [],
45
+ },
46
+ rollingTime: RollingTime.Past1Minute,
47
+ };
48
+ }
49
+
50
+ public static fromJSON(json: JSONObject): MonitorStepCephMonitor {
51
+ return json as any as MonitorStepCephMonitor;
52
+ }
53
+
54
+ public static toJSON(monitor: MonitorStepCephMonitor): JSONObject {
55
+ return monitor as any as JSONObject;
56
+ }
57
+ }