@oneuptime/common 14.0.103 → 14.0.104

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 (1167) hide show
  1. package/Models/AnalyticsModels/CloudCost.d.mts +29 -0
  2. package/Models/AnalyticsModels/CloudCost.d.ts +29 -0
  3. package/Models/AnalyticsModels/CloudCost.js +298 -0
  4. package/Models/AnalyticsModels/CloudCost.mjs +2 -0
  5. package/Models/AnalyticsModels/Index.js +2 -0
  6. package/Models/DatabaseModels/AIAgent.js +3 -3
  7. package/Models/DatabaseModels/Alert.d.mts +3 -0
  8. package/Models/DatabaseModels/Alert.d.ts +3 -0
  9. package/Models/DatabaseModels/Alert.js +92 -0
  10. package/Models/DatabaseModels/AlertFeed.d.mts +1 -0
  11. package/Models/DatabaseModels/AlertFeed.d.ts +1 -0
  12. package/Models/DatabaseModels/AlertFeed.js +2 -0
  13. package/Models/DatabaseModels/AlertIncidentRule.d.mts +32 -0
  14. package/Models/DatabaseModels/AlertIncidentRule.d.ts +32 -0
  15. package/Models/DatabaseModels/AlertIncidentRule.js +953 -0
  16. package/Models/DatabaseModels/AlertIncidentRule.mjs +2 -0
  17. package/Models/DatabaseModels/AuditLogExport.js +3 -3
  18. package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +3 -0
  19. package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +3 -0
  20. package/Models/DatabaseModels/AutoRemediationSuggestion.js +61 -0
  21. package/Models/DatabaseModels/CloudAccount.d.mts +2 -0
  22. package/Models/DatabaseModels/CloudAccount.d.ts +2 -0
  23. package/Models/DatabaseModels/CloudAccount.js +50 -0
  24. package/Models/DatabaseModels/CloudBudget.d.mts +32 -0
  25. package/Models/DatabaseModels/CloudBudget.d.ts +32 -0
  26. package/Models/DatabaseModels/CloudBudget.js +635 -0
  27. package/Models/DatabaseModels/CloudBudget.mjs +2 -0
  28. package/Models/DatabaseModels/CloudConnection.d.mts +3 -0
  29. package/Models/DatabaseModels/CloudConnection.d.ts +3 -0
  30. package/Models/DatabaseModels/CloudConnection.js +47 -3
  31. package/Models/DatabaseModels/CloudCostRecommendation.d.mts +35 -0
  32. package/Models/DatabaseModels/CloudCostRecommendation.d.ts +35 -0
  33. package/Models/DatabaseModels/CloudCostRecommendation.js +551 -0
  34. package/Models/DatabaseModels/CloudCostRecommendation.mjs +2 -0
  35. package/Models/DatabaseModels/CloudResource.d.mts +3 -0
  36. package/Models/DatabaseModels/CloudResource.d.ts +3 -0
  37. package/Models/DatabaseModels/CloudResource.js +106 -1
  38. package/Models/DatabaseModels/DataAlert.d.mts +31 -0
  39. package/Models/DatabaseModels/DataAlert.d.ts +31 -0
  40. package/Models/DatabaseModels/DataAlert.js +497 -0
  41. package/Models/DatabaseModels/DataAlert.mjs +2 -0
  42. package/Models/DatabaseModels/DataAsset.d.mts +46 -0
  43. package/Models/DatabaseModels/DataAsset.d.ts +46 -0
  44. package/Models/DatabaseModels/DataAsset.js +793 -0
  45. package/Models/DatabaseModels/DataAsset.mjs +2 -0
  46. package/Models/DatabaseModels/DataAssetFeed.d.mts +40 -0
  47. package/Models/DatabaseModels/DataAssetFeed.d.ts +40 -0
  48. package/Models/DatabaseModels/DataAssetFeed.js +405 -0
  49. package/Models/DatabaseModels/DataAssetFeed.mjs +3 -0
  50. package/Models/DatabaseModels/DataAssetLabelRule.d.mts +21 -0
  51. package/Models/DatabaseModels/DataAssetLabelRule.d.ts +21 -0
  52. package/Models/DatabaseModels/DataAssetLabelRule.js +623 -0
  53. package/Models/DatabaseModels/DataAssetLabelRule.mjs +2 -0
  54. package/Models/DatabaseModels/DataAssetLineage.d.mts +28 -0
  55. package/Models/DatabaseModels/DataAssetLineage.d.ts +28 -0
  56. package/Models/DatabaseModels/DataAssetLineage.js +427 -0
  57. package/Models/DatabaseModels/DataAssetLineage.mjs +2 -0
  58. package/Models/DatabaseModels/DataAssetOwnerRule.d.mts +24 -0
  59. package/Models/DatabaseModels/DataAssetOwnerRule.d.ts +24 -0
  60. package/Models/DatabaseModels/DataAssetOwnerRule.js +714 -0
  61. package/Models/DatabaseModels/DataAssetOwnerRule.mjs +2 -0
  62. package/Models/DatabaseModels/DataAssetOwnerTeam.d.mts +19 -0
  63. package/Models/DatabaseModels/DataAssetOwnerTeam.d.ts +19 -0
  64. package/Models/DatabaseModels/DataAssetOwnerTeam.js +477 -0
  65. package/Models/DatabaseModels/DataAssetOwnerTeam.mjs +2 -0
  66. package/Models/DatabaseModels/DataAssetOwnerUser.d.mts +18 -0
  67. package/Models/DatabaseModels/DataAssetOwnerUser.d.ts +18 -0
  68. package/Models/DatabaseModels/DataAssetOwnerUser.js +476 -0
  69. package/Models/DatabaseModels/DataAssetOwnerUser.mjs +2 -0
  70. package/Models/DatabaseModels/DataAssetUsage.d.mts +30 -0
  71. package/Models/DatabaseModels/DataAssetUsage.d.ts +30 -0
  72. package/Models/DatabaseModels/DataAssetUsage.js +482 -0
  73. package/Models/DatabaseModels/DataAssetUsage.mjs +2 -0
  74. package/Models/DatabaseModels/DataBiConnection.d.mts +22 -0
  75. package/Models/DatabaseModels/DataBiConnection.d.ts +22 -0
  76. package/Models/DatabaseModels/DataBiConnection.js +410 -0
  77. package/Models/DatabaseModels/DataBiConnection.mjs +2 -0
  78. package/Models/DatabaseModels/DataCheck.d.mts +47 -0
  79. package/Models/DatabaseModels/DataCheck.d.ts +47 -0
  80. package/Models/DatabaseModels/DataCheck.js +801 -0
  81. package/Models/DatabaseModels/DataCheck.mjs +2 -0
  82. package/Models/DatabaseModels/DataDashboard.d.mts +26 -0
  83. package/Models/DatabaseModels/DataDashboard.d.ts +26 -0
  84. package/Models/DatabaseModels/DataDashboard.js +428 -0
  85. package/Models/DatabaseModels/DataDashboard.mjs +2 -0
  86. package/Models/DatabaseModels/DataIssueReport.d.mts +15 -0
  87. package/Models/DatabaseModels/DataIssueReport.d.ts +15 -0
  88. package/Models/DatabaseModels/DataIssueReport.js +253 -0
  89. package/Models/DatabaseModels/DataIssueReport.mjs +2 -0
  90. package/Models/DatabaseModels/DataObservabilitySetting.d.mts +10 -0
  91. package/Models/DatabaseModels/DataObservabilitySetting.d.ts +10 -0
  92. package/Models/DatabaseModels/DataObservabilitySetting.js +200 -0
  93. package/Models/DatabaseModels/DataObservabilitySetting.mjs +2 -0
  94. package/Models/DatabaseModels/DataPipeline.d.mts +30 -0
  95. package/Models/DatabaseModels/DataPipeline.d.ts +30 -0
  96. package/Models/DatabaseModels/DataPipeline.js +533 -0
  97. package/Models/DatabaseModels/DataPipeline.mjs +2 -0
  98. package/Models/DatabaseModels/DataPipelineRun.d.mts +27 -0
  99. package/Models/DatabaseModels/DataPipelineRun.d.ts +27 -0
  100. package/Models/DatabaseModels/DataPipelineRun.js +440 -0
  101. package/Models/DatabaseModels/DataPipelineRun.mjs +2 -0
  102. package/Models/DatabaseModels/DataProduct.d.mts +39 -0
  103. package/Models/DatabaseModels/DataProduct.d.ts +39 -0
  104. package/Models/DatabaseModels/DataProduct.js +659 -0
  105. package/Models/DatabaseModels/DataProduct.mjs +2 -0
  106. package/Models/DatabaseModels/DataReconciliation.d.mts +45 -0
  107. package/Models/DatabaseModels/DataReconciliation.d.ts +45 -0
  108. package/Models/DatabaseModels/DataReconciliation.js +759 -0
  109. package/Models/DatabaseModels/DataReconciliation.mjs +2 -0
  110. package/Models/DatabaseModels/DataStore.d.mts +10 -1
  111. package/Models/DatabaseModels/DataStore.d.ts +10 -1
  112. package/Models/DatabaseModels/DataStore.js +158 -0
  113. package/Models/DatabaseModels/DataWarehouseJob.d.mts +28 -0
  114. package/Models/DatabaseModels/DataWarehouseJob.d.ts +28 -0
  115. package/Models/DatabaseModels/DataWarehouseJob.js +479 -0
  116. package/Models/DatabaseModels/DataWarehouseJob.mjs +2 -0
  117. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +10 -0
  118. package/Models/DatabaseModels/DatabaseServer.d.mts +3 -0
  119. package/Models/DatabaseModels/DatabaseServer.d.ts +3 -0
  120. package/Models/DatabaseModels/DatabaseServer.js +100 -0
  121. package/Models/DatabaseModels/ExceptionSavedView.js +3 -3
  122. package/Models/DatabaseModels/ExternalMcpServer.js +3 -3
  123. package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
  124. package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
  125. package/Models/DatabaseModels/GlobalConfig.js +26 -0
  126. package/Models/DatabaseModels/Host.d.mts +3 -0
  127. package/Models/DatabaseModels/Host.d.ts +3 -0
  128. package/Models/DatabaseModels/Host.js +80 -0
  129. package/Models/DatabaseModels/Incident.d.mts +2 -0
  130. package/Models/DatabaseModels/Incident.d.ts +2 -0
  131. package/Models/DatabaseModels/Incident.js +54 -0
  132. package/Models/DatabaseModels/Index.js +74 -0
  133. package/Models/DatabaseModels/LlmCostBudget.js +3 -3
  134. package/Models/DatabaseModels/LlmObservabilityConnection.js +3 -3
  135. package/Models/DatabaseModels/LlmProvider.js +3 -3
  136. package/Models/DatabaseModels/LogDropFilter.js +3 -3
  137. package/Models/DatabaseModels/LogPipeline.js +3 -3
  138. package/Models/DatabaseModels/LogPipelineProcessor.js +3 -3
  139. package/Models/DatabaseModels/LogRecordingRule.js +3 -3
  140. package/Models/DatabaseModels/LogSavedView.js +3 -3
  141. package/Models/DatabaseModels/LogScrubRule.js +3 -3
  142. package/Models/DatabaseModels/MetricPipelineRule.js +3 -3
  143. package/Models/DatabaseModels/MetricRecordingRule.js +3 -3
  144. package/Models/DatabaseModels/MetricSavedView.js +3 -3
  145. package/Models/DatabaseModels/Monitor.d.mts +2 -0
  146. package/Models/DatabaseModels/Monitor.d.ts +2 -0
  147. package/Models/DatabaseModels/Monitor.js +54 -0
  148. package/Models/DatabaseModels/NetworkControllerConnection.js +3 -3
  149. package/Models/DatabaseModels/OpenStackBudget.d.mts +31 -0
  150. package/Models/DatabaseModels/OpenStackBudget.d.ts +31 -0
  151. package/Models/DatabaseModels/OpenStackBudget.js +601 -0
  152. package/Models/DatabaseModels/OpenStackBudget.mjs +2 -0
  153. package/Models/DatabaseModels/OpenStackCloud.d.mts +91 -0
  154. package/Models/DatabaseModels/OpenStackCloud.d.ts +91 -0
  155. package/Models/DatabaseModels/OpenStackCloud.js +2413 -0
  156. package/Models/DatabaseModels/OpenStackCloud.mjs +3 -0
  157. package/Models/DatabaseModels/OpenStackCloudCheck.d.mts +55 -0
  158. package/Models/DatabaseModels/OpenStackCloudCheck.d.ts +55 -0
  159. package/Models/DatabaseModels/OpenStackCloudCheck.js +1024 -0
  160. package/Models/DatabaseModels/OpenStackCloudCheck.mjs +3 -0
  161. package/Models/DatabaseModels/OpenStackCloudConnectionTest.d.mts +39 -0
  162. package/Models/DatabaseModels/OpenStackCloudConnectionTest.d.ts +39 -0
  163. package/Models/DatabaseModels/OpenStackCloudConnectionTest.js +683 -0
  164. package/Models/DatabaseModels/OpenStackCloudConnectionTest.mjs +2 -0
  165. package/Models/DatabaseModels/OpenStackCloudFeed.d.mts +37 -0
  166. package/Models/DatabaseModels/OpenStackCloudFeed.d.ts +37 -0
  167. package/Models/DatabaseModels/OpenStackCloudFeed.js +658 -0
  168. package/Models/DatabaseModels/OpenStackCloudFeed.mjs +3 -0
  169. package/Models/DatabaseModels/OpenStackCloudLabelRule.d.mts +22 -0
  170. package/Models/DatabaseModels/OpenStackCloudLabelRule.d.ts +22 -0
  171. package/Models/DatabaseModels/OpenStackCloudLabelRule.js +600 -0
  172. package/Models/DatabaseModels/OpenStackCloudLabelRule.mjs +2 -0
  173. package/Models/DatabaseModels/OpenStackCloudOwnerRule.d.mts +25 -0
  174. package/Models/DatabaseModels/OpenStackCloudOwnerRule.d.ts +25 -0
  175. package/Models/DatabaseModels/OpenStackCloudOwnerRule.js +681 -0
  176. package/Models/DatabaseModels/OpenStackCloudOwnerRule.mjs +2 -0
  177. package/Models/DatabaseModels/OpenStackCloudOwnerTeam.d.mts +19 -0
  178. package/Models/DatabaseModels/OpenStackCloudOwnerTeam.d.ts +19 -0
  179. package/Models/DatabaseModels/OpenStackCloudOwnerTeam.js +512 -0
  180. package/Models/DatabaseModels/OpenStackCloudOwnerTeam.mjs +2 -0
  181. package/Models/DatabaseModels/OpenStackCloudOwnerUser.d.mts +18 -0
  182. package/Models/DatabaseModels/OpenStackCloudOwnerUser.d.ts +18 -0
  183. package/Models/DatabaseModels/OpenStackCloudOwnerUser.js +511 -0
  184. package/Models/DatabaseModels/OpenStackCloudOwnerUser.mjs +2 -0
  185. package/Models/DatabaseModels/OpenStackProjectNotice.d.mts +30 -0
  186. package/Models/DatabaseModels/OpenStackProjectNotice.d.ts +30 -0
  187. package/Models/DatabaseModels/OpenStackProjectNotice.js +523 -0
  188. package/Models/DatabaseModels/OpenStackProjectNotice.mjs +2 -0
  189. package/Models/DatabaseModels/OpenStackProjectNoticeDelivery.d.mts +34 -0
  190. package/Models/DatabaseModels/OpenStackProjectNoticeDelivery.d.ts +34 -0
  191. package/Models/DatabaseModels/OpenStackProjectNoticeDelivery.js +605 -0
  192. package/Models/DatabaseModels/OpenStackProjectNoticeDelivery.mjs +2 -0
  193. package/Models/DatabaseModels/OpenStackProjectUsage.d.mts +33 -0
  194. package/Models/DatabaseModels/OpenStackProjectUsage.d.ts +33 -0
  195. package/Models/DatabaseModels/OpenStackProjectUsage.js +635 -0
  196. package/Models/DatabaseModels/OpenStackProjectUsage.mjs +2 -0
  197. package/Models/DatabaseModels/OpenStackResource.d.mts +37 -0
  198. package/Models/DatabaseModels/OpenStackResource.d.ts +37 -0
  199. package/Models/DatabaseModels/OpenStackResource.js +784 -0
  200. package/Models/DatabaseModels/OpenStackResource.mjs +2 -0
  201. package/Models/DatabaseModels/Probe.js +6 -6
  202. package/Models/DatabaseModels/Project.d.mts +1 -0
  203. package/Models/DatabaseModels/Project.d.ts +1 -0
  204. package/Models/DatabaseModels/Project.js +19 -0
  205. package/Models/DatabaseModels/ResourceAiAgent.js +1 -0
  206. package/Models/DatabaseModels/ScheduledMaintenance.d.mts +5 -0
  207. package/Models/DatabaseModels/ScheduledMaintenance.d.ts +5 -0
  208. package/Models/DatabaseModels/ScheduledMaintenance.js +138 -0
  209. package/Models/DatabaseModels/SecurityEventConnection.js +3 -3
  210. package/Models/DatabaseModels/SecurityEventDestination.js +3 -3
  211. package/Models/DatabaseModels/SecurityHunt.d.mts +1 -0
  212. package/Models/DatabaseModels/SecurityHunt.d.ts +1 -0
  213. package/Models/DatabaseModels/SecurityHunt.js +27 -0
  214. package/Models/DatabaseModels/SecurityHuntRun.d.mts +14 -0
  215. package/Models/DatabaseModels/SecurityHuntRun.d.ts +14 -0
  216. package/Models/DatabaseModels/SecurityHuntRun.js +239 -0
  217. package/Models/DatabaseModels/SecurityHuntRun.mjs +2 -0
  218. package/Models/DatabaseModels/SecurityLogSource.d.mts +1 -0
  219. package/Models/DatabaseModels/SecurityLogSource.d.ts +1 -0
  220. package/Models/DatabaseModels/SecurityLogSource.js +33 -1
  221. package/Models/DatabaseModels/SecurityPlaybook.js +3 -3
  222. package/Models/DatabaseModels/SecurityPlaybookRun.js +3 -3
  223. package/Models/DatabaseModels/SecurityTelemetrySource.js +8 -6
  224. package/Models/DatabaseModels/SecurityWatchlist.d.mts +9 -1
  225. package/Models/DatabaseModels/SecurityWatchlist.d.ts +9 -1
  226. package/Models/DatabaseModels/SecurityWatchlist.js +145 -3
  227. package/Models/DatabaseModels/SecurityWatchlistItem.d.mts +1 -0
  228. package/Models/DatabaseModels/SecurityWatchlistItem.d.ts +1 -0
  229. package/Models/DatabaseModels/SecurityWatchlistItem.js +22 -0
  230. package/Models/DatabaseModels/StatusPage.d.mts +1 -0
  231. package/Models/DatabaseModels/StatusPage.d.ts +1 -0
  232. package/Models/DatabaseModels/StatusPage.js +53 -0
  233. package/Models/DatabaseModels/StatusPagePrivateUser.d.mts +2 -0
  234. package/Models/DatabaseModels/StatusPagePrivateUser.d.ts +2 -0
  235. package/Models/DatabaseModels/StatusPagePrivateUser.js +70 -1
  236. package/Models/DatabaseModels/TeamComplianceSetting.js +2 -2
  237. package/Models/DatabaseModels/ThreatIntelFeed.js +3 -3
  238. package/Models/DatabaseModels/TraceDropFilter.js +3 -3
  239. package/Models/DatabaseModels/TracePipeline.js +3 -3
  240. package/Models/DatabaseModels/TracePipelineProcessor.js +3 -3
  241. package/Models/DatabaseModels/TraceRecordingRule.js +3 -3
  242. package/Models/DatabaseModels/TraceSavedView.js +3 -3
  243. package/Models/DatabaseModels/TraceScrubRule.js +3 -3
  244. package/Models/DatabaseModels/User.d.mts +2 -0
  245. package/Models/DatabaseModels/User.d.ts +2 -0
  246. package/Models/DatabaseModels/User.js +49 -0
  247. package/Models/DatabaseModels/UserMattermost.d.mts +18 -0
  248. package/Models/DatabaseModels/UserMattermost.d.ts +18 -0
  249. package/Models/DatabaseModels/UserMattermost.js +367 -0
  250. package/Models/DatabaseModels/UserMattermost.mjs +2 -0
  251. package/Models/DatabaseModels/UserNotificationRule.d.mts +3 -0
  252. package/Models/DatabaseModels/UserNotificationRule.d.ts +3 -0
  253. package/Models/DatabaseModels/UserNotificationRule.js +76 -7
  254. package/Models/DatabaseModels/UserNotificationSetting.d.mts +1 -0
  255. package/Models/DatabaseModels/UserNotificationSetting.d.ts +1 -0
  256. package/Models/DatabaseModels/UserNotificationSetting.js +19 -0
  257. package/Models/DatabaseModels/UserOnCallLogTimeline.d.mts +3 -0
  258. package/Models/DatabaseModels/UserOnCallLogTimeline.d.ts +3 -0
  259. package/Models/DatabaseModels/UserOnCallLogTimeline.js +49 -0
  260. package/Models/DatabaseModels/VideoCallConnection.js +3 -3
  261. package/Models/DatabaseModels/WorkflowLog.d.mts +2 -0
  262. package/Models/DatabaseModels/WorkflowLog.d.ts +2 -0
  263. package/Models/DatabaseModels/WorkflowLog.js +63 -0
  264. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +9 -1
  265. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +9 -1
  266. package/Server/Services/DatabaseService.d.mts +1 -0
  267. package/Server/Services/DatabaseService.d.ts +1 -0
  268. package/Types/AI/AIActionWords.d.mts +173 -0
  269. package/Types/AI/AIActionWords.d.ts +173 -0
  270. package/Types/AI/AIActionWords.js +558 -0
  271. package/Types/AI/AIActionWords.mjs +35 -0
  272. package/Types/AI/AIChatPageContext.d.mts +4 -1
  273. package/Types/AI/AIChatPageContext.d.ts +4 -1
  274. package/Types/AI/AIChatPageContext.js +11 -0
  275. package/Types/AI/AIChatTypes.d.mts +17 -1
  276. package/Types/AI/AIChatTypes.d.ts +17 -1
  277. package/Types/AI/AIChatTypes.js +30 -1
  278. package/Types/AI/AIChatTypes.mjs +3 -0
  279. package/Types/AI/AIInsightEvidence.d.mts +11 -0
  280. package/Types/AI/AIInsightEvidence.d.ts +11 -0
  281. package/Types/AI/AIInsightType.d.mts +3 -1
  282. package/Types/AI/AIInsightType.d.ts +3 -1
  283. package/Types/AI/AIInsightType.js +14 -0
  284. package/Types/AI/AIResourceContext.d.mts +1 -0
  285. package/Types/AI/AIResourceContext.d.ts +1 -0
  286. package/Types/AI/AIResourceContext.js +4 -0
  287. package/Types/AI/AiActivityInsights.d.mts +6 -0
  288. package/Types/AI/AiActivityInsights.d.ts +6 -0
  289. package/Types/AI/AiAffectedResources.d.mts +2 -1
  290. package/Types/AI/AiAffectedResources.d.ts +2 -1
  291. package/Types/AI/AiAffectedResources.js +22 -14
  292. package/Types/AI/CodeTask.d.mts +9 -0
  293. package/Types/AI/CodeTask.d.ts +9 -0
  294. package/Types/AI/ResourceAiAccessPermissions.js +2 -0
  295. package/Types/AI/TelemetryAi.js +9 -5
  296. package/Types/Accounts/MagicLink.d.mts +9 -0
  297. package/Types/Accounts/MagicLink.d.ts +9 -0
  298. package/Types/Accounts/MagicLink.js +114 -0
  299. package/Types/Accounts/MagicLink.mjs +8 -0
  300. package/Types/AffectedResources/AffectedResourceSearch.d.mts +1 -0
  301. package/Types/AffectedResources/AffectedResourceSearch.d.ts +1 -0
  302. package/Types/AffectedResources/AffectedResourceSearch.js +1 -0
  303. package/Types/Alert/AlertIncidentRuleWait.d.mts +11 -0
  304. package/Types/Alert/AlertIncidentRuleWait.d.ts +11 -0
  305. package/Types/Alert/AlertIncidentRuleWait.js +134 -0
  306. package/Types/Alert/AlertIncidentRuleWait.mjs +9 -0
  307. package/Types/AnalyticsDatabase/AnalyticsTableName.d.mts +1 -0
  308. package/Types/AnalyticsDatabase/AnalyticsTableName.d.ts +1 -0
  309. package/Types/AnalyticsDatabase/AnalyticsTableName.js +9 -0
  310. package/Types/AutoRemediation/AiRemediationCommandPlan.d.mts +3 -0
  311. package/Types/AutoRemediation/AiRemediationCommandPlan.d.ts +3 -0
  312. package/Types/AutoRemediation/AiRemediationCommandPlan.js +8 -2
  313. package/Types/AutoRemediation/AutoRemediationApprovalSource.d.mts +10 -0
  314. package/Types/AutoRemediation/AutoRemediationApprovalSource.d.ts +10 -0
  315. package/Types/AutoRemediation/AutoRemediationApprovalSource.js +49 -0
  316. package/Types/AutoRemediation/AutoRemediationApprovalSource.mjs +5 -0
  317. package/Types/AutoRemediation/AutoRemediationDecision.d.mts +1 -0
  318. package/Types/AutoRemediation/AutoRemediationDecision.d.ts +1 -0
  319. package/Types/AutoRemediation/AutoRemediationDecision.js +16 -1
  320. package/Types/AutoRemediation/AutoRemediationDecision.mjs +1 -0
  321. package/Types/AutoRemediation/RemediationRoundName.d.mts +27 -0
  322. package/Types/AutoRemediation/RemediationRoundName.d.ts +27 -0
  323. package/Types/AutoRemediation/RemediationRoundName.js +188 -0
  324. package/Types/AutoRemediation/RemediationRoundName.mjs +11 -0
  325. package/Types/AutoRemediation/RemediationTrackRecord.d.mts +2 -0
  326. package/Types/AutoRemediation/RemediationTrackRecord.d.ts +2 -0
  327. package/Types/AutoRemediation/RemediationTrackRecord.js +18 -4
  328. package/Types/AutoRemediation/RemediationTrackRecord.mjs +1 -0
  329. package/Types/BaseDatabase/DatabaseCommonInteractionProps.d.mts +2 -0
  330. package/Types/BaseDatabase/DatabaseCommonInteractionProps.d.ts +2 -0
  331. package/Types/BaseDatabase/NotOnWatchlist.d.mts +21 -0
  332. package/Types/BaseDatabase/NotOnWatchlist.d.ts +21 -0
  333. package/Types/BaseDatabase/NotOnWatchlist.js +48 -0
  334. package/Types/BaseDatabase/NotOnWatchlist.mjs +2 -0
  335. package/Types/BaseDatabase/OnWatchlist.d.mts +28 -0
  336. package/Types/BaseDatabase/OnWatchlist.d.ts +28 -0
  337. package/Types/BaseDatabase/OnWatchlist.js +55 -0
  338. package/Types/BaseDatabase/OnWatchlist.mjs +2 -0
  339. package/Types/Billing/PayAsYouGoPricing.d.mts +10 -0
  340. package/Types/Billing/PayAsYouGoPricing.d.ts +10 -0
  341. package/Types/Billing/PayAsYouGoPricing.js +36 -1
  342. package/Types/Billing/PayAsYouGoPricing.mjs +4 -0
  343. package/Types/Cloud/AwsRegionCode.d.mts +1 -0
  344. package/Types/Cloud/AwsRegionCode.d.ts +1 -0
  345. package/Types/Cloud/AwsRegionCode.js +35 -0
  346. package/Types/Cloud/AwsRegionCode.mjs +2 -0
  347. package/Types/Cloud/CloudCost.d.mts +147 -0
  348. package/Types/Cloud/CloudCost.d.ts +147 -0
  349. package/Types/Cloud/CloudCost.js +736 -0
  350. package/Types/Cloud/CloudCost.mjs +43 -0
  351. package/Types/Cloud/CloudLogGroups.d.mts +30 -0
  352. package/Types/Cloud/CloudLogGroups.d.ts +30 -0
  353. package/Types/Cloud/CloudLogGroups.js +212 -0
  354. package/Types/Cloud/CloudLogGroups.mjs +8 -0
  355. package/Types/Cloud/CloudResourceCatalog.d.mts +9 -0
  356. package/Types/Cloud/CloudResourceCatalog.d.ts +9 -0
  357. package/Types/Cloud/CloudResourceCatalog.js +236 -1
  358. package/Types/Cloud/CloudResourceCatalog.mjs +4 -0
  359. package/Types/Cloud/CloudResourceHealth.d.mts +208 -0
  360. package/Types/Cloud/CloudResourceHealth.d.ts +208 -0
  361. package/Types/Cloud/CloudResourceHealth.js +1432 -0
  362. package/Types/Cloud/CloudResourceHealth.mjs +87 -0
  363. package/Types/CloudConnection/CloudAiAgentCost.d.mts +5 -1
  364. package/Types/CloudConnection/CloudAiAgentCost.d.ts +5 -1
  365. package/Types/CloudConnection/CloudAiAgentCost.js +29 -8
  366. package/Types/CloudConnection/CloudAiAgentCost.mjs +3 -0
  367. package/Types/CloudConnection/CloudAiAgentSetupCommands.d.mts +15 -1
  368. package/Types/CloudConnection/CloudAiAgentSetupCommands.d.ts +15 -1
  369. package/Types/CloudConnection/CloudAiAgentSetupCommands.js +259 -40
  370. package/Types/CloudConnection/CloudAiAgentSetupCommands.mjs +12 -0
  371. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +1 -0
  372. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +1 -0
  373. package/Types/CloudConnection/CloudConnectionCatalog.js +17 -1
  374. package/Types/CloudConnection/CloudConnectionCatalog.mjs +1 -0
  375. package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +4 -0
  376. package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +4 -0
  377. package/Types/CloudConnection/CloudConnectionSetupCommands.js +35 -3
  378. package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +4 -0
  379. package/Types/CloudConnection/CloudStream.d.mts +114 -0
  380. package/Types/CloudConnection/CloudStream.d.ts +114 -0
  381. package/Types/CloudConnection/CloudStream.js +527 -0
  382. package/Types/CloudConnection/CloudStream.mjs +43 -0
  383. package/Types/CloudConnection/CloudStreamTemplate.d.mts +83 -0
  384. package/Types/CloudConnection/CloudStreamTemplate.d.ts +83 -0
  385. package/Types/CloudConnection/CloudStreamTemplate.js +677 -0
  386. package/Types/CloudConnection/CloudStreamTemplate.mjs +31 -0
  387. package/Types/CodeRepository/ProductionReview.d.mts +66 -2
  388. package/Types/CodeRepository/ProductionReview.d.ts +66 -2
  389. package/Types/CodeRepository/ProductionReview.js +25 -5
  390. package/Types/CodeRepository/ProductionReview.mjs +1 -0
  391. package/Types/Dashboard/DashboardTemplates.d.mts +1 -0
  392. package/Types/Dashboard/DashboardTemplates.d.ts +1 -0
  393. package/Types/Dashboard/DashboardTemplates.js +250 -0
  394. package/Types/DataObservability/DataAlertFeedback.d.mts +78 -0
  395. package/Types/DataObservability/DataAlertFeedback.d.ts +78 -0
  396. package/Types/DataObservability/DataAlertFeedback.js +147 -0
  397. package/Types/DataObservability/DataAlertFeedback.mjs +13 -0
  398. package/Types/DataObservability/DataAssetColumn.d.mts +29 -0
  399. package/Types/DataObservability/DataAssetColumn.d.ts +29 -0
  400. package/Types/DataObservability/DataAssetColumn.js +186 -0
  401. package/Types/DataObservability/DataAssetColumn.mjs +8 -0
  402. package/Types/DataObservability/DataAssetFreshness.d.mts +19 -0
  403. package/Types/DataObservability/DataAssetFreshness.d.ts +19 -0
  404. package/Types/DataObservability/DataAssetFreshness.js +54 -0
  405. package/Types/DataObservability/DataAssetFreshness.mjs +4 -0
  406. package/Types/DataObservability/DataAssetKind.d.mts +13 -0
  407. package/Types/DataObservability/DataAssetKind.d.ts +13 -0
  408. package/Types/DataObservability/DataAssetKind.js +50 -0
  409. package/Types/DataObservability/DataAssetKind.mjs +6 -0
  410. package/Types/DataObservability/DataAssetLineageSource.d.mts +7 -0
  411. package/Types/DataObservability/DataAssetLineageSource.d.ts +7 -0
  412. package/Types/DataObservability/DataAssetLineageSource.js +25 -0
  413. package/Types/DataObservability/DataAssetLineageSource.mjs +3 -0
  414. package/Types/DataObservability/DataAssetReads.d.mts +25 -0
  415. package/Types/DataObservability/DataAssetReads.d.ts +25 -0
  416. package/Types/DataObservability/DataAssetReads.js +125 -0
  417. package/Types/DataObservability/DataAssetReads.mjs +7 -0
  418. package/Types/DataObservability/DataAssetUsage.d.mts +9 -0
  419. package/Types/DataObservability/DataAssetUsage.d.ts +9 -0
  420. package/Types/DataObservability/DataAssetUsage.js +97 -0
  421. package/Types/DataObservability/DataAssetUsage.mjs +7 -0
  422. package/Types/DataObservability/DataBiTool.d.mts +14 -0
  423. package/Types/DataObservability/DataBiTool.d.ts +14 -0
  424. package/Types/DataObservability/DataBiTool.js +57 -0
  425. package/Types/DataObservability/DataBiTool.mjs +6 -0
  426. package/Types/DataObservability/DataCheckFailingRows.d.mts +4 -0
  427. package/Types/DataObservability/DataCheckFailingRows.d.ts +4 -0
  428. package/Types/DataObservability/DataCheckFailingRows.js +53 -0
  429. package/Types/DataObservability/DataCheckFailingRows.mjs +3 -0
  430. package/Types/DataObservability/DataCheckFormats.d.mts +14 -0
  431. package/Types/DataObservability/DataCheckFormats.d.ts +14 -0
  432. package/Types/DataObservability/DataCheckFormats.js +46 -0
  433. package/Types/DataObservability/DataCheckFormats.mjs +6 -0
  434. package/Types/DataObservability/DataCheckMetric.d.mts +8 -0
  435. package/Types/DataObservability/DataCheckMetric.d.ts +8 -0
  436. package/Types/DataObservability/DataCheckMetric.js +22 -0
  437. package/Types/DataObservability/DataCheckMetric.mjs +4 -0
  438. package/Types/DataObservability/DataCheckSuggestions.d.mts +36 -0
  439. package/Types/DataObservability/DataCheckSuggestions.d.ts +36 -0
  440. package/Types/DataObservability/DataCheckSuggestions.js +170 -0
  441. package/Types/DataObservability/DataCheckSuggestions.mjs +4 -0
  442. package/Types/DataObservability/DataCheckType.d.mts +42 -0
  443. package/Types/DataObservability/DataCheckType.d.ts +42 -0
  444. package/Types/DataObservability/DataCheckType.js +124 -0
  445. package/Types/DataObservability/DataCheckType.mjs +20 -0
  446. package/Types/DataObservability/DataColumnLineage.d.mts +8 -0
  447. package/Types/DataObservability/DataColumnLineage.d.ts +8 -0
  448. package/Types/DataObservability/DataColumnLineage.js +60 -0
  449. package/Types/DataObservability/DataColumnLineage.mjs +5 -0
  450. package/Types/DataObservability/DataColumnSensitivity.d.mts +48 -0
  451. package/Types/DataObservability/DataColumnSensitivity.d.ts +48 -0
  452. package/Types/DataObservability/DataColumnSensitivity.js +169 -0
  453. package/Types/DataObservability/DataColumnSensitivity.mjs +10 -0
  454. package/Types/DataObservability/DataObservabilityApiTypes.d.mts +222 -0
  455. package/Types/DataObservability/DataObservabilityApiTypes.d.ts +222 -0
  456. package/Types/DataObservability/DataObservabilityApiTypes.js +106 -0
  457. package/Types/DataObservability/DataObservabilityApiTypes.mjs +5 -0
  458. package/Types/DataObservability/DataObservabilityMetric.d.mts +28 -0
  459. package/Types/DataObservability/DataObservabilityMetric.d.ts +28 -0
  460. package/Types/DataObservability/DataObservabilityMetric.js +113 -0
  461. package/Types/DataObservability/DataObservabilityMetric.mjs +7 -0
  462. package/Types/DataObservability/DataPipelineMetric.d.mts +17 -0
  463. package/Types/DataObservability/DataPipelineMetric.d.ts +17 -0
  464. package/Types/DataObservability/DataPipelineMetric.js +51 -0
  465. package/Types/DataObservability/DataPipelineMetric.mjs +4 -0
  466. package/Types/DataObservability/DataPipelineSchedule.d.mts +30 -0
  467. package/Types/DataObservability/DataPipelineSchedule.d.ts +30 -0
  468. package/Types/DataObservability/DataPipelineSchedule.js +149 -0
  469. package/Types/DataObservability/DataPipelineSchedule.mjs +15 -0
  470. package/Types/DataObservability/DataProductBadge.d.mts +11 -0
  471. package/Types/DataObservability/DataProductBadge.d.ts +11 -0
  472. package/Types/DataObservability/DataProductBadge.js +93 -0
  473. package/Types/DataObservability/DataProductBadge.mjs +5 -0
  474. package/Types/DataObservability/DataProductFreshness.d.mts +51 -0
  475. package/Types/DataObservability/DataProductFreshness.d.ts +51 -0
  476. package/Types/DataObservability/DataProductFreshness.js +176 -0
  477. package/Types/DataObservability/DataProductFreshness.mjs +16 -0
  478. package/Types/DataObservability/DataProductMetric.d.mts +14 -0
  479. package/Types/DataObservability/DataProductMetric.d.ts +14 -0
  480. package/Types/DataObservability/DataProductMetric.js +35 -0
  481. package/Types/DataObservability/DataProductMetric.mjs +4 -0
  482. package/Types/DataObservability/DataReconciliation.d.mts +82 -0
  483. package/Types/DataObservability/DataReconciliation.d.ts +82 -0
  484. package/Types/DataObservability/DataReconciliation.js +208 -0
  485. package/Types/DataObservability/DataReconciliation.mjs +15 -0
  486. package/Types/DataObservability/DataWarehouseSpend.d.mts +27 -0
  487. package/Types/DataObservability/DataWarehouseSpend.d.ts +27 -0
  488. package/Types/DataObservability/DataWarehouseSpend.js +103 -0
  489. package/Types/DataObservability/DataWarehouseSpend.mjs +7 -0
  490. package/Types/DataObservability/DbtArtifact.d.mts +33 -0
  491. package/Types/DataObservability/DbtArtifact.d.ts +33 -0
  492. package/Types/DataObservability/DbtArtifact.js +173 -0
  493. package/Types/DataObservability/DbtArtifact.mjs +9 -0
  494. package/Types/DataObservability/StoragePaths.d.mts +14 -0
  495. package/Types/DataObservability/StoragePaths.d.ts +14 -0
  496. package/Types/DataObservability/StoragePaths.js +64 -0
  497. package/Types/DataObservability/StoragePaths.mjs +7 -0
  498. package/Types/DataSecurity/DataSecurityApiTypes.d.mts +34 -0
  499. package/Types/DataSecurity/DataSecurityApiTypes.d.ts +34 -0
  500. package/Types/DataSecurity/DataSecurityApiTypes.js +24 -1
  501. package/Types/DataSecurity/DataSecurityApiTypes.mjs +2 -0
  502. package/Types/DataSecurity/DataSecurityCheckCatalog.d.mts +23 -0
  503. package/Types/DataSecurity/DataSecurityCheckCatalog.d.ts +23 -0
  504. package/Types/DataSecurity/DataSecurityCheckCatalog.js +142 -15
  505. package/Types/DataSecurity/DataSecurityCheckCatalog.mjs +11 -0
  506. package/Types/DataSecurity/DataStoreKey.d.mts +1 -0
  507. package/Types/DataSecurity/DataStoreKey.d.ts +1 -0
  508. package/Types/DataSecurity/DataStoreKey.js +12 -0
  509. package/Types/DataSecurity/DataStoreKey.mjs +1 -0
  510. package/Types/DataSecurity/DataStoreKind.d.mts +4 -0
  511. package/Types/DataSecurity/DataStoreKind.d.ts +4 -0
  512. package/Types/DataSecurity/DataStoreKind.js +10 -0
  513. package/Types/Database/AccessControl/PermissionScopeNarrowing.d.mts +17 -0
  514. package/Types/Database/AccessControl/PermissionScopeNarrowing.d.ts +17 -0
  515. package/Types/Database/AccessControl/PermissionScopeNarrowing.js +1052 -0
  516. package/Types/Database/AccessControl/PermissionScopeNarrowing.mjs +3 -0
  517. package/Types/Database/TextColumnValue.d.mts +9 -0
  518. package/Types/Database/TextColumnValue.d.ts +9 -0
  519. package/Types/Database/TextColumnValue.js +83 -0
  520. package/Types/Database/TextColumnValue.mjs +4 -0
  521. package/Types/DatabaseServer/DatabaseEngineReadings.d.mts +44 -0
  522. package/Types/DatabaseServer/DatabaseEngineReadings.d.ts +44 -0
  523. package/Types/DatabaseServer/DatabaseEngineReadings.js +251 -0
  524. package/Types/DatabaseServer/DatabaseEngineReadings.mjs +16 -0
  525. package/Types/DatabaseServer/DatabaseHealth.d.mts +106 -0
  526. package/Types/DatabaseServer/DatabaseHealth.d.ts +106 -0
  527. package/Types/DatabaseServer/DatabaseHealth.js +803 -0
  528. package/Types/DatabaseServer/DatabaseHealth.mjs +23 -0
  529. package/Types/DatabaseServer/DatabaseServerMetricCatalog.d.mts +1 -0
  530. package/Types/DatabaseServer/DatabaseServerMetricCatalog.d.ts +1 -0
  531. package/Types/DatabaseServer/DatabaseServerMetricCatalog.js +225 -104
  532. package/Types/Date.d.mts +9 -1
  533. package/Types/Date.d.ts +9 -1
  534. package/Types/Date.js +33 -10
  535. package/Types/Email/EmailTemplateType.d.mts +2 -0
  536. package/Types/Email/EmailTemplateType.d.ts +2 -0
  537. package/Types/Email/EmailTemplateType.js +4 -0
  538. package/Types/Incident/IncidentAlertLink.d.mts +2 -0
  539. package/Types/Incident/IncidentAlertLink.d.ts +2 -0
  540. package/Types/Incident/IncidentAlertLink.js +14 -1
  541. package/Types/Incident/IncidentAlertLink.mjs +2 -0
  542. package/Types/InstallScripts/InstallScripts.d.mts +2 -0
  543. package/Types/InstallScripts/InstallScripts.d.ts +2 -0
  544. package/Types/InstallScripts/InstallScripts.js +60 -0
  545. package/Types/JSON.d.mts +5 -1
  546. package/Types/JSON.d.ts +5 -1
  547. package/Types/JSON.js +2 -0
  548. package/Types/Kubernetes/KubernetesObjectParser.d.mts +1 -0
  549. package/Types/Kubernetes/KubernetesObjectParser.d.ts +1 -0
  550. package/Types/Kubernetes/KubernetesObjectParser.js +3 -5
  551. package/Types/MessageQueue/MessageQueueMetricCatalog.js +119 -111
  552. package/Types/MeteredPlan/ProductType.d.mts +2 -1
  553. package/Types/MeteredPlan/ProductType.d.ts +2 -1
  554. package/Types/MeteredPlan/ProductType.js +2 -0
  555. package/Types/Monitor/CephMetricCatalog.js +32 -31
  556. package/Types/Monitor/CriteriaFilter.d.mts +18 -1
  557. package/Types/Monitor/CriteriaFilter.d.ts +18 -1
  558. package/Types/Monitor/CriteriaFilter.js +41 -1
  559. package/Types/Monitor/CriteriaFilter.mjs +2 -0
  560. package/Types/Monitor/DataCheckMonitorStep.d.mts +19 -0
  561. package/Types/Monitor/DataCheckMonitorStep.d.ts +19 -0
  562. package/Types/Monitor/DataCheckMonitorStep.js +150 -0
  563. package/Types/Monitor/DataCheckMonitorStep.mjs +3 -0
  564. package/Types/Monitor/DataObservabilityAlertTemplates.d.mts +29 -0
  565. package/Types/Monitor/DataObservabilityAlertTemplates.d.ts +29 -0
  566. package/Types/Monitor/DataObservabilityAlertTemplates.js +314 -0
  567. package/Types/Monitor/DataObservabilityAlertTemplates.mjs +5 -0
  568. package/Types/Monitor/DataPipelineAlertTemplates.d.mts +27 -0
  569. package/Types/Monitor/DataPipelineAlertTemplates.d.ts +27 -0
  570. package/Types/Monitor/DataPipelineAlertTemplates.js +176 -0
  571. package/Types/Monitor/DataPipelineAlertTemplates.mjs +4 -0
  572. package/Types/Monitor/DataProductMonitorStep.d.mts +12 -0
  573. package/Types/Monitor/DataProductMonitorStep.d.ts +12 -0
  574. package/Types/Monitor/DataProductMonitorStep.js +95 -0
  575. package/Types/Monitor/DataProductMonitorStep.mjs +2 -0
  576. package/Types/Monitor/DataReconciliationMonitorStep.d.mts +13 -0
  577. package/Types/Monitor/DataReconciliationMonitorStep.d.ts +13 -0
  578. package/Types/Monitor/DataReconciliationMonitorStep.js +91 -0
  579. package/Types/Monitor/DataReconciliationMonitorStep.mjs +2 -0
  580. package/Types/Monitor/DatabaseAlertTemplates.d.mts +36 -0
  581. package/Types/Monitor/DatabaseAlertTemplates.d.ts +36 -0
  582. package/Types/Monitor/DatabaseAlertTemplates.js +230 -4
  583. package/Types/Monitor/MetricMonitor/MetricCriteriaContext.d.mts +38 -0
  584. package/Types/Monitor/MetricMonitor/MetricCriteriaContext.d.ts +38 -0
  585. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.mts +26 -0
  586. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.ts +26 -0
  587. package/Types/Monitor/MetricMonitor/MetricSeriesArrival.d.mts +5 -0
  588. package/Types/Monitor/MetricMonitor/MetricSeriesArrival.d.ts +5 -0
  589. package/Types/Monitor/MetricMonitor/MetricSeriesArrival.js +2 -0
  590. package/Types/Monitor/MetricMonitor/MetricSeriesArrival.mjs +1 -0
  591. package/Types/Monitor/MetricMonitor/MetricSeriesResult.d.mts +2 -0
  592. package/Types/Monitor/MetricMonitor/MetricSeriesResult.d.ts +2 -0
  593. package/Types/Monitor/MonitorCriteriaInstance.d.mts +1 -0
  594. package/Types/Monitor/MonitorCriteriaInstance.d.ts +1 -0
  595. package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
  596. package/Types/Monitor/MonitorStep.d.mts +3 -0
  597. package/Types/Monitor/MonitorStep.d.ts +3 -0
  598. package/Types/Monitor/MonitorStep.js +42 -7
  599. package/Types/Monitor/MonitorStepMetricViewConfigUtil.js +1 -0
  600. package/Types/Monitor/MonitorStepOpenStackMonitor.d.mts +39 -0
  601. package/Types/Monitor/MonitorStepOpenStackMonitor.d.ts +39 -0
  602. package/Types/Monitor/MonitorStepOpenStackMonitor.js +138 -0
  603. package/Types/Monitor/MonitorStepOpenStackMonitor.mjs +7 -0
  604. package/Types/Monitor/MonitorStepSecurityEventsMonitor.d.mts +2 -0
  605. package/Types/Monitor/MonitorStepSecurityEventsMonitor.d.ts +2 -0
  606. package/Types/Monitor/MonitorStepSecurityEventsMonitor.js +5 -1
  607. package/Types/Monitor/MonitorTemplateSyncField.js +5 -0
  608. package/Types/Monitor/MonitorType.d.mts +1 -0
  609. package/Types/Monitor/MonitorType.d.ts +1 -0
  610. package/Types/Monitor/MonitorType.js +27 -2
  611. package/Types/Monitor/OpenStackAlertTemplates.d.mts +100 -0
  612. package/Types/Monitor/OpenStackAlertTemplates.d.ts +100 -0
  613. package/Types/Monitor/OpenStackAlertTemplates.js +3558 -0
  614. package/Types/Monitor/OpenStackAlertTemplates.mjs +13 -0
  615. package/Types/Monitor/OpenStackControlPlaneAlertTemplates.d.mts +7 -0
  616. package/Types/Monitor/OpenStackControlPlaneAlertTemplates.d.ts +7 -0
  617. package/Types/Monitor/OpenStackControlPlaneAlertTemplates.js +1442 -0
  618. package/Types/Monitor/OpenStackControlPlaneAlertTemplates.mjs +5 -0
  619. package/Types/Monitor/OpenStackLogAlertTemplates.d.mts +40 -0
  620. package/Types/Monitor/OpenStackLogAlertTemplates.d.ts +40 -0
  621. package/Types/Monitor/OpenStackLogAlertTemplates.js +393 -0
  622. package/Types/Monitor/OpenStackLogAlertTemplates.mjs +19 -0
  623. package/Types/Monitor/OpenStackMetricCatalog.d.mts +31 -0
  624. package/Types/Monitor/OpenStackMetricCatalog.d.ts +31 -0
  625. package/Types/Monitor/OpenStackMetricCatalog.js +3064 -0
  626. package/Types/Monitor/OpenStackMetricCatalog.mjs +8 -0
  627. package/Types/Monitor/ProxmoxMetricCatalog.js +29 -28
  628. package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.d.mts +1 -1
  629. package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.d.ts +1 -1
  630. package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +132 -0
  631. package/Types/Monitor/Recommendation/MonitorRecommendationTypes.d.mts +8 -1
  632. package/Types/Monitor/Recommendation/MonitorRecommendationTypes.d.ts +8 -1
  633. package/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +14 -0
  634. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +20 -5
  635. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.mts +4 -1
  636. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.ts +4 -1
  637. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js +10 -2
  638. package/Types/Monitor/SeriesContext/SeriesDebugHints.d.mts +2 -0
  639. package/Types/Monitor/SeriesContext/SeriesDebugHints.d.ts +2 -0
  640. package/Types/Monitor/SeriesContext/SeriesDebugHints.js +222 -0
  641. package/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +110 -1
  642. package/Types/Monitor/StorageArrayMetricCatalog.js +57 -56
  643. package/Types/Monitor/TelemetryAlertRule.d.mts +5 -1
  644. package/Types/Monitor/TelemetryAlertRule.d.ts +5 -1
  645. package/Types/Monitor/TelemetryAlertRule.js +43 -8
  646. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +8 -0
  647. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +8 -0
  648. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +71 -0
  649. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +5 -0
  650. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +26 -1
  651. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +26 -1
  652. package/Types/OnCallDutyPolicy/OnCallPagePassOn.js +174 -5
  653. package/Types/OnCallDutyPolicy/OnCallPagePassOn.mjs +14 -0
  654. package/Types/OnCallDutyPolicy/UserOverrideAddAccess.d.mts +15 -0
  655. package/Types/OnCallDutyPolicy/UserOverrideAddAccess.d.ts +15 -0
  656. package/Types/OnCallDutyPolicy/UserOverrideAddAccess.js +120 -0
  657. package/Types/OnCallDutyPolicy/UserOverrideAddAccess.mjs +4 -0
  658. package/Types/OpenStack/OpenStackAttentionSummary.d.mts +21 -0
  659. package/Types/OpenStack/OpenStackAttentionSummary.d.ts +21 -0
  660. package/Types/OpenStack/OpenStackAttentionSummary.js +162 -0
  661. package/Types/OpenStack/OpenStackAttentionSummary.mjs +2 -0
  662. package/Types/OpenStack/OpenStackBareMetal.d.mts +9 -0
  663. package/Types/OpenStack/OpenStackBareMetal.d.ts +9 -0
  664. package/Types/OpenStack/OpenStackBareMetal.js +5 -0
  665. package/Types/OpenStack/OpenStackBareMetal.mjs +2 -0
  666. package/Types/OpenStack/OpenStackBlastRadius.d.mts +77 -0
  667. package/Types/OpenStack/OpenStackBlastRadius.d.ts +77 -0
  668. package/Types/OpenStack/OpenStackBlastRadius.js +208 -0
  669. package/Types/OpenStack/OpenStackBlastRadius.mjs +15 -0
  670. package/Types/OpenStack/OpenStackCapacity.d.mts +187 -0
  671. package/Types/OpenStack/OpenStackCapacity.d.ts +187 -0
  672. package/Types/OpenStack/OpenStackCapacity.js +790 -0
  673. package/Types/OpenStack/OpenStackCapacity.mjs +27 -0
  674. package/Types/OpenStack/OpenStackCapacitySeries.d.mts +36 -0
  675. package/Types/OpenStack/OpenStackCapacitySeries.d.ts +36 -0
  676. package/Types/OpenStack/OpenStackCapacitySeries.js +243 -0
  677. package/Types/OpenStack/OpenStackCapacitySeries.mjs +15 -0
  678. package/Types/OpenStack/OpenStackCapacitySnapshot.d.mts +212 -0
  679. package/Types/OpenStack/OpenStackCapacitySnapshot.d.ts +212 -0
  680. package/Types/OpenStack/OpenStackCapacitySnapshot.js +593 -0
  681. package/Types/OpenStack/OpenStackCapacitySnapshot.mjs +29 -0
  682. package/Types/OpenStack/OpenStackCheck.d.mts +202 -0
  683. package/Types/OpenStack/OpenStackCheck.d.ts +202 -0
  684. package/Types/OpenStack/OpenStackCheck.js +238 -0
  685. package/Types/OpenStack/OpenStackCheck.mjs +24 -0
  686. package/Types/OpenStack/OpenStackCloudKitty.d.mts +20 -0
  687. package/Types/OpenStack/OpenStackCloudKitty.d.ts +20 -0
  688. package/Types/OpenStack/OpenStackCloudKitty.js +138 -0
  689. package/Types/OpenStack/OpenStackCloudKitty.mjs +8 -0
  690. package/Types/OpenStack/OpenStackCollectionError.d.mts +37 -0
  691. package/Types/OpenStack/OpenStackCollectionError.d.ts +37 -0
  692. package/Types/OpenStack/OpenStackCollectionError.js +208 -0
  693. package/Types/OpenStack/OpenStackCollectionError.mjs +3 -0
  694. package/Types/OpenStack/OpenStackCollectionMethod.d.mts +9 -0
  695. package/Types/OpenStack/OpenStackCollectionMethod.d.ts +9 -0
  696. package/Types/OpenStack/OpenStackCollectionMethod.js +31 -0
  697. package/Types/OpenStack/OpenStackCollectionMethod.mjs +3 -0
  698. package/Types/OpenStack/OpenStackCollectionStatus.d.mts +12 -0
  699. package/Types/OpenStack/OpenStackCollectionStatus.d.ts +12 -0
  700. package/Types/OpenStack/OpenStackCollectionStatus.js +49 -0
  701. package/Types/OpenStack/OpenStackCollectionStatus.mjs +3 -0
  702. package/Types/OpenStack/OpenStackConnectionTestStatus.d.mts +11 -0
  703. package/Types/OpenStack/OpenStackConnectionTestStatus.d.ts +11 -0
  704. package/Types/OpenStack/OpenStackConnectionTestStatus.js +35 -0
  705. package/Types/OpenStack/OpenStackConnectionTestStatus.mjs +6 -0
  706. package/Types/OpenStack/OpenStackControlPlane.d.mts +125 -0
  707. package/Types/OpenStack/OpenStackControlPlane.d.ts +125 -0
  708. package/Types/OpenStack/OpenStackControlPlane.js +420 -0
  709. package/Types/OpenStack/OpenStackControlPlane.mjs +39 -0
  710. package/Types/OpenStack/OpenStackCounts.d.mts +11 -0
  711. package/Types/OpenStack/OpenStackCounts.d.ts +11 -0
  712. package/Types/OpenStack/OpenStackCounts.js +31 -0
  713. package/Types/OpenStack/OpenStackCounts.mjs +4 -0
  714. package/Types/OpenStack/OpenStackForecast.d.mts +19 -0
  715. package/Types/OpenStack/OpenStackForecast.d.ts +19 -0
  716. package/Types/OpenStack/OpenStackForecast.js +65 -0
  717. package/Types/OpenStack/OpenStackForecast.mjs +2 -0
  718. package/Types/OpenStack/OpenStackHealthRules.d.mts +195 -0
  719. package/Types/OpenStack/OpenStackHealthRules.d.ts +195 -0
  720. package/Types/OpenStack/OpenStackHealthRules.js +625 -0
  721. package/Types/OpenStack/OpenStackHealthRules.mjs +90 -0
  722. package/Types/OpenStack/OpenStackInstanceMetrics.d.mts +121 -0
  723. package/Types/OpenStack/OpenStackInstanceMetrics.d.ts +121 -0
  724. package/Types/OpenStack/OpenStackInstanceMetrics.js +380 -0
  725. package/Types/OpenStack/OpenStackInstanceMetrics.mjs +42 -0
  726. package/Types/OpenStack/OpenStackLinks.d.mts +155 -0
  727. package/Types/OpenStack/OpenStackLinks.d.ts +155 -0
  728. package/Types/OpenStack/OpenStackLinks.js +447 -0
  729. package/Types/OpenStack/OpenStackLinks.mjs +23 -0
  730. package/Types/OpenStack/OpenStackListSeek.d.mts +14 -0
  731. package/Types/OpenStack/OpenStackListSeek.d.ts +14 -0
  732. package/Types/OpenStack/OpenStackListSeek.js +51 -0
  733. package/Types/OpenStack/OpenStackListSeek.mjs +4 -0
  734. package/Types/OpenStack/OpenStackMaintenancePart.d.mts +26 -0
  735. package/Types/OpenStack/OpenStackMaintenancePart.d.ts +26 -0
  736. package/Types/OpenStack/OpenStackMaintenancePart.js +112 -0
  737. package/Types/OpenStack/OpenStackMaintenancePart.mjs +5 -0
  738. package/Types/OpenStack/OpenStackOptionalServices.d.mts +26 -0
  739. package/Types/OpenStack/OpenStackOptionalServices.d.ts +26 -0
  740. package/Types/OpenStack/OpenStackOptionalServices.js +147 -0
  741. package/Types/OpenStack/OpenStackOptionalServices.mjs +10 -0
  742. package/Types/OpenStack/OpenStackOverview.d.mts +33 -0
  743. package/Types/OpenStack/OpenStackOverview.d.ts +33 -0
  744. package/Types/OpenStack/OpenStackOverview.js +6 -0
  745. package/Types/OpenStack/OpenStackOverview.mjs +1 -0
  746. package/Types/OpenStack/OpenStackPriceList.d.mts +48 -0
  747. package/Types/OpenStack/OpenStackPriceList.d.ts +48 -0
  748. package/Types/OpenStack/OpenStackPriceList.js +221 -0
  749. package/Types/OpenStack/OpenStackPriceList.mjs +9 -0
  750. package/Types/OpenStack/OpenStackProbeCollection.d.mts +154 -0
  751. package/Types/OpenStack/OpenStackProbeCollection.d.ts +154 -0
  752. package/Types/OpenStack/OpenStackProbeCollection.js +40 -0
  753. package/Types/OpenStack/OpenStackProbeCollection.mjs +10 -0
  754. package/Types/OpenStack/OpenStackProjectNotice.d.mts +76 -0
  755. package/Types/OpenStack/OpenStackProjectNotice.d.ts +76 -0
  756. package/Types/OpenStack/OpenStackProjectNotice.js +225 -0
  757. package/Types/OpenStack/OpenStackProjectNotice.mjs +12 -0
  758. package/Types/OpenStack/OpenStackProjectUsage.d.mts +131 -0
  759. package/Types/OpenStack/OpenStackProjectUsage.d.ts +131 -0
  760. package/Types/OpenStack/OpenStackProjectUsage.js +409 -0
  761. package/Types/OpenStack/OpenStackProjectUsage.mjs +24 -0
  762. package/Types/OpenStack/OpenStackQuota.d.mts +29 -0
  763. package/Types/OpenStack/OpenStackQuota.d.ts +29 -0
  764. package/Types/OpenStack/OpenStackQuota.js +130 -0
  765. package/Types/OpenStack/OpenStackQuota.mjs +8 -0
  766. package/Types/OpenStack/OpenStackResourceKind.d.mts +100 -0
  767. package/Types/OpenStack/OpenStackResourceKind.d.ts +100 -0
  768. package/Types/OpenStack/OpenStackResourceKind.js +508 -0
  769. package/Types/OpenStack/OpenStackResourceKind.mjs +42 -0
  770. package/Types/OpenStack/OpenStackRunbookTemplates.d.mts +35 -0
  771. package/Types/OpenStack/OpenStackRunbookTemplates.d.ts +35 -0
  772. package/Types/OpenStack/OpenStackRunbookTemplates.js +313 -0
  773. package/Types/OpenStack/OpenStackRunbookTemplates.mjs +11 -0
  774. package/Types/OpenStack/OpenStackScale.d.mts +156 -0
  775. package/Types/OpenStack/OpenStackScale.d.ts +156 -0
  776. package/Types/OpenStack/OpenStackScale.js +678 -0
  777. package/Types/OpenStack/OpenStackScale.mjs +45 -0
  778. package/Types/OpenStack/OpenStackScopedRule.d.mts +12 -0
  779. package/Types/OpenStack/OpenStackScopedRule.d.ts +12 -0
  780. package/Types/OpenStack/OpenStackScopedRule.js +33 -0
  781. package/Types/OpenStack/OpenStackScopedRule.mjs +3 -0
  782. package/Types/OpenStack/OpenStackSpendSnapshot.d.mts +222 -0
  783. package/Types/OpenStack/OpenStackSpendSnapshot.d.ts +222 -0
  784. package/Types/OpenStack/OpenStackSpendSnapshot.js +465 -0
  785. package/Types/OpenStack/OpenStackSpendSnapshot.mjs +30 -0
  786. package/Types/OpenStack/OpenStackStatusPagePlan.d.mts +69 -0
  787. package/Types/OpenStack/OpenStackStatusPagePlan.d.ts +69 -0
  788. package/Types/OpenStack/OpenStackStatusPagePlan.js +194 -0
  789. package/Types/OpenStack/OpenStackStatusPagePlan.mjs +6 -0
  790. package/Types/OpenStack/OpenStackStatusPageService.d.mts +25 -0
  791. package/Types/OpenStack/OpenStackStatusPageService.d.ts +25 -0
  792. package/Types/OpenStack/OpenStackStatusPageService.js +184 -0
  793. package/Types/OpenStack/OpenStackStatusPageService.mjs +5 -0
  794. package/Types/OpenStack/OpenStackTopology.d.mts +1 -0
  795. package/Types/OpenStack/OpenStackTopology.d.ts +1 -0
  796. package/Types/OpenStack/OpenStackTopology.js +10 -0
  797. package/Types/OpenStack/OpenStackTopology.mjs +2 -0
  798. package/Types/OpenStack/OpenStackWaste.d.mts +136 -0
  799. package/Types/OpenStack/OpenStackWaste.d.ts +136 -0
  800. package/Types/OpenStack/OpenStackWaste.js +660 -0
  801. package/Types/OpenStack/OpenStackWaste.mjs +25 -0
  802. package/Types/Permission.d.mts +49 -0
  803. package/Types/Permission.d.ts +49 -0
  804. package/Types/Permission.js +514 -2
  805. package/Types/Probe/ProbeApiIngestResponse.d.mts +5 -3
  806. package/Types/Probe/ProbeApiIngestResponse.d.ts +5 -3
  807. package/Types/Probe/ProbeCapability.d.mts +2 -1
  808. package/Types/Probe/ProbeCapability.d.ts +2 -1
  809. package/Types/Probe/ProbeCapability.js +9 -0
  810. package/Types/Recommendation/RecommendationType.d.mts +3 -1
  811. package/Types/Recommendation/RecommendationType.d.ts +3 -1
  812. package/Types/Recommendation/RecommendationType.js +4 -0
  813. package/Types/RequestOrigin.d.mts +5 -0
  814. package/Types/RequestOrigin.d.ts +5 -0
  815. package/Types/RequestOrigin.js +2 -0
  816. package/Types/RequestOrigin.mjs +1 -0
  817. package/Types/ResourceAiAgent/AiResourceType.d.mts +6 -1
  818. package/Types/ResourceAiAgent/AiResourceType.d.ts +6 -1
  819. package/Types/ResourceAiAgent/AiResourceType.js +49 -4
  820. package/Types/ResourceAiAgent/AiResourceType.mjs +4 -0
  821. package/Types/ResourceAiAgent/CloudAiAgentNames.d.mts +5 -0
  822. package/Types/ResourceAiAgent/CloudAiAgentNames.d.ts +5 -0
  823. package/Types/ResourceAiAgent/CloudAiAgentNames.js +10 -6
  824. package/Types/ResourceAiAgent/CloudAiAgentNames.mjs +4 -0
  825. package/Types/ResourceAiAgent/ResourceAiAccess.d.mts +4 -0
  826. package/Types/ResourceAiAgent/ResourceAiAccess.d.ts +4 -0
  827. package/Types/ResourceAiAgent/ResourceAiAccess.js +21 -1
  828. package/Types/ResourceAiAgent/ResourceAiAccess.mjs +3 -0
  829. package/Types/Rules/RuleCriteriaFieldRegistry.js +37 -0
  830. package/Types/Rules/RuleCriteriaSubject.d.mts +2 -0
  831. package/Types/Rules/RuleCriteriaSubject.d.ts +2 -0
  832. package/Types/Rules/RuleCriteriaSubject.js +7 -0
  833. package/Types/Rules/RuleRun.d.mts +4 -0
  834. package/Types/Rules/RuleRun.d.ts +4 -0
  835. package/Types/Rules/RuleRun.js +8 -0
  836. package/Types/Runbook/RunbookRunPermissions.d.mts +1 -0
  837. package/Types/Runbook/RunbookRunPermissions.d.ts +1 -0
  838. package/Types/Runbook/RunbookRunPermissions.js +9 -1
  839. package/Types/Runbook/RunbookRunPermissions.mjs +1 -0
  840. package/Types/SSO/SignInMethods.d.mts +1 -0
  841. package/Types/SSO/SignInMethods.d.ts +1 -0
  842. package/Types/SSO/SignInMethods.js +1 -0
  843. package/Types/SecurityCase/SecurityCaseContext.d.mts +2 -0
  844. package/Types/SecurityCase/SecurityCaseContext.d.ts +2 -0
  845. package/Types/SecurityCase/SecurityConnection.d.mts +4 -0
  846. package/Types/SecurityCase/SecurityConnection.d.ts +4 -0
  847. package/Types/SecurityCase/SecurityConnection.js +6 -0
  848. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +1 -0
  849. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +1 -0
  850. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +52 -17
  851. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.mjs +1 -0
  852. package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +1 -0
  853. package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +1 -0
  854. package/Types/SecurityEvent/DetectionRuleDataKind.js +15 -3
  855. package/Types/SecurityEvent/DetectionRuleLibrary.js +171 -0
  856. package/Types/SecurityEvent/SecurityHunt.d.mts +16 -0
  857. package/Types/SecurityEvent/SecurityHunt.d.ts +16 -0
  858. package/Types/SecurityEvent/SecurityHunt.js +44 -1
  859. package/Types/SecurityEvent/SecurityHunt.mjs +3 -0
  860. package/Types/SecurityEvent/SecurityHuntLibrary.d.mts +16 -0
  861. package/Types/SecurityEvent/SecurityHuntLibrary.d.ts +16 -0
  862. package/Types/SecurityEvent/SecurityHuntLibrary.js +204 -0
  863. package/Types/SecurityEvent/SecurityHuntLibrary.mjs +5 -0
  864. package/Types/SecurityEvent/SecurityLogFormat.d.mts +4 -0
  865. package/Types/SecurityEvent/SecurityLogFormat.d.ts +4 -0
  866. package/Types/SecurityEvent/SecurityLogFormat.js +46 -2
  867. package/Types/SecurityEvent/SecurityTelemetrySource.d.mts +5 -1
  868. package/Types/SecurityEvent/SecurityTelemetrySource.d.ts +5 -1
  869. package/Types/SecurityEvent/SecurityTelemetrySource.js +37 -7
  870. package/Types/SecurityEvent/SecurityTelemetrySource.mjs +2 -0
  871. package/Types/SecurityEvent/SecurityWatchlist.d.mts +93 -2
  872. package/Types/SecurityEvent/SecurityWatchlist.d.ts +93 -2
  873. package/Types/SecurityEvent/SecurityWatchlist.js +461 -20
  874. package/Types/SecurityEvent/SecurityWatchlist.mjs +23 -0
  875. package/Types/SecurityEvent/SecurityWatchlistFilter.d.mts +43 -0
  876. package/Types/SecurityEvent/SecurityWatchlistFilter.d.ts +43 -0
  877. package/Types/SecurityEvent/SecurityWatchlistFilter.js +261 -0
  878. package/Types/SecurityEvent/SecurityWatchlistFilter.mjs +15 -0
  879. package/Types/SerializableObjectDictionary.js +8 -0
  880. package/Types/StatusPage/StatusPageMagicLink.d.mts +14 -0
  881. package/Types/StatusPage/StatusPageMagicLink.d.ts +14 -0
  882. package/Types/StatusPage/StatusPageMagicLink.js +88 -0
  883. package/Types/StatusPage/StatusPageMagicLink.mjs +10 -0
  884. package/Types/Team/ComplianceNotificationChannel.d.mts +1 -0
  885. package/Types/Team/ComplianceNotificationChannel.d.ts +1 -0
  886. package/Types/Team/ComplianceNotificationChannel.js +2 -1
  887. package/Types/Team/ComplianceRule.js +11 -0
  888. package/Types/Team/ComplianceRuleType.d.mts +1 -0
  889. package/Types/Team/ComplianceRuleType.d.ts +1 -0
  890. package/Types/Team/ComplianceRuleType.js +1 -0
  891. package/Types/Telemetry/EntityType.d.mts +4 -0
  892. package/Types/Telemetry/EntityType.d.ts +4 -0
  893. package/Types/Telemetry/EntityType.js +14 -0
  894. package/Types/Telemetry/ResourceFacetCatalog.js +7 -0
  895. package/Types/Telemetry/ServiceType.d.mts +5 -0
  896. package/Types/Telemetry/ServiceType.d.ts +5 -0
  897. package/Types/Telemetry/ServiceType.js +26 -0
  898. package/Types/Telemetry/TelemetryIngestSurface.d.mts +3 -0
  899. package/Types/Telemetry/TelemetryIngestSurface.d.ts +3 -0
  900. package/Types/Telemetry/TelemetryIngestSurface.js +17 -0
  901. package/Types/Topology/TopologyTypeRules.js +6 -0
  902. package/Types/Translator.d.mts +1 -0
  903. package/Types/Translator.d.ts +1 -0
  904. package/Types/Translator.js +12 -2
  905. package/Types/Translator.mjs +1 -0
  906. package/Types/VideoCall/VideoCallProviderCatalog.js +3 -3
  907. package/Types/Workflow/Component.d.mts +5 -0
  908. package/Types/Workflow/Component.d.ts +5 -0
  909. package/Types/Workflow/ComponentID.d.mts +1 -0
  910. package/Types/Workflow/ComponentID.d.ts +1 -0
  911. package/Types/Workflow/ComponentID.js +1 -0
  912. package/Types/Workflow/Components/FromAnotherTool.d.mts +1 -0
  913. package/Types/Workflow/Components/FromAnotherTool.d.ts +1 -0
  914. package/Types/Workflow/Components/FromAnotherTool.js +11 -1
  915. package/Types/Workflow/Components/OnCall.js +2 -0
  916. package/Types/Workflow/Components/OpenStack.d.mts +4 -0
  917. package/Types/Workflow/Components/OpenStack.d.ts +4 -0
  918. package/Types/Workflow/Components/OpenStack.js +120 -0
  919. package/Types/Workflow/Components/OpenStack.mjs +3 -0
  920. package/Types/Workflow/Components.js +7 -0
  921. package/Types/Workflow/CustomFieldsColumn.d.mts +6 -0
  922. package/Types/Workflow/CustomFieldsColumn.d.ts +6 -0
  923. package/Types/Workflow/CustomFieldsColumn.js +26 -1
  924. package/Types/Workflow/CustomFieldsColumn.mjs +4 -0
  925. package/Types/Workflow/Documentation/DatabaseDocumentation.js +1 -0
  926. package/Types/Workflow/Documentation/DocumentationLinks.d.mts +1 -0
  927. package/Types/Workflow/Documentation/DocumentationLinks.d.ts +1 -0
  928. package/Types/Workflow/Documentation/DocumentationLinks.js +1 -0
  929. package/Types/Workflow/Documentation/Index.js +2 -0
  930. package/Types/Workflow/Documentation/OpenStackDocumentation.d.mts +4 -0
  931. package/Types/Workflow/Documentation/OpenStackDocumentation.d.ts +4 -0
  932. package/Types/Workflow/Documentation/OpenStackDocumentation.js +54 -0
  933. package/Types/Workflow/Documentation/OpenStackDocumentation.mjs +2 -0
  934. package/Types/Workflow/EmptyValues.d.mts +39 -0
  935. package/Types/Workflow/EmptyValues.d.ts +39 -0
  936. package/Types/Workflow/EmptyValues.js +176 -0
  937. package/Types/Workflow/EmptyValues.mjs +6 -0
  938. package/Types/Workflow/LinkedRecord.d.mts +20 -0
  939. package/Types/Workflow/LinkedRecord.d.ts +20 -0
  940. package/Types/Workflow/LinkedRecord.js +120 -0
  941. package/Types/Workflow/LinkedRecord.mjs +4 -0
  942. package/Types/Workflow/LinkedRecordValue.d.mts +21 -0
  943. package/Types/Workflow/LinkedRecordValue.d.ts +21 -0
  944. package/Types/Workflow/LinkedRecordValue.js +92 -0
  945. package/Types/Workflow/LinkedRecordValue.mjs +5 -0
  946. package/Types/Workflow/PassedOnFields.d.mts +52 -0
  947. package/Types/Workflow/PassedOnFields.d.ts +52 -0
  948. package/Types/Workflow/PassedOnFields.js +173 -0
  949. package/Types/Workflow/PassedOnFields.mjs +8 -0
  950. package/Types/Workflow/TemplateSyntax.d.mts +11 -0
  951. package/Types/Workflow/TemplateSyntax.d.ts +11 -0
  952. package/Types/Workflow/TemplateSyntax.js +26 -1
  953. package/Types/Workflow/TemplateSyntax.mjs +2 -0
  954. package/Types/Workflow/Templates.d.mts +37 -0
  955. package/Types/Workflow/Templates.d.ts +37 -0
  956. package/Types/Workflow/Templates.js +741 -4
  957. package/Types/Workflow/Templates.mjs +13 -0
  958. package/Types/Workflow/WorkflowDraft.d.mts +49 -0
  959. package/Types/Workflow/WorkflowDraft.d.ts +49 -0
  960. package/Types/Workflow/WorkflowDraft.js +512 -0
  961. package/Types/Workflow/WorkflowDraft.mjs +7 -0
  962. package/Types/Workflow/WorkflowRunAgain.d.mts +15 -0
  963. package/Types/Workflow/WorkflowRunAgain.d.ts +15 -0
  964. package/Types/Workflow/WorkflowRunAgain.js +73 -0
  965. package/Types/Workflow/WorkflowRunAgain.mjs +5 -0
  966. package/Types/Workspace/ConnectCallback.d.mts +4 -0
  967. package/Types/Workspace/ConnectCallback.d.ts +4 -0
  968. package/Types/Workspace/ConnectCallback.js +23 -2
  969. package/Types/Workspace/NotificationRules/EventType.d.mts +2 -1
  970. package/Types/Workspace/NotificationRules/EventType.d.ts +2 -1
  971. package/Types/Workspace/NotificationRules/EventType.js +6 -0
  972. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +2 -1
  973. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +2 -1
  974. package/Types/Workspace/NotificationRules/NotificationRuleInvites.js +2 -1
  975. package/Types/Workspace/NotificationRules/NotificationRuleTypes/SecurityHuntNotificationRule.d.mts +4 -0
  976. package/Types/Workspace/NotificationRules/NotificationRuleTypes/SecurityHuntNotificationRule.d.ts +4 -0
  977. package/Types/Workspace/NotificationRules/NotificationRuleTypes/SecurityHuntNotificationRule.js +2 -0
  978. package/Types/Workspace/NotificationRules/NotificationRuleTypes/SecurityHuntNotificationRule.mjs +1 -0
  979. package/Types/Workspace/WorkspaceChannelLink.d.mts +10 -0
  980. package/Types/Workspace/WorkspaceChannelLink.d.ts +10 -0
  981. package/Types/Workspace/WorkspaceChannelLink.js +87 -3
  982. package/Types/Workspace/WorkspaceChannelLink.mjs +1 -0
  983. package/Types/Workspace/WorkspaceChannelMembers.d.mts +1 -0
  984. package/Types/Workspace/WorkspaceChannelMembers.d.ts +1 -0
  985. package/Types/Workspace/WorkspaceChannelMembers.js +30 -18
  986. package/Types/Workspace/WorkspaceType.d.mts +2 -1
  987. package/Types/Workspace/WorkspaceType.d.ts +2 -1
  988. package/Types/Workspace/WorkspaceType.js +4 -0
  989. package/Utils/AI/InvestigationReport.d.mts +17 -0
  990. package/Utils/AI/InvestigationReport.d.ts +17 -0
  991. package/Utils/AI/InvestigationReport.js +148 -11
  992. package/Utils/AI/InvestigationReport.mjs +6 -0
  993. package/Utils/AiRemediation/Resource/OpenStackChangeReach.d.mts +63 -0
  994. package/Utils/AiRemediation/Resource/OpenStackChangeReach.d.ts +63 -0
  995. package/Utils/AiRemediation/Resource/OpenStackChangeReach.js +442 -0
  996. package/Utils/AiRemediation/Resource/OpenStackChangeReach.mjs +12 -0
  997. package/Utils/AiRemediation/Resource/OpenStackCommandPolicy.d.mts +124 -0
  998. package/Utils/AiRemediation/Resource/OpenStackCommandPolicy.d.ts +124 -0
  999. package/Utils/AiRemediation/Resource/OpenStackCommandPolicy.js +2146 -0
  1000. package/Utils/AiRemediation/Resource/OpenStackCommandPolicy.mjs +21 -0
  1001. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +33 -4
  1002. package/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.d.mts +4 -0
  1003. package/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.d.ts +4 -0
  1004. package/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.js +3 -1
  1005. package/Utils/AiRemediation/Resource/ResourceOutputRedactor.js +178 -0
  1006. package/Utils/CronTime.d.mts +1 -0
  1007. package/Utils/CronTime.d.ts +1 -0
  1008. package/Utils/CronTime.js +2 -1
  1009. package/Utils/CronTime.mjs +1 -0
  1010. package/Utils/DeveloperDocs/ResourceProfiles.js +27 -0
  1011. package/Utils/DeveloperDocs/TerraformMonitorSteps.js +1 -0
  1012. package/Utils/DeveloperDocs/TerraformSchema.js +1 -0
  1013. package/Utils/HostCollector/HostCollectorDefaultConfig.d.mts +4 -0
  1014. package/Utils/HostCollector/HostCollectorDefaultConfig.d.ts +4 -0
  1015. package/Utils/HostCollector/HostCollectorDefaultConfig.js +36 -1
  1016. package/Utils/HostCollector/HostCollectorDefaultConfig.mjs +1 -0
  1017. package/Utils/LabelRuleImportExport.js +5 -0
  1018. package/Utils/Metrics/MetricForecast.d.mts +69 -0
  1019. package/Utils/Metrics/MetricForecast.d.ts +69 -0
  1020. package/Utils/Metrics/MetricForecast.js +148 -0
  1021. package/Utils/Metrics/MetricForecast.mjs +2 -0
  1022. package/Utils/Metrics/MetricInsight.d.mts +46 -1
  1023. package/Utils/Metrics/MetricInsight.d.ts +46 -1
  1024. package/Utils/Metrics/MetricInsight.js +410 -17
  1025. package/Utils/Metrics/MetricInsight.mjs +19 -0
  1026. package/Utils/Metrics/MetricSeriesArrivalUtil.d.mts +20 -0
  1027. package/Utils/Metrics/MetricSeriesArrivalUtil.d.ts +20 -0
  1028. package/Utils/Metrics/MetricSeriesArrivalUtil.js +80 -0
  1029. package/Utils/Metrics/MetricSeriesArrivalUtil.mjs +2 -0
  1030. package/Utils/Metrics/SpanMetricsCollectorStep.d.mts +10 -0
  1031. package/Utils/Metrics/SpanMetricsCollectorStep.d.ts +10 -0
  1032. package/Utils/Metrics/SpanMetricsCollectorStep.js +87 -0
  1033. package/Utils/Metrics/SpanMetricsCollectorStep.mjs +11 -0
  1034. package/Utils/Monitor/MonitorDependencyRule.d.mts +7 -0
  1035. package/Utils/Monitor/MonitorDependencyRule.d.ts +7 -0
  1036. package/Utils/Monitor/MonitorDependencyRule.js +21 -0
  1037. package/Utils/Monitor/MonitorOverviewFamily.js +1 -0
  1038. package/Utils/Monitor/PlatformMetricUnitUtil.d.mts +1 -1
  1039. package/Utils/Monitor/PlatformMetricUnitUtil.d.ts +1 -1
  1040. package/Utils/Monitor/PlatformMetricUnitUtil.js +14 -9
  1041. package/Utils/Monitor/PlatformResourceIdentity.d.mts +9 -1
  1042. package/Utils/Monitor/PlatformResourceIdentity.d.ts +9 -1
  1043. package/Utils/Monitor/PlatformResourceIdentity.js +58 -0
  1044. package/Utils/Monitor/ResourceHeartbeat.d.mts +10 -0
  1045. package/Utils/Monitor/ResourceHeartbeat.d.ts +10 -0
  1046. package/Utils/Monitor/ResourceHeartbeat.js +80 -0
  1047. package/Utils/Monitor/ResourceHeartbeat.mjs +2 -0
  1048. package/Utils/Monitor/TelemetryMonitorWindow.js +8 -6
  1049. package/Utils/OpenStack/OpenStackAuthUrl.d.mts +25 -0
  1050. package/Utils/OpenStack/OpenStackAuthUrl.d.ts +25 -0
  1051. package/Utils/OpenStack/OpenStackAuthUrl.js +193 -0
  1052. package/Utils/OpenStack/OpenStackAuthUrl.mjs +3 -0
  1053. package/Utils/OpenStack/OpenStackCheckFindings.d.mts +21 -0
  1054. package/Utils/OpenStack/OpenStackCheckFindings.d.ts +21 -0
  1055. package/Utils/OpenStack/OpenStackCheckFindings.js +199 -0
  1056. package/Utils/OpenStack/OpenStackCheckFindings.mjs +4 -0
  1057. package/Utils/OpenStack/OpenStackCheckMetrics.d.mts +46 -0
  1058. package/Utils/OpenStack/OpenStackCheckMetrics.d.ts +46 -0
  1059. package/Utils/OpenStack/OpenStackCheckMetrics.js +325 -0
  1060. package/Utils/OpenStack/OpenStackCheckMetrics.mjs +11 -0
  1061. package/Utils/OpenStack/OpenStackCheckName.d.mts +21 -0
  1062. package/Utils/OpenStack/OpenStackCheckName.d.ts +21 -0
  1063. package/Utils/OpenStack/OpenStackCheckName.js +163 -0
  1064. package/Utils/OpenStack/OpenStackCheckName.mjs +8 -0
  1065. package/Utils/OpenStack/OpenStackCheckSettings.d.mts +87 -0
  1066. package/Utils/OpenStack/OpenStackCheckSettings.d.ts +87 -0
  1067. package/Utils/OpenStack/OpenStackCheckSettings.js +556 -0
  1068. package/Utils/OpenStack/OpenStackCheckSettings.mjs +8 -0
  1069. package/Utils/OpenStack/OpenStackCollectionSettings.d.mts +83 -0
  1070. package/Utils/OpenStack/OpenStackCollectionSettings.d.ts +83 -0
  1071. package/Utils/OpenStack/OpenStackCollectionSettings.js +360 -0
  1072. package/Utils/OpenStack/OpenStackCollectionSettings.mjs +13 -0
  1073. package/Utils/OpenStack/OpenStackLogScrub.d.mts +6 -0
  1074. package/Utils/OpenStack/OpenStackLogScrub.d.ts +6 -0
  1075. package/Utils/OpenStack/OpenStackLogScrub.js +835 -0
  1076. package/Utils/OpenStack/OpenStackLogScrub.mjs +5 -0
  1077. package/Utils/OpenStack/OpenStackLogs.d.mts +75 -0
  1078. package/Utils/OpenStack/OpenStackLogs.d.ts +75 -0
  1079. package/Utils/OpenStack/OpenStackLogs.js +1108 -0
  1080. package/Utils/OpenStack/OpenStackLogs.mjs +17 -0
  1081. package/Utils/OpenStack/OpenStackNotifications.d.mts +74 -0
  1082. package/Utils/OpenStack/OpenStackNotifications.d.ts +74 -0
  1083. package/Utils/OpenStack/OpenStackNotifications.js +811 -0
  1084. package/Utils/OpenStack/OpenStackNotifications.mjs +12 -0
  1085. package/Utils/OpenStack/OpenStackPartLogFacts.d.mts +12 -0
  1086. package/Utils/OpenStack/OpenStackPartLogFacts.d.ts +12 -0
  1087. package/Utils/OpenStack/OpenStackPartLogFacts.js +126 -0
  1088. package/Utils/OpenStack/OpenStackPartLogFacts.mjs +5 -0
  1089. package/Utils/OpenStack/OpenStackProjectNoticeText.d.mts +23 -0
  1090. package/Utils/OpenStack/OpenStackProjectNoticeText.d.ts +23 -0
  1091. package/Utils/OpenStack/OpenStackProjectNoticeText.js +175 -0
  1092. package/Utils/OpenStack/OpenStackProjectNoticeText.mjs +2 -0
  1093. package/Utils/OpenStack/OpenStackRequestTrail.d.mts +38 -0
  1094. package/Utils/OpenStack/OpenStackRequestTrail.d.ts +38 -0
  1095. package/Utils/OpenStack/OpenStackRequestTrail.js +162 -0
  1096. package/Utils/OpenStack/OpenStackRequestTrail.mjs +6 -0
  1097. package/Utils/OpenStack/OpenStackTraceLogs.d.mts +31 -0
  1098. package/Utils/OpenStack/OpenStackTraceLogs.d.ts +31 -0
  1099. package/Utils/OpenStack/OpenStackTraceLogs.js +177 -0
  1100. package/Utils/OpenStack/OpenStackTraceLogs.mjs +3 -0
  1101. package/Utils/OpenStack/OpenStackTraces.d.mts +154 -0
  1102. package/Utils/OpenStack/OpenStackTraces.d.ts +154 -0
  1103. package/Utils/OpenStack/OpenStackTraces.js +1169 -0
  1104. package/Utils/OpenStack/OpenStackTraces.mjs +52 -0
  1105. package/Utils/Realtime.d.mts +1 -0
  1106. package/Utils/Realtime.d.ts +1 -0
  1107. package/Utils/Realtime.js +17 -0
  1108. package/Utils/Schema/MonitorSchemas.js +5 -0
  1109. package/Utils/SecurityCase/SecurityCaseMarkdown.js +1 -0
  1110. package/Utils/SecurityCase/SecurityConnectionMatch.js +1 -0
  1111. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.mts +2 -0
  1112. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.ts +2 -0
  1113. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.js +22 -0
  1114. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.mjs +2 -0
  1115. package/Utils/SecurityEvent/LogParsers/CiscoAsaLogParser.d.mts +41 -0
  1116. package/Utils/SecurityEvent/LogParsers/CiscoAsaLogParser.d.ts +41 -0
  1117. package/Utils/SecurityEvent/LogParsers/CiscoAsaLogParser.js +535 -0
  1118. package/Utils/SecurityEvent/LogParsers/CiscoAsaLogParser.mjs +11 -0
  1119. package/Utils/SecurityEvent/LogParsers/FortiGateLogParser.d.mts +26 -0
  1120. package/Utils/SecurityEvent/LogParsers/FortiGateLogParser.d.ts +26 -0
  1121. package/Utils/SecurityEvent/LogParsers/FortiGateLogParser.js +378 -0
  1122. package/Utils/SecurityEvent/LogParsers/FortiGateLogParser.mjs +10 -0
  1123. package/Utils/SecurityEvent/LogParsers/OpenStackAuditLogParser.d.mts +62 -0
  1124. package/Utils/SecurityEvent/LogParsers/OpenStackAuditLogParser.d.ts +62 -0
  1125. package/Utils/SecurityEvent/LogParsers/OpenStackAuditLogParser.js +831 -0
  1126. package/Utils/SecurityEvent/LogParsers/OpenStackAuditLogParser.mjs +15 -0
  1127. package/Utils/SecurityEvent/LogParsers/PaloAltoLogParser.d.mts +38 -0
  1128. package/Utils/SecurityEvent/LogParsers/PaloAltoLogParser.d.ts +38 -0
  1129. package/Utils/SecurityEvent/LogParsers/PaloAltoLogParser.js +676 -0
  1130. package/Utils/SecurityEvent/LogParsers/PaloAltoLogParser.mjs +12 -0
  1131. package/Utils/SecurityEvent/LogParsers/SecurityLogParser.js +33 -0
  1132. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.js +5 -1
  1133. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.mts +6 -0
  1134. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.ts +6 -0
  1135. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.js +355 -5
  1136. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.mjs +2 -0
  1137. package/Utils/SecurityEvent/SecurityEventSearch.d.mts +6 -3
  1138. package/Utils/SecurityEvent/SecurityEventSearch.d.ts +6 -3
  1139. package/Utils/SecurityEvent/SecurityEventSearch.js +39 -2
  1140. package/Utils/SecurityEvent/SecurityEventSearch.mjs +1 -0
  1141. package/Utils/SecurityEvent/SecurityHuntSearch.d.mts +1 -0
  1142. package/Utils/SecurityEvent/SecurityHuntSearch.d.ts +1 -0
  1143. package/Utils/SecurityEvent/SecurityHuntSearch.js +17 -0
  1144. package/Utils/SecurityEvent/SecurityHuntSearch.mjs +1 -0
  1145. package/Utils/Telemetry/ChangeEventFields.d.mts +16 -1
  1146. package/Utils/Telemetry/ChangeEventFields.d.ts +16 -1
  1147. package/Utils/Telemetry/ChangeEventFields.js +47 -1
  1148. package/Utils/Telemetry/ChangeEventFields.mjs +1 -0
  1149. package/Utils/Telemetry/CloudChangeTitle.d.mts +30 -0
  1150. package/Utils/Telemetry/CloudChangeTitle.d.ts +30 -0
  1151. package/Utils/Telemetry/CloudChangeTitle.js +148 -0
  1152. package/Utils/Telemetry/CloudChangeTitle.mjs +8 -0
  1153. package/Utils/Telemetry/EntityKey.d.mts +23 -0
  1154. package/Utils/Telemetry/EntityKey.d.ts +23 -0
  1155. package/Utils/Telemetry/EntityKey.js +46 -0
  1156. package/Utils/Telemetry/EntityKey.mjs +3 -0
  1157. package/Utils/Telemetry/EntityRelationship.js +10 -0
  1158. package/Utils/Telemetry/SavedViewScope.d.mts +2 -0
  1159. package/Utils/Telemetry/SavedViewScope.d.ts +2 -0
  1160. package/Utils/Telemetry/SavedViewScope.js +4 -0
  1161. package/Utils/ValueFormatter.d.mts +1 -0
  1162. package/Utils/ValueFormatter.d.ts +1 -0
  1163. package/Utils/ValueFormatter.js +11 -0
  1164. package/Utils/Workspace/WorkspaceChannelName.d.mts +4 -0
  1165. package/Utils/Workspace/WorkspaceChannelName.d.ts +4 -0
  1166. package/Utils/Workspace/WorkspaceChannelName.js +69 -9
  1167. package/package.json +1 -1
@@ -0,0 +1,3558 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OPENSTACK_ANCHOR_METRIC_ALIAS = exports.OPENSTACK_API_UP_METRIC_BY_SERVICE = exports.OPENSTACK_WINDOW_BY_SERVICE = void 0;
7
+ exports.buildOpenStackMonitorStep = buildOpenStackMonitorStep;
8
+ exports.buildOpenStackMonitorConfig = buildOpenStackMonitorConfig;
9
+ exports.buildOpenStackSeriesConfig = buildOpenStackSeriesConfig;
10
+ exports.buildOfflineCriteria = buildOfflineCriteria;
11
+ exports.getAllOpenStackAlertTemplates = getAllOpenStackAlertTemplates;
12
+ exports.getOpenStackAlertTemplatesForCloud = getOpenStackAlertTemplatesForCloud;
13
+ exports.getOpenStackAlertTemplatesByCategory = getOpenStackAlertTemplatesByCategory;
14
+ exports.getOpenStackAlertTemplateById = getOpenStackAlertTemplateById;
15
+ exports.getOpenStackDefaultAlertTemplateId = getOpenStackDefaultAlertTemplateId;
16
+ const ObjectID_1 = __importDefault(require("../ObjectID"));
17
+ const MonitorStep_1 = __importDefault(require("./MonitorStep"));
18
+ const MonitorCriteria_1 = __importDefault(require("./MonitorCriteria"));
19
+ const RecommendationCriteriaBuilder_1 = require("./Recommendation/RecommendationCriteriaBuilder");
20
+ const FilterCondition_1 = __importDefault(require("../Filter/FilterCondition"));
21
+ const CriteriaFilter_1 = require("./CriteriaFilter");
22
+ const MonitorStepOpenStackMonitor_1 = require("./MonitorStepOpenStackMonitor");
23
+ const RollingTime_1 = __importDefault(require("../RollingTime/RollingTime"));
24
+ const MetricsAggregationType_1 = __importDefault(require("../Metrics/MetricsAggregationType"));
25
+ const OpenStackHealthRules_1 = require("../OpenStack/OpenStackHealthRules");
26
+ const OpenStackCapacitySeries_1 = require("../OpenStack/OpenStackCapacitySeries");
27
+ const OpenStackInstanceMetrics_1 = require("../OpenStack/OpenStackInstanceMetrics");
28
+ const OpenStackControlPlaneAlertTemplates_1 = require("./OpenStackControlPlaneAlertTemplates");
29
+ const OpenStackCheck_1 = require("../OpenStack/OpenStackCheck");
30
+ const OpenStackCheckMetrics_1 = require("../../Utils/OpenStack/OpenStackCheckMetrics");
31
+ const OpenStackResourceKind_1 = require("../OpenStack/OpenStackResourceKind");
32
+ const OpenStackControlPlane_1 = require("../OpenStack/OpenStackControlPlane");
33
+ const OpenStackOptionalServices_1 = require("../OpenStack/OpenStackOptionalServices");
34
+ /*
35
+ * WHERE THESE COME FROM, AND WHERE THEY DIFFER. The rules operators already run,
36
+ * from StackHPC, Atmosphere, Canonical and MOSK (Kolla-Ansible ships none):
37
+ *
38
+ * - Worker down: all four have it. Atmosphere fires on any worker `!= 1`, so on
39
+ * one someone disabled too, and StackHPC by name across every *_state series.
40
+ * Canonical filters adminState, which is what these do. They wait 15, 1 and 5
41
+ * minutes; here it is three collections.
42
+ * - Every worker of a kind down: MOSK's Outage rules, kept for the scheduler and
43
+ * conductor, where one host down is a Warning and all of them the outage. MOSK
44
+ * also grades one Cinder service a Warning, until half are down. Here it stays
45
+ * Critical: no Outage template stands behind it, and a backend's one
46
+ * cinder-volume going down is that backend's outage.
47
+ * - Disabled: MOSK pages when a binary is disabled on every host. Here a worker's
48
+ * own template never fires on one someone disabled. Whether that was planned is
49
+ * Compute Service Disabled's to say: a maintenance event on the host quiets it,
50
+ * and without one it pages. The pages warn once a disable has lasted a week.
51
+ * - Instance in error: Atmosphere waits 24 hours per instance, because a failed
52
+ * boot is often a project's own. Here one incident per region, after 10 minutes.
53
+ * - Stuck: Atmosphere's task state and build request series are not series this
54
+ * exporter has. Here the status word, for the hour the pages also call stuck.
55
+ * MOSK waits 30 minutes on VERIFY_RESIZE: the same line as the other words here.
56
+ * - Router agents: StackHPC's `count(active) != 1` never fires on no active agent,
57
+ * since a count of nothing is nothing. So no alive agent reads the alive value
58
+ * instead, and two active ones stay a count, as Atmosphere's do.
59
+ * - Address pools: Atmosphere warns at 80% for 6 hours on external, shared networks.
60
+ * Here the pages' own 90% and 100%, on external networks.
61
+ * - Metrics missing: Canonical has an absent() rule per service, which on a cloud
62
+ * without that service never clears. Here only Keystone and Nova's API read an
63
+ * empty collection as down; a silent cloud is Cloud Stopped Reporting. A service a
64
+ * cloud may not run has no such read at all: Bare Metal API Down has what it says.
65
+ *
66
+ * WHAT THESE TEMPLATES HOLD THEMSELVES TO, each with a test over every template
67
+ * (Tests/Types/Monitor/OpenStackAlertTemplates.test.ts). They are the findings of
68
+ * the resource-monitoring audit (#5433), which found templates that never
69
+ * recovered, watched the wrong state, read too short a window and added up scrapes.
70
+ *
71
+ * Reads a window of at least three collections. The agent collects compute,
72
+ * network, volume and placement every 2 minutes and identity and image every 5, so
73
+ * a compute template reads 10 minutes (the next window after 6 that a monitor
74
+ * offers) and an identity one 15. "All Values" needs them: with fewer, a window is
75
+ * too short to show how often a series reports (MetricWindowCoverage).
76
+ *
77
+ * Reads a label for a state, never a value. openstack-exporter's status series
78
+ * carry a numeric code (ERROR is 4), so a template filters on the `status` word.
79
+ *
80
+ * Never fires on what someone disabled. A worker's template filters on adminState:
81
+ * enabled on Nova and Cinder, up on Neutron. Only Compute Service Disabled reads the
82
+ * other side, and it asks whether anyone planned it.
83
+ *
84
+ * Never adds up. Up, alive and state series read Min (any one down reads 0), counts
85
+ * read Max, and Count only counts rows where a scrape writes one row per thing
86
+ * (one per minute, at most, since a collection takes at least 2 minutes).
87
+ *
88
+ * Recovers when its series goes away. A status series exists only while something
89
+ * is in that status, and disabling a worker takes it out of the adminState filter,
90
+ * so nothing would ever read as recovered: #5433 found incidents stuck open that
91
+ * way, because silence no longer closes one. Recovery counts a gone series as
92
+ * recovered, and every step reads its service's own `_up` series beside it (the
93
+ * ANCHOR below), for two reasons:
94
+ *
95
+ * - A grouped monitor acts on the series it was handed. With every series of a
96
+ * query gone it has none, and MonitorCriteriaEvaluator calls a criteria no
97
+ * series satisfied not met. So the last instance in ERROR going away would
98
+ * leave its incident open for ever. The anchor keeps a series in the window.
99
+ * - Silence still is not recovery (MonitorResourceUtil
100
+ * .isSilentInfrastructureWindow). When the agent stops, or the exporter cannot
101
+ * log in to Keystone, the anchor goes too, the window is silent and open
102
+ * incidents stay open: Cloud Stopped Reporting is the one speaking then.
103
+ */
104
+ /*
105
+ * What one incident is about: the labels a template groups by. All are datapoint
106
+ * labels, so none is `resource.`-prefixed in ClickHouse.
107
+ */
108
+ const REGION = MonitorStepOpenStackMonitor_1.OPENSTACK_REGION_ATTRIBUTE;
109
+ const SERVICE_JOB = "openstack_service";
110
+ // A worker: its host and binary. A host name can repeat between regions.
111
+ const WORKER_GROUP = [REGION, "hostname", "service"];
112
+ // An API, or a count the exporter only keeps per region.
113
+ const API_GROUP = [REGION, SERVICE_JOB];
114
+ const HYPERVISOR_GROUP = [REGION, "hostname"];
115
+ const INSTANCE_GROUP = [REGION, "uuid", "name"];
116
+ const VOLUME_GROUP = [REGION, "id", "name", "volume_type"];
117
+ const IMAGE_GROUP = [REGION, "id", "name"];
118
+ const STACK_GROUP = [REGION, "id", "name"];
119
+ const CONTAINER_CLUSTER_GROUP = [REGION, "uuid", "name"];
120
+ const STORAGE_POOL_GROUP = [
121
+ REGION,
122
+ "name",
123
+ "volume_backend_name",
124
+ ];
125
+ const ROUTER_GROUP = [REGION, "router_id"];
126
+ const NETWORK_GROUP = [REGION, "network_id", "network_name"];
127
+ const PROJECT_GROUP = [REGION, "tenant_id", "tenant"];
128
+ // A node's id is what it is, and its name what a person calls it, which Ironic does not require.
129
+ const BARE_METAL_NODE_GROUP = [REGION, "id", "name"];
130
+ const SHARE_GROUP = [REGION, "id", "name"];
131
+ const LOAD_BALANCER_GROUP = [REGION, "id", "name"];
132
+ const AMPHORA_GROUP = [REGION, "id", "loadbalancer_id"];
133
+ const DATABASE_INSTANCE_GROUP = [REGION, "id", "name"];
134
+ const OBJECT_CONTAINER_GROUP = [
135
+ REGION,
136
+ "tenant_id",
137
+ "container_name",
138
+ ];
139
+ const DNS_ZONE_GROUP = [REGION, "id", "name"];
140
+ // One incident per zone, however many of its recordsets went wrong together.
141
+ const DNS_ZONE_OF_RECORDSET_GROUP = [
142
+ REGION,
143
+ "zone_id",
144
+ "zone_name",
145
+ ];
146
+ // The smallest window holding three collections of what a service's job collects.
147
+ exports.OPENSTACK_WINDOW_BY_SERVICE = {
148
+ [OpenStackResourceKind_1.OpenStackServiceType.Identity]: RollingTime_1.default.Past15Minutes,
149
+ [OpenStackResourceKind_1.OpenStackServiceType.Image]: RollingTime_1.default.Past15Minutes,
150
+ [OpenStackResourceKind_1.OpenStackServiceType.Compute]: RollingTime_1.default.Past10Minutes,
151
+ [OpenStackResourceKind_1.OpenStackServiceType.Network]: RollingTime_1.default.Past10Minutes,
152
+ [OpenStackResourceKind_1.OpenStackServiceType.Volume]: RollingTime_1.default.Past10Minutes,
153
+ [OpenStackResourceKind_1.OpenStackServiceType.Placement]: RollingTime_1.default.Past10Minutes,
154
+ // The agent asks about the services a cloud may not run every five minutes.
155
+ [OpenStackResourceKind_1.OpenStackServiceType.Orchestration]: RollingTime_1.default.Past15Minutes,
156
+ [OpenStackResourceKind_1.OpenStackServiceType.ContainerInfra]: RollingTime_1.default.Past15Minutes,
157
+ [OpenStackResourceKind_1.OpenStackServiceType.Rating]: RollingTime_1.default.Past15Minutes,
158
+ [OpenStackResourceKind_1.OpenStackServiceType.BareMetal]: RollingTime_1.default.Past15Minutes,
159
+ [OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems]: RollingTime_1.default.Past15Minutes,
160
+ [OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer]: RollingTime_1.default.Past15Minutes,
161
+ [OpenStackResourceKind_1.OpenStackServiceType.Database]: RollingTime_1.default.Past15Minutes,
162
+ [OpenStackResourceKind_1.OpenStackServiceType.KeyManager]: RollingTime_1.default.Past15Minutes,
163
+ [OpenStackResourceKind_1.OpenStackServiceType.ObjectStore]: RollingTime_1.default.Past15Minutes,
164
+ [OpenStackResourceKind_1.OpenStackServiceType.Metric]: RollingTime_1.default.Past15Minutes,
165
+ [OpenStackResourceKind_1.OpenStackServiceType.Dns]: RollingTime_1.default.Past15Minutes,
166
+ };
167
+ exports.OPENSTACK_API_UP_METRIC_BY_SERVICE = {
168
+ [OpenStackResourceKind_1.OpenStackServiceType.Identity]: "openstack_identity_up",
169
+ [OpenStackResourceKind_1.OpenStackServiceType.Compute]: "openstack_nova_up",
170
+ [OpenStackResourceKind_1.OpenStackServiceType.Placement]: "openstack_placement_up",
171
+ [OpenStackResourceKind_1.OpenStackServiceType.Network]: "openstack_neutron_up",
172
+ [OpenStackResourceKind_1.OpenStackServiceType.Volume]: "openstack_cinder_up",
173
+ [OpenStackResourceKind_1.OpenStackServiceType.Image]: "openstack_glance_up",
174
+ [OpenStackResourceKind_1.OpenStackServiceType.Orchestration]: "openstack_heat_up",
175
+ [OpenStackResourceKind_1.OpenStackServiceType.ContainerInfra]: "openstack_container_infra_up",
176
+ [OpenStackResourceKind_1.OpenStackServiceType.Rating]: "openstack_cloudkitty_up",
177
+ [OpenStackResourceKind_1.OpenStackServiceType.BareMetal]: "openstack_ironic_up",
178
+ [OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems]: "openstack_sharev2_up",
179
+ [OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer]: "openstack_loadbalancer_up",
180
+ [OpenStackResourceKind_1.OpenStackServiceType.Database]: "openstack_trove_up",
181
+ [OpenStackResourceKind_1.OpenStackServiceType.KeyManager]: "openstack_barbican_up",
182
+ [OpenStackResourceKind_1.OpenStackServiceType.ObjectStore]: "openstack_object_store_up",
183
+ [OpenStackResourceKind_1.OpenStackServiceType.Metric]: "openstack_gnocchi_up",
184
+ [OpenStackResourceKind_1.OpenStackServiceType.Dns]: "openstack_designate_up",
185
+ };
186
+ /*
187
+ * The query that keeps a grouped step's window from reading as silent while the
188
+ * service still reports: see the top of this file. No criteria compares it.
189
+ */
190
+ exports.OPENSTACK_ANCHOR_METRIC_ALIAS = "service_reporting";
191
+ /*
192
+ * The windows a monitor offers, in minutes, for a line a health rule draws in
193
+ * minutes: so changing the rule moves the template with it.
194
+ */
195
+ const WINDOWS_IN_MINUTES = [
196
+ { minutes: 5, rollingTime: RollingTime_1.default.Past5Minutes },
197
+ { minutes: 10, rollingTime: RollingTime_1.default.Past10Minutes },
198
+ { minutes: 15, rollingTime: RollingTime_1.default.Past15Minutes },
199
+ { minutes: 30, rollingTime: RollingTime_1.default.Past30Minutes },
200
+ { minutes: 60, rollingTime: RollingTime_1.default.Past1Hour },
201
+ { minutes: 120, rollingTime: RollingTime_1.default.Past2Hours },
202
+ { minutes: 180, rollingTime: RollingTime_1.default.Past3Hours },
203
+ { minutes: 360, rollingTime: RollingTime_1.default.Past6Hours },
204
+ { minutes: 720, rollingTime: RollingTime_1.default.Past12Hours },
205
+ { minutes: 7 * 24 * 60, rollingTime: RollingTime_1.default.Past7Days },
206
+ ];
207
+ function windowHolding(minutes) {
208
+ for (const window of WINDOWS_IN_MINUTES) {
209
+ if (window.minutes >= minutes) {
210
+ return window.rollingTime;
211
+ }
212
+ }
213
+ return RollingTime_1.default.Past7Days;
214
+ }
215
+ /*
216
+ * A grouped step's anchor says how often its service is collected, which its own series can't when
217
+ * they come and go. One per status word exists only while something has that status, so the first
218
+ * thing seen in that status, or the only thing, has one data point and nothing beside it to say
219
+ * that it isn't all a window ever holds. Anything on its way to something else is seen that way.
220
+ */
221
+ function readCadenceFromAnchor(args) {
222
+ var _a;
223
+ const hasAnchor = args.openstackMonitor.metricViewConfig.queryConfigs.some((query) => {
224
+ var _a;
225
+ return (((_a = query.metricAliasData) === null || _a === void 0 ? void 0 : _a.metricVariable) ===
226
+ exports.OPENSTACK_ANCHOR_METRIC_ALIAS);
227
+ });
228
+ if (!hasAnchor) {
229
+ return;
230
+ }
231
+ for (const instance of args.instances) {
232
+ for (const filter of ((_a = instance.data) === null || _a === void 0 ? void 0 : _a.filters) || []) {
233
+ filter.metricMonitorOptions = Object.assign(Object.assign({}, filter.metricMonitorOptions), { cadenceMetricAlias: exports.OPENSTACK_ANCHOR_METRIC_ALIAS });
234
+ }
235
+ }
236
+ }
237
+ function buildOpenStackMonitorStep(args) {
238
+ readCadenceFromAnchor({
239
+ openstackMonitor: args.openstackMonitor,
240
+ instances: [args.offlineCriteriaInstance, args.onlineCriteriaInstance],
241
+ });
242
+ const monitorStep = new MonitorStep_1.default();
243
+ const monitorCriteria = new MonitorCriteria_1.default();
244
+ monitorCriteria.data = {
245
+ monitorCriteriaInstanceArray: [
246
+ args.offlineCriteriaInstance,
247
+ args.onlineCriteriaInstance,
248
+ ],
249
+ };
250
+ monitorStep.data = {
251
+ id: ObjectID_1.default.generate().toString(),
252
+ monitorDestination: undefined,
253
+ doNotFollowRedirects: undefined,
254
+ monitorDestinationPort: undefined,
255
+ monitorCriteria: monitorCriteria,
256
+ requestType: "GET",
257
+ requestHeaders: undefined,
258
+ requestBody: undefined,
259
+ customCode: undefined,
260
+ screenSizeTypes: undefined,
261
+ browserTypes: undefined,
262
+ retryCountOnError: undefined,
263
+ logMonitor: undefined,
264
+ traceMonitor: undefined,
265
+ metricMonitor: undefined,
266
+ exceptionMonitor: undefined,
267
+ snmpMonitor: undefined,
268
+ dnsMonitor: undefined,
269
+ domainMonitor: undefined,
270
+ externalStatusPageMonitor: undefined,
271
+ kubernetesMonitor: undefined,
272
+ profileMonitor: undefined,
273
+ dockerMonitor: undefined,
274
+ openstackMonitor: args.openstackMonitor,
275
+ };
276
+ return monitorStep;
277
+ }
278
+ // One metric read for one alias, as a form's custom metric reads it.
279
+ function buildOpenStackMonitorConfig(args) {
280
+ return buildOpenStackSeriesConfig({
281
+ cloudIdentifier: args.cloudIdentifier,
282
+ queries: [
283
+ {
284
+ alias: args.metricAlias,
285
+ metricName: args.metricName,
286
+ aggregationType: args.aggregationType,
287
+ attributes: args.attributes,
288
+ },
289
+ ],
290
+ rollingTime: args.rollingTime,
291
+ groupByAttributeKeys: args.groupByAttributeKeys,
292
+ });
293
+ }
294
+ function buildOpenStackSeriesConfig(args) {
295
+ const anchorMetricName = args.anchorMetricName ||
296
+ (args.anchorService
297
+ ? exports.OPENSTACK_API_UP_METRIC_BY_SERVICE[args.anchorService]
298
+ : undefined);
299
+ const queries = anchorMetricName
300
+ ? [
301
+ ...args.queries,
302
+ {
303
+ alias: exports.OPENSTACK_ANCHOR_METRIC_ALIAS,
304
+ metricName: anchorMetricName,
305
+ aggregationType: MetricsAggregationType_1.default.Min,
306
+ },
307
+ ]
308
+ : args.queries;
309
+ return {
310
+ cloudIdentifier: args.cloudIdentifier,
311
+ resourceFilters: {},
312
+ metricViewConfig: {
313
+ queryConfigs: queries.map((query) => {
314
+ return {
315
+ metricAliasData: {
316
+ metricVariable: query.alias,
317
+ title: query.alias,
318
+ description: query.alias,
319
+ legend: query.alias,
320
+ legendUnit: undefined,
321
+ },
322
+ metricQueryData: Object.assign({ filterData: {
323
+ metricName: query.metricName,
324
+ attributes: query.attributes || {},
325
+ aggegationType: query.aggregationType,
326
+ aggregateBy: {},
327
+ } }, (args.groupByAttributeKeys &&
328
+ args.groupByAttributeKeys.length > 0
329
+ ? { groupByAttributeKeys: args.groupByAttributeKeys }
330
+ : {})),
331
+ };
332
+ }),
333
+ formulaConfigs: (args.formulas || []).map((formula) => {
334
+ return {
335
+ metricAliasData: {
336
+ metricVariable: formula.alias,
337
+ title: formula.legend,
338
+ description: formula.legend,
339
+ legend: formula.legend,
340
+ legendUnit: formula.legendUnit,
341
+ },
342
+ metricFormulaData: {
343
+ metricFormula: formula.formula,
344
+ },
345
+ };
346
+ }),
347
+ },
348
+ rollingTime: args.rollingTime,
349
+ };
350
+ }
351
+ /*
352
+ * A gone series reads as recovered when the recovery compares a floor: `>= 1` on
353
+ * no data has nothing to compare, and treating no data as 0 would read as down. So
354
+ * its no-data policy says the comparison holds. A criteria that matches on no data
355
+ * is safe here for the reason at the top of this file: this one only ever matches
356
+ * while the anchor keeps the window from being silent.
357
+ */
358
+ function countGoneSeriesAsRecovered(instance) {
359
+ var _a;
360
+ for (const filter of (((_a = instance.data) === null || _a === void 0 ? void 0 : _a.filters) ||
361
+ [])) {
362
+ filter.metricMonitorOptions = Object.assign(Object.assign({}, filter.metricMonitorOptions), { onNoDataPolicy: CriteriaFilter_1.NoDataPolicy.Trigger });
363
+ }
364
+ return instance;
365
+ }
366
+ function buildOfflineCriteria(data) {
367
+ const args = data.notification.args;
368
+ return (0, RecommendationCriteriaBuilder_1.buildUnhealthyCriteriaInstance)({
369
+ offlineMonitorStatusId: args.offlineMonitorStatusId,
370
+ incidentSeverityId: args.defaultIncidentSeverityId,
371
+ alertSeverityId: args.defaultAlertSeverityId,
372
+ monitorName: args.monitorName,
373
+ metricAlias: data.metricAlias,
374
+ filterType: data.filterType,
375
+ value: data.value,
376
+ additionalFilters: data.additionalFilters,
377
+ filterCondition: data.filterCondition,
378
+ forecast: data.forecast,
379
+ incidentTitle: `${data.notification.incidentTitle} - ${args.monitorName}`,
380
+ incidentDescription: data.notification.incidentDescription,
381
+ criteriaName: data.notification.criteriaName,
382
+ criteriaDescription: data.notification.criteriaDescription,
383
+ resourceNoun: "OpenStack cloud",
384
+ });
385
+ }
386
+ /*
387
+ * A step whose series should read 1: an API or worker that is up, an agent alive.
388
+ * Fires when ANY of its aliases reads below 1 for the whole window; recovers when
389
+ * EVERY one reads 1 or has gone away.
390
+ */
391
+ function buildFloorStep(data) {
392
+ var _a;
393
+ const [firstQuery, ...otherQueries] = data.queries;
394
+ const value = (_a = data.value) !== null && _a !== void 0 ? _a : 1;
395
+ return buildOpenStackMonitorStep({
396
+ openstackMonitor: buildOpenStackSeriesConfig({
397
+ cloudIdentifier: data.args.cloudIdentifier,
398
+ queries: data.queries,
399
+ rollingTime: data.rollingTime || exports.OPENSTACK_WINDOW_BY_SERVICE[data.service],
400
+ groupByAttributeKeys: data.groupByAttributeKeys,
401
+ anchorService: data.hasOwnAnchor ? undefined : data.service,
402
+ anchorMetricName: data.hasOwnAnchor ? undefined : data.anchorMetricName,
403
+ }),
404
+ offlineCriteriaInstance: buildOfflineCriteria({
405
+ notification: Object.assign({ args: data.args }, data.words),
406
+ metricAlias: firstQuery.alias,
407
+ filterType: CriteriaFilter_1.FilterType.LessThan,
408
+ value: value,
409
+ additionalFilters: otherQueries.map((query) => {
410
+ return {
411
+ metricAlias: query.alias,
412
+ filterType: CriteriaFilter_1.FilterType.LessThan,
413
+ value: 1,
414
+ };
415
+ }),
416
+ }),
417
+ onlineCriteriaInstance: countGoneSeriesAsRecovered((0, RecommendationCriteriaBuilder_1.buildHealthyCriteriaInstance)({
418
+ onlineMonitorStatusId: data.args.onlineMonitorStatusId,
419
+ metricAlias: firstQuery.alias,
420
+ filterType: CriteriaFilter_1.FilterType.GreaterThanOrEqualTo,
421
+ value: value,
422
+ // These series are 0 or 1: a dead band above 1 could never be crossed.
423
+ isBinaryMetric: data.value === undefined,
424
+ filterCondition: FilterCondition_1.default.All,
425
+ additionalFilters: otherQueries.map((query) => {
426
+ return {
427
+ metricAlias: query.alias,
428
+ filterType: CriteriaFilter_1.FilterType.GreaterThanOrEqualTo,
429
+ value: 1,
430
+ };
431
+ }),
432
+ })),
433
+ });
434
+ }
435
+ /*
436
+ * A step whose values should stay under a line: a count that should read 0, or a
437
+ * share of something. Fires when ANY alias passes its line for the whole window;
438
+ * recovers when EVERY one is back under it or has gone away, as the Ceph health
439
+ * templates do: a gone series reads as 0, which is under any line.
440
+ */
441
+ function buildCeilingStep(data) {
442
+ const firingFilterType = data.filterType || CriteriaFilter_1.FilterType.GreaterThan;
443
+ const recoveryFilterType = firingFilterType === CriteriaFilter_1.FilterType.GreaterThanOrEqualTo
444
+ ? CriteriaFilter_1.FilterType.LessThan
445
+ : data.value === 0
446
+ ? CriteriaFilter_1.FilterType.EqualTo
447
+ : CriteriaFilter_1.FilterType.LessThanOrEqualTo;
448
+ const [firstAlias, ...otherAliases] = data.aliases;
449
+ return buildOpenStackMonitorStep({
450
+ openstackMonitor: buildOpenStackSeriesConfig({
451
+ cloudIdentifier: data.args.cloudIdentifier,
452
+ queries: data.queries,
453
+ formulas: data.formulas,
454
+ rollingTime: data.rollingTime || exports.OPENSTACK_WINDOW_BY_SERVICE[data.service],
455
+ groupByAttributeKeys: data.groupByAttributeKeys,
456
+ anchorService: data.service,
457
+ anchorMetricName: data.anchorMetricName,
458
+ }),
459
+ offlineCriteriaInstance: buildOfflineCriteria({
460
+ notification: Object.assign({ args: data.args }, data.words),
461
+ metricAlias: firstAlias,
462
+ filterType: firingFilterType,
463
+ value: data.value,
464
+ additionalFilters: otherAliases.map((alias) => {
465
+ return {
466
+ metricAlias: alias,
467
+ filterType: firingFilterType,
468
+ value: data.value,
469
+ };
470
+ }),
471
+ }),
472
+ onlineCriteriaInstance: (0, RecommendationCriteriaBuilder_1.buildHealthyCriteriaInstance)({
473
+ onlineMonitorStatusId: data.args.onlineMonitorStatusId,
474
+ metricAlias: firstAlias,
475
+ filterType: recoveryFilterType,
476
+ value: data.value,
477
+ recoveryValue: data.recoveryValue,
478
+ filterCondition: FilterCondition_1.default.All,
479
+ treatNoDataAsZero: true,
480
+ additionalFilters: otherAliases.map((alias) => {
481
+ return {
482
+ metricAlias: alias,
483
+ filterType: recoveryFilterType,
484
+ value: data.value,
485
+ };
486
+ }),
487
+ }),
488
+ });
489
+ }
490
+ // A status word as a query alias: BUILD(spawning) reads in_build_spawning.
491
+ function statusAlias(status) {
492
+ return `in_${status
493
+ .toLowerCase()
494
+ .replace(/[^a-z0-9]+/g, "_")
495
+ .replace(/_+$/g, "")}`;
496
+ }
497
+ // --- Availability ---
498
+ const cloudStoppedReportingTemplate = {
499
+ id: "openstack-cloud-stopped-reporting",
500
+ name: "Cloud Stopped Reporting",
501
+ summary: "The cloud sends no data for 15 minutes.",
502
+ description: "Alert when the cloud sends no data for 15 minutes: the OpenStack Agent's collector or exporter stopped, it lost its route to OneUptime or had its token revoked, or the exporter can no longer log in to Keystone, which leaves every service's collection empty. Reads openstack_identity_up, which the exporter sends on every identity collection whether or not Keystone's lists answered, so only silence fires it, and a Count of it holds for the whole cloud however many regions it has. One incident for the whole cloud. Check the agent's containers and logs first, then run `openstack token issue` with the agent's credential.",
503
+ category: "Availability",
504
+ severity: "Critical",
505
+ getMonitorStep: (args) => {
506
+ const metricAlias = RecommendationCriteriaBuilder_1.STOPPED_REPORTING_METRIC_ALIAS;
507
+ return buildOpenStackMonitorStep(Object.assign({ openstackMonitor: buildOpenStackMonitorConfig({
508
+ cloudIdentifier: args.cloudIdentifier,
509
+ /*
510
+ * The heartbeat. The identity job runs every 5 minutes, so 15 minutes is
511
+ * its three collections. Ungrouped and counted, with no filter: only a
512
+ * window with no row at all is the breach.
513
+ */
514
+ metricName: "openstack_identity_up",
515
+ metricAlias,
516
+ rollingTime: exports.OPENSTACK_WINDOW_BY_SERVICE[OpenStackResourceKind_1.OpenStackServiceType.Identity],
517
+ aggregationType: MetricsAggregationType_1.default.Count,
518
+ }) }, (0, RecommendationCriteriaBuilder_1.buildStoppedReportingCriteriaInstances)({
519
+ onlineMonitorStatusId: args.onlineMonitorStatusId,
520
+ offlineMonitorStatusId: args.offlineMonitorStatusId,
521
+ incidentSeverityId: args.defaultIncidentSeverityId,
522
+ alertSeverityId: args.defaultAlertSeverityId,
523
+ monitorName: args.monitorName,
524
+ metricAlias,
525
+ resourceNoun: "OpenStack cloud",
526
+ incidentTitle: `[OpenStack] Cloud Stopped Reporting - ${args.monitorName}`,
527
+ incidentDescription: `OneUptime has received nothing from this OpenStack cloud for 15 minutes, so its other monitors have nothing to evaluate either. Check, in order: whether the machine running the OpenStack Agent is up and its containers are running (docker compose ps, and the collector's and exporter's logs name the error); whether the exporter can still log in to Keystone (openstack token issue, with the agent's credential: when it cannot, every service's collection comes back empty, and Identity API Down fires too); and whether the agent can reach OneUptime with its token. The incident resolves on its own once data arrives again.`,
528
+ criteriaName: "Cloud Stopped Reporting - No data for 15 minutes",
529
+ criteriaDescription: "Triggers when the cloud sends no openstack_identity_up data for the whole 15-minute window.",
530
+ })));
531
+ },
532
+ };
533
+ /*
534
+ * One API in one region. The exporter says an API is down in two ways, and which
535
+ * one depends on what failed:
536
+ *
537
+ * - `openstack_<service>_up` reads 0 when every one of its calls failed.
538
+ * - The series goes away when the exporter could not build that service's client
539
+ * (main.go logs it and carries on, and answers 200 with nothing). It logs in to
540
+ * Keystone first for every service, and asks Nova's API for its microversions
541
+ * before it reads anything of Nova's: so a Keystone or Nova API that is simply
542
+ * stopped leaves no `_up` series at all. `up` still reads 1 then, because the
543
+ * collection itself answered; `scrape_samples_scraped` reads 0.
544
+ *
545
+ * So the APIs that fail that way also read how many series the collection held.
546
+ * The others read `up`, for an exporter that timed out or errored, which is what
547
+ * the pages call down too (OpenStackSnapshotScan). They do not read the sample
548
+ * count, because a cloud without Cinder answers that job with nothing for ever:
549
+ * that is a service it does not have, not an outage.
550
+ */
551
+ /*
552
+ * Where a series is heading rather than where it is: a line through the window, followed past now
553
+ * (MetricForecast). It recovers when that line no longer gets there, so a series that is past its line and
554
+ * falling has recovered, which is what catching up looks like. A series that stops reporting is judged on
555
+ * nothing, and stays as it was: a stopped API says that for itself.
556
+ */
557
+ const OPENSTACK_FORECAST_RECOVERY_SHARE = 0.9;
558
+ function buildForecastStep(data) {
559
+ const forecast = {
560
+ horizonInHours: data.horizonInHours,
561
+ };
562
+ return buildOpenStackMonitorStep({
563
+ openstackMonitor: buildOpenStackSeriesConfig({
564
+ cloudIdentifier: data.args.cloudIdentifier,
565
+ queries: [data.query],
566
+ rollingTime: data.rollingTime,
567
+ groupByAttributeKeys: data.groupByAttributeKeys,
568
+ anchorService: data.service,
569
+ }),
570
+ offlineCriteriaInstance: buildOfflineCriteria({
571
+ notification: Object.assign({ args: data.args }, data.words),
572
+ metricAlias: data.query.alias,
573
+ filterType: CriteriaFilter_1.FilterType.ForecastAbove,
574
+ value: data.value,
575
+ forecast,
576
+ }),
577
+ // An empty window has no trend, so a gone series can't read as zero: it has to count as recovered.
578
+ onlineCriteriaInstance: countGoneSeriesAsRecovered((0, RecommendationCriteriaBuilder_1.buildHealthyCriteriaInstance)({
579
+ onlineMonitorStatusId: data.args.onlineMonitorStatusId,
580
+ metricAlias: data.query.alias,
581
+ filterType: CriteriaFilter_1.FilterType.ForecastBelow,
582
+ value: data.value,
583
+ // Past a dead band, so it doesn't flap on its line.
584
+ recoveryValue: data.value * OPENSTACK_FORECAST_RECOVERY_SHARE,
585
+ filterCondition: FilterCondition_1.default.All,
586
+ forecast,
587
+ })),
588
+ });
589
+ }
590
+ function buildApiDownTemplate(data) {
591
+ return Object.assign(Object.assign({ id: data.id, name: data.name, summary: data.summary, description: data.description, category: "Availability", severity: "Critical" }, ((0, OpenStackOptionalServices_1.isOpenStackOptionalService)(data.service)
592
+ ? { forService: data.service }
593
+ : {})), { getMonitorStep: (args) => {
594
+ return buildFloorStep({
595
+ args,
596
+ service: data.service,
597
+ hasOwnAnchor: true,
598
+ groupByAttributeKeys: API_GROUP,
599
+ queries: [
600
+ {
601
+ alias: "api_up",
602
+ metricName: exports.OPENSTACK_API_UP_METRIC_BY_SERVICE[data.service],
603
+ aggregationType: MetricsAggregationType_1.default.Min,
604
+ },
605
+ {
606
+ alias: data.collectionMetricName === "up"
607
+ ? "collection_answered"
608
+ : "series_in_collection",
609
+ metricName: data.collectionMetricName,
610
+ aggregationType: MetricsAggregationType_1.default.Min,
611
+ attributes: { [SERVICE_JOB]: data.service },
612
+ },
613
+ ],
614
+ words: {
615
+ incidentTitle: `[OpenStack] ${data.name}`,
616
+ incidentDescription: data.incidentDescription,
617
+ criteriaName: `${data.name} - not answering`,
618
+ criteriaDescription: `Triggers when the ${data.name.replace(" Down", "")} does not answer for the whole window.`,
619
+ },
620
+ });
621
+ } });
622
+ }
623
+ const identityApiDownTemplate = buildApiDownTemplate({
624
+ id: "openstack-identity-api-down",
625
+ name: "Identity API Down",
626
+ summary: "Keystone does not answer for 15 minutes.",
627
+ description: "Alert when Keystone does not answer for 15 minutes: every call the exporter made failed (openstack_identity_up reads 0), or it could not log in at all, which leaves its identity collection empty (scrape_samples_scraped reads 0). One incident per region. Nothing else can be read while it is down, so Cloud Stopped Reporting fires beside it. Check keystone's service and the database behind it, then run `openstack token issue`.",
628
+ service: OpenStackResourceKind_1.OpenStackServiceType.Identity,
629
+ collectionMetricName: "scrape_samples_scraped",
630
+ incidentDescription: `Keystone is not answering: every call the exporter made failed, or it could not log in at all. Nobody can get a token while this lasts, so every other API refuses new requests too, though running instances carry on. Check keystone's service and logs on the controllers, the load balancer in front of it and the database behind it, then run openstack token issue. The incident resolves on its own once it answers again.`,
631
+ });
632
+ const computeApiDownTemplate = buildApiDownTemplate({
633
+ id: "openstack-compute-api-down",
634
+ name: "Compute API Down",
635
+ summary: "Nova's API does not answer for 10 minutes.",
636
+ description: "Alert when Nova's API does not answer for 10 minutes: every call the exporter made failed (openstack_nova_up reads 0), or it could not reach the API at all, which leaves its compute collection empty (scrape_samples_scraped reads 0). One incident per region. While it lasts, Nova's own series are gone, so its other templates resolve and come back later if the fault is still there. Check nova-api's service and logs, then run `openstack compute service list`.",
637
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
638
+ collectionMetricName: "scrape_samples_scraped",
639
+ incidentDescription: `Nova's API is not answering: every call the exporter made failed, or it could not reach the API at all. Running instances carry on, but nothing can be created, changed or deleted. Check nova-api's service and logs on the controllers, the load balancer in front of it, RabbitMQ and the database, then run openstack compute service list. The incident resolves on its own once it answers again.`,
640
+ });
641
+ const networkApiDownTemplate = buildApiDownTemplate({
642
+ id: "openstack-network-api-down",
643
+ name: "Network API Down",
644
+ summary: "Neutron's API does not answer for 10 minutes.",
645
+ description: "Alert when Neutron's API does not answer for 10 minutes: every call the exporter made failed (openstack_neutron_up reads 0), or the exporter did not answer that collection (up reads 0). One incident per region. If every API reads down at once, look at the exporter first. Check neutron-server's service and logs, then run `openstack network agent list`.",
646
+ service: OpenStackResourceKind_1.OpenStackServiceType.Network,
647
+ collectionMetricName: "up",
648
+ incidentDescription: `Neutron's API is not answering: every call the exporter made failed, or the exporter did not answer that collection. Traffic already flowing carries on, but no port, router or floating IP can be changed, so new instances fail to boot. If every API reads down at once, look at the exporter first. Otherwise check neutron-server's service and logs, RabbitMQ and the database, then run openstack network agent list. The incident resolves on its own once it answers again.`,
649
+ });
650
+ const blockStorageApiDownTemplate = buildApiDownTemplate({
651
+ id: "openstack-block-storage-api-down",
652
+ name: "Block Storage API Down",
653
+ summary: "Cinder's API does not answer for 10 minutes.",
654
+ description: "Alert when Cinder's API does not answer for 10 minutes: every call the exporter made failed (openstack_cinder_up reads 0), or the exporter did not answer that collection (up reads 0). One incident per region. If every API reads down at once, look at the exporter first. Check cinder-api's service and logs, then run `openstack volume service list`.",
655
+ service: OpenStackResourceKind_1.OpenStackServiceType.Volume,
656
+ collectionMetricName: "up",
657
+ incidentDescription: `Cinder's API is not answering: every call the exporter made failed, or the exporter did not answer that collection. Attached volumes carry on working, but none can be created, attached or deleted. If every API reads down at once, look at the exporter first. Otherwise check cinder-api's service and logs, RabbitMQ and the database, then run openstack volume service list. The incident resolves on its own once it answers again.`,
658
+ });
659
+ const imageApiDownTemplate = buildApiDownTemplate({
660
+ id: "openstack-image-api-down",
661
+ name: "Image API Down",
662
+ summary: "Glance's API does not answer for 15 minutes.",
663
+ description: "Alert when Glance's API does not answer for 15 minutes: every call the exporter made failed (openstack_glance_up reads 0), or the exporter did not answer that collection (up reads 0). One incident per region. If every API reads down at once, look at the exporter first. Check glance-api's service and logs, then run `openstack image list --limit 1`.",
664
+ service: OpenStackResourceKind_1.OpenStackServiceType.Image,
665
+ collectionMetricName: "up",
666
+ incidentDescription: `Glance's API is not answering: every call the exporter made failed, or the exporter did not answer that collection. New instances that need an image they do not have cached fail to boot. If every API reads down at once, look at the exporter first. Otherwise check glance-api's service and logs and the image store behind it, then run openstack image list --limit 1. The incident resolves on its own once it answers again.`,
667
+ });
668
+ const placementApiDownTemplate = buildApiDownTemplate({
669
+ id: "openstack-placement-api-down",
670
+ name: "Placement API Down",
671
+ summary: "Placement's API does not answer for 10 minutes.",
672
+ description: "Alert when Placement's API does not answer for 10 minutes: every call the exporter made failed (openstack_placement_up reads 0), or the exporter did not answer that collection (up reads 0). One incident per region. If every API reads down at once, look at the exporter first. Check placement-api's service and logs, then run `openstack endpoint list --service placement`.",
673
+ service: OpenStackResourceKind_1.OpenStackServiceType.Placement,
674
+ collectionMetricName: "up",
675
+ incidentDescription: `Placement's API is not answering: every call the exporter made failed, or the exporter did not answer that collection. The scheduler asks it where an instance fits, so new instances fail to boot with No valid host. If every API reads down at once, look at the exporter first. Otherwise check placement-api's service and logs and the database, then run openstack endpoint list --service placement. The incident resolves on its own once it answers again.`,
676
+ });
677
+ const orchestrationApiDownTemplate = buildApiDownTemplate({
678
+ id: "openstack-orchestration-api-down",
679
+ name: "Orchestration API Down",
680
+ summary: "Heat's API does not answer for 15 minutes.",
681
+ description: "Alert when Heat's API does not answer for 15 minutes: every call the exporter made failed (openstack_heat_up reads 0), or the exporter did not answer that collection (up reads 0). One incident per region. Heat's API asks an engine for its lists, so a stopped heat-engine reads as this too, recorded: each read then waits a minute for an RPC timeout. Check `openstack orchestration service list`, then heat-api's and heat-engine's services and logs.",
682
+ service: OpenStackResourceKind_1.OpenStackServiceType.Orchestration,
683
+ collectionMetricName: "up",
684
+ incidentDescription: `Heat's API is not answering: every call the exporter made failed, or the exporter did not answer that collection. Heat's API asks an engine for its lists, so this is also what a stopped heat-engine looks like. What Heat already built carries on, but no stack can be created, changed or deleted, and Magnum builds its clusters with Heat. Check openstack orchestration service list, then heat-api's and heat-engine's services and logs, and RabbitMQ. The incident resolves on its own once it answers again.`,
685
+ });
686
+ const ratingApiDownTemplate = Object.assign(Object.assign({}, buildApiDownTemplate({
687
+ id: "openstack-rating-api-down",
688
+ name: "Rating API Down",
689
+ summary: "CloudKitty's API does not answer for 15 minutes.",
690
+ description: "Alert when CloudKitty's API does not answer for 15 minutes (openstack_cloudkitty_up reads 0, which only a probe sends, because the agent's exporter has no series for it), or that collection did not answer (up reads 0). One incident per region. What a project was rated stops moving until it answers again, and the Spend page says when it was last read. Check `openstack catalog show rating`, then cloudkitty-api's service and logs.",
691
+ service: OpenStackResourceKind_1.OpenStackServiceType.Rating,
692
+ collectionMetricName: "up",
693
+ incidentDescription: `CloudKitty's API is not answering, so what each project was rated has stopped moving. Instances, volumes and everything else carry on, and usage goes on being counted from the inventory. Check openstack catalog show rating, then cloudkitty-api's service and logs, and the database behind it. The incident resolves on its own once it answers again.`,
694
+ })), {
695
+ // The agent's exporter has no series for it.
696
+ requiresProbe: true });
697
+ const containerInfraApiDownTemplate = buildApiDownTemplate({
698
+ id: "openstack-container-infra-api-down",
699
+ name: "Kubernetes Clusters API Down",
700
+ summary: "Magnum's API does not answer for 15 minutes.",
701
+ description: "Alert when Magnum's API does not answer for 15 minutes: every call the exporter made failed (openstack_container_infra_up reads 0), or the exporter did not answer that collection (up reads 0). One incident per region. Check `openstack coe service list`, then magnum-api's service and logs.",
702
+ service: OpenStackResourceKind_1.OpenStackServiceType.ContainerInfra,
703
+ collectionMetricName: "up",
704
+ incidentDescription: `Magnum's API is not answering: every call the exporter made failed, or the exporter did not answer that collection. Clusters already running carry on, but none can be created, resized or deleted. Check openstack coe service list, then magnum-api's service and logs, and the database behind it. The incident resolves on its own once it answers again.`,
705
+ });
706
+ // --- Control plane ---
707
+ const NOVA_AGENT_STATE = "openstack_nova_agent_state";
708
+ const computeServiceDownTemplate = {
709
+ id: "openstack-compute-service-down",
710
+ name: "Compute Service Down",
711
+ summary: "An enabled nova-compute is down.",
712
+ description: "Alert when an enabled nova-compute is down for 10 minutes (openstack_nova_agent_state below 1, filtered to adminState enabled). One incident per host, and one someone disabled never fires, so planned work is quiet. Its instances may still be running, but Nova cannot manage them. Check `openstack compute service list --host <host>`, then nova-compute's service and logs on that host, and its route to RabbitMQ.",
713
+ category: "Control Plane",
714
+ severity: "Critical",
715
+ getMonitorStep: (args) => {
716
+ return buildFloorStep({
717
+ args,
718
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
719
+ groupByAttributeKeys: WORKER_GROUP,
720
+ queries: [
721
+ {
722
+ alias: "compute_service_up",
723
+ metricName: NOVA_AGENT_STATE,
724
+ aggregationType: MetricsAggregationType_1.default.Min,
725
+ attributes: { service: "nova-compute", adminState: "enabled" },
726
+ },
727
+ ],
728
+ words: {
729
+ incidentTitle: "[OpenStack] Compute Service Down",
730
+ incidentDescription: `An enabled nova-compute has stopped reporting to Nova. Instances on that host may still be running, but Nova cannot start, stop or move them, and it schedules nothing new there. Check openstack compute service list --host for the host named above, then nova-compute's service and logs on that host, and its route to RabbitMQ. If you are working on the host, disable the service first (openstack compute service set --disable) and this monitor stays quiet. The incident resolves on its own once it is up again, or disabled.`,
731
+ criteriaName: "Compute Service Down - enabled nova-compute < 1",
732
+ criteriaDescription: "Triggers when an enabled nova-compute reports down for the whole window.",
733
+ },
734
+ });
735
+ },
736
+ };
737
+ /*
738
+ * A disabled nova-compute, up or down. Its series says which by its value, and that it is disabled by
739
+ * its label, so its rows are the whole of the question. One a maintenance event covers is suppressed
740
+ * per series like everything else on that host (MonitorMaintenanceSuppression), which is the only
741
+ * difference between planned work and someone taking a host out by hand.
742
+ *
743
+ * Its reason is on its series because Nova's own says something an operator's never does: it disabled
744
+ * itself because libvirt went. So a libvirt monitor can speak for that series and for no other
745
+ * (OpenStackDependencySuppression), and a stopped libvirt stays one incident.
746
+ */
747
+ const computeServiceDisabledTemplate = {
748
+ id: "openstack-compute-service-disabled",
749
+ name: "Compute Service Disabled",
750
+ summary: "A nova-compute is disabled with no maintenance event covering its host.",
751
+ description: "Alert when a nova-compute stays disabled for 10 minutes (openstack_nova_agent_state filtered to adminState disabled, whose rows say it is there whether it is up or down) and no maintenance event in progress covers its host, its availability zone or the whole cloud. One incident per host. During an event on the host a disable is expected and this stays quiet, so `openstack compute service set --disable` as part of planned work says nothing. Outside one, nothing new can be scheduled there and nobody said why. A nova-compute that disabled itself because libvirt went (its reason starts AUTO:) stays quiet while libvirt Service Down is open, and that is the one that speaks. Projects are not told of this incident, because what they already run there carries on. Check `openstack compute service list --long` for the reason.",
752
+ category: "Control Plane",
753
+ severity: "Warning",
754
+ getMonitorStep: (args) => {
755
+ const metricAlias = "compute_service_disabled";
756
+ return buildCeilingStep({
757
+ args,
758
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
759
+ groupByAttributeKeys: [...WORKER_GROUP, OpenStackControlPlane_1.OPENSTACK_DISABLED_REASON_LABEL],
760
+ queries: [
761
+ {
762
+ alias: metricAlias,
763
+ metricName: NOVA_AGENT_STATE,
764
+ // One row per worker per collection: it only has to tell none from some.
765
+ aggregationType: MetricsAggregationType_1.default.Count,
766
+ attributes: { service: "nova-compute", adminState: "disabled" },
767
+ },
768
+ ],
769
+ aliases: [metricAlias],
770
+ value: 0,
771
+ words: {
772
+ incidentTitle: "[OpenStack] Compute Service Disabled",
773
+ incidentDescription: `A nova-compute was disabled with no maintenance event in progress covering its host, so nothing new can be scheduled there. The reason it gives, if it gives one, is under Affected resource, and a reason starting AUTO: means Nova disabled it itself, so check libvirt on that host. If this is planned work, put a maintenance event on the host, and this stays quiet for as long as it is on. If it is not, openstack compute service set --enable puts the host back. The incident resolves on its own once it is enabled again, or an event covers it.`,
774
+ criteriaName: "Compute Service Disabled - no maintenance event",
775
+ criteriaDescription: "Triggers when a nova-compute stays disabled for the whole window.",
776
+ },
777
+ });
778
+ },
779
+ };
780
+ const schedulerAndConductorQueries = (data) => {
781
+ return [
782
+ {
783
+ alias: data.schedulerAlias,
784
+ metricName: NOVA_AGENT_STATE,
785
+ aggregationType: data.aggregationType,
786
+ attributes: { service: "nova-scheduler", adminState: "enabled" },
787
+ },
788
+ {
789
+ alias: data.conductorAlias,
790
+ metricName: NOVA_AGENT_STATE,
791
+ aggregationType: data.aggregationType,
792
+ attributes: { service: "nova-conductor", adminState: "enabled" },
793
+ },
794
+ ];
795
+ };
796
+ const schedulerOrConductorDownTemplate = {
797
+ id: "openstack-scheduler-or-conductor-down",
798
+ name: "Scheduler or Conductor Down",
799
+ summary: "An enabled nova-scheduler or nova-conductor is down.",
800
+ description: "Alert when an enabled nova-scheduler or nova-conductor is down for 10 minutes (openstack_nova_agent_state below 1, filtered to adminState enabled). One incident per host and binary, and one someone disabled never fires. The others carry on while any is left, which is why this is a Warning: Every Scheduler or Conductor Down is the outage. Check `openstack compute service list --service nova-scheduler`, then the service's logs on that host.",
801
+ category: "Control Plane",
802
+ severity: "Warning",
803
+ getMonitorStep: (args) => {
804
+ return buildFloorStep({
805
+ args,
806
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
807
+ groupByAttributeKeys: WORKER_GROUP,
808
+ queries: schedulerAndConductorQueries({
809
+ aggregationType: MetricsAggregationType_1.default.Min,
810
+ schedulerAlias: "scheduler_up",
811
+ conductorAlias: "conductor_up",
812
+ }),
813
+ words: {
814
+ incidentTitle: "[OpenStack] Scheduler or Conductor Down",
815
+ incidentDescription: `An enabled nova-scheduler or nova-conductor has stopped reporting to Nova. The others carry on while any is left, though with less room. Check openstack compute service list for the host and binary named above, then that service's logs on that host, and its route to RabbitMQ and the database. The incident resolves on its own once it is up again, or disabled.`,
816
+ criteriaName: "Scheduler or Conductor Down - enabled worker < 1",
817
+ criteriaDescription: "Triggers when an enabled nova-scheduler or nova-conductor reports down for the whole window.",
818
+ },
819
+ });
820
+ },
821
+ };
822
+ const everySchedulerOrConductorDownTemplate = {
823
+ id: "openstack-every-scheduler-or-conductor-down",
824
+ name: "Every Scheduler or Conductor Down",
825
+ summary: "Every enabled nova-scheduler or nova-conductor in a region is down.",
826
+ description: "Alert when every enabled nova-scheduler, or every enabled nova-conductor, in a region is down for 10 minutes (the Max of openstack_nova_agent_state across their hosts reads below 1, filtered to adminState enabled). One incident per region and binary. Nothing new can boot. Check `openstack compute service list`, then RabbitMQ and the database they all depend on, before the workers themselves.",
827
+ category: "Control Plane",
828
+ severity: "Critical",
829
+ getMonitorStep: (args) => {
830
+ return buildFloorStep({
831
+ args,
832
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
833
+ groupByAttributeKeys: [REGION, "service"],
834
+ /*
835
+ * Max across hosts: 1 while any one of them is alive. These read the same
836
+ * series as Scheduler or Conductor Down, so their own aliases are what tell
837
+ * the Recommendations page the two apart: a monitor's fingerprint is its
838
+ * metrics, aliases and filters, and setting up one must not read as both.
839
+ */
840
+ queries: schedulerAndConductorQueries({
841
+ aggregationType: MetricsAggregationType_1.default.Max,
842
+ schedulerAlias: "any_scheduler_up",
843
+ conductorAlias: "any_conductor_up",
844
+ }),
845
+ words: {
846
+ incidentTitle: "[OpenStack] Every Scheduler or Conductor Down",
847
+ incidentDescription: `Every enabled nova-scheduler, or every enabled nova-conductor, in this region has stopped reporting. Nothing new can boot, move or resize until one is back. They rarely all fail on their own: check openstack compute service list, then RabbitMQ and the database they all depend on, then the workers' logs. The incident resolves on its own once one is up again.`,
848
+ criteriaName: "Every Scheduler or Conductor Down - none alive",
849
+ criteriaDescription: "Triggers when no enabled nova-scheduler, or no enabled nova-conductor, in a region reports up for the whole window.",
850
+ },
851
+ });
852
+ },
853
+ };
854
+ const networkAgentDownTemplate = {
855
+ id: "openstack-network-agent-down",
856
+ name: "Network Agent Down",
857
+ summary: "An enabled Neutron agent is down.",
858
+ description: "Alert when a Neutron agent set up is not alive for 10 minutes (openstack_neutron_agent_state below 1, filtered to adminState up). One incident per host and binary, and one someone set down never fires, so planned work is quiet. Ports on that host may stop being wired, and on ML2/OVS its routers and DHCP may go with it. Check `openstack network agent list --host <host>`, then the agent's service and logs on that host.",
859
+ category: "Control Plane",
860
+ severity: "Critical",
861
+ getMonitorStep: (args) => {
862
+ return buildFloorStep({
863
+ args,
864
+ service: OpenStackResourceKind_1.OpenStackServiceType.Network,
865
+ groupByAttributeKeys: WORKER_GROUP,
866
+ queries: [
867
+ {
868
+ alias: "network_agent_alive",
869
+ metricName: "openstack_neutron_agent_state",
870
+ aggregationType: MetricsAggregationType_1.default.Min,
871
+ attributes: { adminState: "up" },
872
+ },
873
+ ],
874
+ words: {
875
+ incidentTitle: "[OpenStack] Network Agent Down",
876
+ incidentDescription: `A Neutron agent that is set up has stopped reporting. Traffic already flowing often carries on, but ports on that host stop being wired, and on ML2/OVS its routers and DHCP may go with it. Check openstack network agent list --host for the host named above, then that agent's service and logs on the host, and its route to RabbitMQ. If you are working on the host, set the agent down first (openstack network agent set --disable) and this monitor stays quiet. The incident resolves on its own once it is alive again, or set down.`,
877
+ criteriaName: "Network Agent Down - agent set up and not alive",
878
+ criteriaDescription: "Triggers when a Neutron agent with adminState up reports not alive for the whole window.",
879
+ },
880
+ });
881
+ },
882
+ };
883
+ const blockStorageServiceDownTemplate = {
884
+ id: "openstack-block-storage-service-down",
885
+ name: "Block Storage Service Down",
886
+ summary: "An enabled Cinder service is down.",
887
+ description: "Alert when an enabled cinder-volume, cinder-scheduler or cinder-backup is down for 10 minutes (openstack_cinder_agent_state below 1, filtered to adminState enabled). One incident per host and binary, and one someone disabled never fires, so planned work is quiet. Attached volumes usually carry on, but nothing new can be created or attached on that backend. Check `openstack volume service list --host <host>`, then the service's logs on that host and the backend behind it.",
888
+ category: "Control Plane",
889
+ severity: "Critical",
890
+ getMonitorStep: (args) => {
891
+ return buildFloorStep({
892
+ args,
893
+ service: OpenStackResourceKind_1.OpenStackServiceType.Volume,
894
+ /*
895
+ * By host and binary, never its uuid label: the exporter makes that up
896
+ * afresh on every collection, so each one would be a new series.
897
+ */
898
+ groupByAttributeKeys: WORKER_GROUP,
899
+ queries: [
900
+ {
901
+ alias: "block_storage_service_up",
902
+ metricName: "openstack_cinder_agent_state",
903
+ aggregationType: MetricsAggregationType_1.default.Min,
904
+ attributes: { adminState: "enabled" },
905
+ },
906
+ ],
907
+ words: {
908
+ incidentTitle: "[OpenStack] Block Storage Service Down",
909
+ incidentDescription: `An enabled Cinder service has stopped reporting. Attached volumes usually carry on, but nothing new can be created or attached on its backend. Check openstack volume service list --host for the host named above (for cinder-volume that is host@backend), then that service's logs on the host and the storage backend behind it. If you are working on it, disable the service first (openstack volume service set --disable) and this monitor stays quiet. The incident resolves on its own once it is up again, or disabled.`,
910
+ criteriaName: "Block Storage Service Down - enabled service < 1",
911
+ criteriaDescription: "Triggers when an enabled Cinder service reports down for the whole window.",
912
+ },
913
+ });
914
+ },
915
+ };
916
+ // --- Compute ---
917
+ /*
918
+ * What Placement has promised on a hypervisor, as a share of what it will promise.
919
+ * That is what OpenStackSnapshotScan reads for the pages: (total - reserved) x ratio.
920
+ * All four come from one collection, so they line up minute by minute, and Max
921
+ * reads each one's value whatever else the bucket holds.
922
+ */
923
+ function buildAllocationTemplate(data) {
924
+ const metricAlias = "allocated_percent";
925
+ return {
926
+ id: data.id,
927
+ name: data.name,
928
+ summary: data.summary,
929
+ description: `Alert when Placement has promised more than ${OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT}% of what it will promise of a hypervisor's ${data.noun}, for 10 minutes. Computed per hypervisor as usage / ((total - reserved) x allocation ratio) from the openstack_placement_resource_* series, filtered to resourcetype ${data.resourceType}. This is allocation, not load: an idle instance holds all of it. Check \`openstack hypervisor show <hypervisor>\`, then move instances away, raise the allocation ratio or add capacity.`,
930
+ category: "Compute",
931
+ severity: "Warning",
932
+ getMonitorStep: (args) => {
933
+ const attributes = {
934
+ resourcetype: data.resourceType,
935
+ };
936
+ return buildCeilingStep({
937
+ args,
938
+ service: OpenStackResourceKind_1.OpenStackServiceType.Placement,
939
+ groupByAttributeKeys: HYPERVISOR_GROUP,
940
+ queries: [
941
+ {
942
+ alias: "allocated",
943
+ metricName: "openstack_placement_resource_usage",
944
+ aggregationType: MetricsAggregationType_1.default.Max,
945
+ attributes,
946
+ },
947
+ {
948
+ alias: "capacity",
949
+ metricName: "openstack_placement_resource_total",
950
+ aggregationType: MetricsAggregationType_1.default.Max,
951
+ attributes,
952
+ },
953
+ {
954
+ alias: "reserved",
955
+ metricName: "openstack_placement_resource_reserved",
956
+ aggregationType: MetricsAggregationType_1.default.Max,
957
+ attributes,
958
+ },
959
+ {
960
+ alias: "allocation_ratio",
961
+ metricName: "openstack_placement_resource_allocation_ratio",
962
+ aggregationType: MetricsAggregationType_1.default.Max,
963
+ attributes,
964
+ },
965
+ ],
966
+ formulas: [
967
+ {
968
+ alias: metricAlias,
969
+ legend: `${data.name} (%)`,
970
+ legendUnit: "%",
971
+ formula: "(allocated / ((capacity - reserved) * allocation_ratio)) * 100",
972
+ },
973
+ ],
974
+ aliases: [metricAlias],
975
+ value: OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT,
976
+ words: {
977
+ incidentTitle: `[OpenStack] ${data.name} (>${OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT}%)`,
978
+ incidentDescription: data.incidentDescription,
979
+ criteriaName: `${data.name} - allocated > ${OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT}%`,
980
+ criteriaDescription: `Triggers when Placement has promised more than ${OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT}% of a hypervisor's ${data.noun} for the whole window.`,
981
+ },
982
+ });
983
+ },
984
+ };
985
+ }
986
+ const vcpuAllocationHighTemplate = buildAllocationTemplate({
987
+ id: "openstack-vcpu-allocation-high",
988
+ name: "vCPU Allocation High",
989
+ resourceType: "VCPU",
990
+ noun: "vCPUs",
991
+ summary: `A hypervisor has promised more than ${OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT}% of its vCPUs.`,
992
+ incidentDescription: `Placement has promised nearly all the vCPUs this hypervisor will give, so new instances soon fail to land on it with No valid host. This is allocation, not load: an idle instance holds all of its vCPUs. Check openstack hypervisor show for the hypervisor named above, then move instances away, raise its CPU allocation ratio or add capacity. The incident resolves on its own once it falls back.`,
993
+ });
994
+ const memoryAllocationHighTemplate = buildAllocationTemplate({
995
+ id: "openstack-memory-allocation-high",
996
+ name: "Memory Allocation High",
997
+ resourceType: "MEMORY_MB",
998
+ noun: "memory",
999
+ summary: `A hypervisor has promised more than ${OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT}% of its memory.`,
1000
+ incidentDescription: `Placement has promised nearly all the memory this hypervisor will give, so new instances soon fail to land on it with No valid host. This is allocation, not usage: an instance holds its flavor's memory whether it uses it or not. Check openstack hypervisor show for the hypervisor named above, then move instances away, raise its memory allocation ratio or add capacity. The incident resolves on its own once it falls back.`,
1001
+ });
1002
+ const localDiskAllocationHighTemplate = buildAllocationTemplate({
1003
+ id: "openstack-local-disk-allocation-high",
1004
+ name: "Local Disk Allocation High",
1005
+ resourceType: "DISK_GB",
1006
+ noun: "local disk",
1007
+ summary: `A hypervisor has promised more than ${OpenStackHealthRules_1.OPENSTACK_ALLOCATION_WARNING_PERCENT}% of its local disk.`,
1008
+ incidentDescription: `Placement has promised nearly all the local disk this hypervisor will give, so new instances soon fail to land on it with No valid host. This is allocation, not usage: an instance holds its flavor's disk whether it fills it or not. Check openstack hypervisor show for the hypervisor named above, then move instances away, raise its disk allocation ratio or add capacity. The incident resolves on its own once it falls back.`,
1009
+ });
1010
+ /*
1011
+ * WHAT IS REALLY BUSY. Worked out at ingest from libvirt's or Ceilometer's exporter, so
1012
+ * they mean the same whichever a cloud has, and these never fire on a cloud with neither:
1013
+ * with no series there is nothing to compare, and the page says what to add.
1014
+ *
1015
+ * Fifteen minutes, because Ceilometer's readings change once a polling cycle, five minutes
1016
+ * by default, and a window has to hold three of them.
1017
+ */
1018
+ const INSTANCE_USAGE_WINDOW = RollingTime_1.default.Past15Minutes;
1019
+ const INSTANCE_USAGE_GROUP = [
1020
+ REGION,
1021
+ OpenStackInstanceMetrics_1.OPENSTACK_INSTANCE_ID_ATTRIBUTE,
1022
+ ];
1023
+ const INSTANCE_DISK_GROUP = [
1024
+ ...INSTANCE_USAGE_GROUP,
1025
+ OpenStackInstanceMetrics_1.OPENSTACK_INSTANCE_DEVICE_ATTRIBUTE,
1026
+ ];
1027
+ const NEEDS_INSTANCE_SOURCE = "Needs libvirt's or Ceilometer's exporter to be read: without one it has nothing to compare, and stays quiet.";
1028
+ const hypervisorCpuSaturatedTemplate = {
1029
+ id: "openstack-hypervisor-cpu-saturated",
1030
+ name: "Hypervisor CPU Saturated",
1031
+ summary: `A hypervisor's instances use over ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_CPU_SATURATED_PERCENT}% of its CPU for 15 minutes.`,
1032
+ description: `Alert when what a hypervisor's instances really use passes ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_CPU_SATURATED_PERCENT}% of its CPU threads for 15 minutes, read from openstack.hypervisor.instances.cpu.utilization. That is worked out at ingest against the threads Placement says it has, before any allocation ratio. This is load, not allocation: instances that hold vCPUs and do nothing add nothing to it. The hypervisor's page names the instances responsible. ${NEEDS_INSTANCE_SOURCE} Check \`openstack server list --all-projects --host <hypervisor>\`, then live-migrate the busiest instance away or lower the CPU allocation ratio.`,
1033
+ category: "Compute",
1034
+ severity: "Warning",
1035
+ getMonitorStep: (args) => {
1036
+ const metricAlias = "cpu_percent";
1037
+ return buildCeilingStep({
1038
+ args,
1039
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
1040
+ rollingTime: INSTANCE_USAGE_WINDOW,
1041
+ groupByAttributeKeys: HYPERVISOR_GROUP,
1042
+ queries: [
1043
+ {
1044
+ alias: metricAlias,
1045
+ metricName: OpenStackInstanceMetrics_1.OpenStackHypervisorMetric.InstancesCpuUtilization,
1046
+ aggregationType: MetricsAggregationType_1.default.Max,
1047
+ },
1048
+ ],
1049
+ aliases: [metricAlias],
1050
+ value: OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_CPU_SATURATED_PERCENT,
1051
+ words: {
1052
+ incidentTitle: `[OpenStack] Hypervisor CPU Saturated (>${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_CPU_SATURATED_PERCENT}%)`,
1053
+ incidentDescription: `The instances on this hypervisor are really using nearly all of its CPU, so they are waiting for each other and everything on it is slower than its flavor says. This is load rather than what Placement has promised. The hypervisor's page names the busiest instances and which of them are being made to wait. Check openstack server list --all-projects --host for the hypervisor named above, then live-migrate the busiest instance away. The incident resolves on its own once it falls back.`,
1054
+ criteriaName: `Hypervisor CPU Saturated - CPU > ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_CPU_SATURATED_PERCENT}%`,
1055
+ criteriaDescription: `Triggers when a hypervisor's instances use more than ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_CPU_SATURATED_PERCENT}% of its CPU threads for the whole window.`,
1056
+ },
1057
+ });
1058
+ },
1059
+ };
1060
+ const hypervisorMemoryPressureTemplate = {
1061
+ id: "openstack-hypervisor-memory-pressure",
1062
+ name: "Hypervisor Memory Pressure",
1063
+ summary: `A hypervisor's instances hold over ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_MEMORY_PRESSURE_PERCENT}% of its memory for 15 minutes.`,
1064
+ description: `Alert when what a hypervisor's instances really hold passes ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_MEMORY_PRESSURE_PERCENT}% of its memory for 15 minutes, read from openstack.hypervisor.instances.memory.utilization. That is worked out at ingest against the memory Placement says it has, before any allocation ratio. This is memory in use, not memory promised, which is what Memory Allocation High reads. ${NEEDS_INSTANCE_SOURCE} Check \`openstack server list --all-projects --host <hypervisor>\`, then live-migrate an instance away before the kernel starts killing them.`,
1065
+ category: "Compute",
1066
+ severity: "Warning",
1067
+ getMonitorStep: (args) => {
1068
+ const metricAlias = "memory_percent";
1069
+ return buildCeilingStep({
1070
+ args,
1071
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
1072
+ rollingTime: INSTANCE_USAGE_WINDOW,
1073
+ groupByAttributeKeys: HYPERVISOR_GROUP,
1074
+ queries: [
1075
+ {
1076
+ alias: metricAlias,
1077
+ metricName: OpenStackInstanceMetrics_1.OpenStackHypervisorMetric.InstancesMemoryUtilization,
1078
+ aggregationType: MetricsAggregationType_1.default.Max,
1079
+ },
1080
+ ],
1081
+ aliases: [metricAlias],
1082
+ value: OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_MEMORY_PRESSURE_PERCENT,
1083
+ words: {
1084
+ incidentTitle: `[OpenStack] Hypervisor Memory Pressure (>${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_MEMORY_PRESSURE_PERCENT}%)`,
1085
+ incidentDescription: `The instances on this hypervisor really hold nearly all of its memory, which leaves little for the host and its services. Past this the kernel swaps or kills an instance to make room. Check openstack server list --all-projects --host for the hypervisor named above, then live-migrate an instance away, and look at its memory allocation ratio if this is how it is meant to run. The incident resolves on its own once it falls back.`,
1086
+ criteriaName: `Hypervisor Memory Pressure - held > ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_MEMORY_PRESSURE_PERCENT}%`,
1087
+ criteriaDescription: `Triggers when a hypervisor's instances hold more than ${OpenStackHealthRules_1.OPENSTACK_HYPERVISOR_MEMORY_PRESSURE_PERCENT}% of its memory for the whole window.`,
1088
+ },
1089
+ });
1090
+ },
1091
+ };
1092
+ const instanceCpuSaturatedTemplate = {
1093
+ id: "openstack-instance-cpu-saturated",
1094
+ name: "Instance CPU Saturated",
1095
+ summary: `An instance uses over ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_CPU_SATURATED_PERCENT}% of its vCPUs for 15 minutes.`,
1096
+ description: `Alert when an instance uses more than ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_CPU_SATURATED_PERCENT}% of its vCPUs for 15 minutes, read from openstack.instance.cpu.utilization. One incident per instance, and it names the project it belongs to, because this is usually the project's to act on. ${NEEDS_INSTANCE_SOURCE} Check \`openstack server show <instance>\` for its flavor, then resize it or look at what is running in it.`,
1097
+ category: "Compute",
1098
+ severity: "Warning",
1099
+ getMonitorStep: (args) => {
1100
+ const metricAlias = "cpu_percent";
1101
+ return buildCeilingStep({
1102
+ args,
1103
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
1104
+ rollingTime: INSTANCE_USAGE_WINDOW,
1105
+ groupByAttributeKeys: INSTANCE_USAGE_GROUP,
1106
+ queries: [
1107
+ {
1108
+ alias: metricAlias,
1109
+ metricName: OpenStackInstanceMetrics_1.OpenStackInstanceMetric.CpuUtilization,
1110
+ aggregationType: MetricsAggregationType_1.default.Max,
1111
+ },
1112
+ ],
1113
+ aliases: [metricAlias],
1114
+ value: OpenStackHealthRules_1.OPENSTACK_INSTANCE_CPU_SATURATED_PERCENT,
1115
+ words: {
1116
+ incidentTitle: `[OpenStack] Instance CPU Saturated (>${OpenStackHealthRules_1.OPENSTACK_INSTANCE_CPU_SATURATED_PERCENT}%)`,
1117
+ incidentDescription: `This instance has been using all of its vCPUs for a quarter of an hour, so whatever runs in it is limited by its flavor. Check openstack server show for the instance named above for its flavor, then resize it, or look at what is running inside it. If its CPU Contention is high too, its hypervisor is what is short, and moving it helps more than resizing. The incident resolves on its own once it falls back.`,
1118
+ criteriaName: `Instance CPU Saturated - CPU > ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_CPU_SATURATED_PERCENT}%`,
1119
+ criteriaDescription: `Triggers when an instance uses more than ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_CPU_SATURATED_PERCENT}% of its vCPUs for the whole window.`,
1120
+ },
1121
+ });
1122
+ },
1123
+ };
1124
+ const instanceDiskLatencyHighTemplate = {
1125
+ id: "openstack-instance-disk-latency-high",
1126
+ name: "Instance Disk Latency High",
1127
+ summary: `An instance's disk takes over ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_DISK_LATENCY_HIGH_MS} ms per request for 15 minutes.`,
1128
+ description: `Alert when reads or writes on one of an instance's disks take more than ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_DISK_LATENCY_HIGH_MS} ms on average for 15 minutes, read from openstack.instance.disk.read.latency and openstack.instance.disk.write.latency. A disk with no requests has no latency, so an idle disk never fires this. ${NEEDS_INSTANCE_SOURCE} Check \`openstack server show <instance>\` for its volumes, then the storage pool and backend behind them.`,
1129
+ category: "Compute",
1130
+ severity: "Warning",
1131
+ getMonitorStep: (args) => {
1132
+ return buildCeilingStep({
1133
+ args,
1134
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
1135
+ rollingTime: INSTANCE_USAGE_WINDOW,
1136
+ groupByAttributeKeys: INSTANCE_DISK_GROUP,
1137
+ queries: [
1138
+ {
1139
+ alias: "read_latency_ms",
1140
+ metricName: OpenStackInstanceMetrics_1.OpenStackInstanceMetric.DiskReadLatency,
1141
+ aggregationType: MetricsAggregationType_1.default.Max,
1142
+ },
1143
+ {
1144
+ alias: "write_latency_ms",
1145
+ metricName: OpenStackInstanceMetrics_1.OpenStackInstanceMetric.DiskWriteLatency,
1146
+ aggregationType: MetricsAggregationType_1.default.Max,
1147
+ },
1148
+ ],
1149
+ aliases: ["read_latency_ms", "write_latency_ms"],
1150
+ value: OpenStackHealthRules_1.OPENSTACK_INSTANCE_DISK_LATENCY_HIGH_MS,
1151
+ words: {
1152
+ incidentTitle: `[OpenStack] Instance Disk Latency High (>${OpenStackHealthRules_1.OPENSTACK_INSTANCE_DISK_LATENCY_HIGH_MS} ms)`,
1153
+ incidentDescription: `Reads or writes on this instance's disk have been slow for a quarter of an hour, which its users feel as a slow application however idle its CPU looks. Check openstack server show for the instance named above for its volumes, then the storage pool and the backend behind them, and whether Ceph or the array under it is degraded. The incident resolves on its own once it falls back, or once the disk stops being used.`,
1154
+ criteriaName: `Instance Disk Latency High - latency > ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_DISK_LATENCY_HIGH_MS} ms`,
1155
+ criteriaDescription: `Triggers when an instance's disk takes more than ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_DISK_LATENCY_HIGH_MS} ms per read or write for the whole window.`,
1156
+ },
1157
+ });
1158
+ },
1159
+ };
1160
+ const instancesInErrorTemplate = {
1161
+ id: "openstack-instances-in-error",
1162
+ name: "Instances in Error",
1163
+ summary: "An instance in a region is in ERROR.",
1164
+ description: "Alert when any instance in a region stays in ERROR for 10 minutes (openstack_nova_server_status filtered to the status label ERROR: its value is a code, so a Count of its rows says how many). One incident per region rather than per instance, because a failed boot is often a project's own and one cloud can hold many. Check `openstack server list --all-projects --status ERROR`, then `openstack server show` for the fault Nova recorded on each.",
1165
+ category: "Compute",
1166
+ severity: "Warning",
1167
+ getMonitorStep: (args) => {
1168
+ const metricAlias = "instances_in_error";
1169
+ return buildCeilingStep({
1170
+ args,
1171
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
1172
+ groupByAttributeKeys: [REGION, "status"],
1173
+ queries: [
1174
+ {
1175
+ alias: metricAlias,
1176
+ metricName: "openstack_nova_server_status",
1177
+ /*
1178
+ * One row per instance per collection, and a collection takes at least
1179
+ * 2 minutes, so a one-minute bucket's Count is how many instances. And
1180
+ * it only has to tell none from some.
1181
+ */
1182
+ aggregationType: MetricsAggregationType_1.default.Count,
1183
+ attributes: { status: "ERROR" },
1184
+ },
1185
+ ],
1186
+ aliases: [metricAlias],
1187
+ value: 0,
1188
+ words: {
1189
+ incidentTitle: "[OpenStack] Instances in Error",
1190
+ incidentDescription: `One or more instances in this region are in ERROR. Check openstack server list --all-projects --status ERROR, then openstack server show for the fault Nova recorded on each: No valid host means the scheduler found no room, and anything else usually names the host or the service that failed. An instance in ERROR holds no resources it can use, so delete or rebuild it once you know why. The incident resolves on its own once none is left.`,
1191
+ criteriaName: "Instances in Error - count > 0",
1192
+ criteriaDescription: "Triggers when a region holds an instance in ERROR for the whole window.",
1193
+ },
1194
+ });
1195
+ },
1196
+ };
1197
+ /*
1198
+ * An instance that has held one status word for the whole window. Each word is its
1199
+ * own query, because a monitor's attribute filter is equality, and per instance,
1200
+ * because grouped by region a busy cloud's steady stream of builds would read as
1201
+ * one instance stuck for ever.
1202
+ */
1203
+ function buildInstanceStuckTemplate(data) {
1204
+ return {
1205
+ id: data.id,
1206
+ name: data.name,
1207
+ summary: data.summary,
1208
+ description: data.description,
1209
+ category: "Compute",
1210
+ severity: "Warning",
1211
+ getMonitorStep: (args) => {
1212
+ const queries = data.statuses.map((status) => {
1213
+ return {
1214
+ alias: statusAlias(status),
1215
+ metricName: "openstack_nova_server_status",
1216
+ /*
1217
+ * The value is the status's code, none of them 0 for these words, so
1218
+ * it says the row is there rather than how much of anything.
1219
+ */
1220
+ aggregationType: MetricsAggregationType_1.default.Max,
1221
+ attributes: { status },
1222
+ };
1223
+ });
1224
+ return buildCeilingStep({
1225
+ args,
1226
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
1227
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES),
1228
+ groupByAttributeKeys: INSTANCE_GROUP,
1229
+ queries,
1230
+ aliases: queries.map((query) => {
1231
+ return query.alias;
1232
+ }),
1233
+ value: 0,
1234
+ words: {
1235
+ incidentTitle: `[OpenStack] ${data.name}`,
1236
+ incidentDescription: data.incidentDescription,
1237
+ criteriaName: `${data.name} - same status for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes`,
1238
+ criteriaDescription: `Triggers when an instance holds the status for the whole ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES}-minute window.`,
1239
+ },
1240
+ });
1241
+ },
1242
+ };
1243
+ }
1244
+ const INSTANCE_BUILD_STATUSES = ["BUILD", "BUILD(spawning)"];
1245
+ const INSTANCE_VERIFY_RESIZE_STATUSES = ["VERIFY_RESIZE"];
1246
+ /*
1247
+ * Every other word the health rules call on the way to something else, read from
1248
+ * the set: a word added there is watched here, as it is on the pages.
1249
+ */
1250
+ const INSTANCE_TRANSITIONING_STATUSES = Array.from(OpenStackResourceKind_1.OPENSTACK_INSTANCE_TRANSITIONAL_STATUSES).filter((status) => {
1251
+ return (!INSTANCE_BUILD_STATUSES.includes(status) &&
1252
+ !INSTANCE_VERIFY_RESIZE_STATUSES.includes(status));
1253
+ });
1254
+ const instanceStuckBuildingTemplate = buildInstanceStuckTemplate({
1255
+ id: "openstack-instance-stuck-building",
1256
+ name: "Instance Stuck Building",
1257
+ statuses: INSTANCE_BUILD_STATUSES,
1258
+ summary: `An instance stays in BUILD for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes.`,
1259
+ description: `Alert when an instance stays in BUILD for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes (openstack_nova_server_status filtered to that status label, in every collection of the window). One incident per instance. A build normally takes seconds to minutes, so this one is waiting on something. Check \`openstack server show <instance>\` and \`openstack server event list <instance>\`, then nova-compute's log on its host.`,
1260
+ incidentDescription: `This instance has been in BUILD for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes, when a build normally takes seconds to minutes. It is usually waiting on an image download, a port Neutron cannot bind, a volume, or a nova-compute that has gone quiet. Check openstack server show and openstack server event list for the instance named above, then nova-compute's log on its host. The incident resolves on its own once it leaves BUILD or is deleted.`,
1261
+ });
1262
+ const instanceStuckTransitioningTemplate = buildInstanceStuckTemplate({
1263
+ id: "openstack-instance-stuck-transitioning",
1264
+ name: "Instance Stuck Transitioning",
1265
+ statuses: INSTANCE_TRANSITIONING_STATUSES,
1266
+ summary: `An instance stays resizing, migrating or rebooting for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes.`,
1267
+ description: `Alert when an instance stays in one of ${INSTANCE_TRANSITIONING_STATUSES.join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes (openstack_nova_server_status filtered to that status label, in every collection of the window). One incident per instance. Check \`openstack server show <instance>\` and \`openstack server event list <instance>\`, then nova-compute's log on its host. A large live migration can honestly take this long: \`openstack server migration list --server <instance>\` says how far it has got.`,
1268
+ incidentDescription: `This instance has held one status on the way to another for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes. Most of these finish in minutes, though a large live migration can honestly take this long. Check openstack server show and openstack server event list for the instance named above, then nova-compute's log on its host. If nothing is running any more, openstack server set --state active is the usual way out, once you know why it stopped. The incident resolves on its own once it reaches its next status.`,
1269
+ });
1270
+ const instanceStuckInVerifyResizeTemplate = buildInstanceStuckTemplate({
1271
+ id: "openstack-instance-stuck-in-verify-resize",
1272
+ name: "Instance Stuck in Verify Resize",
1273
+ statuses: INSTANCE_VERIFY_RESIZE_STATUSES,
1274
+ summary: `A resized instance waits for confirmation for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes.`,
1275
+ description: `Alert when an instance stays in VERIFY_RESIZE for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes (openstack_nova_server_status filtered to that status label, in every collection of the window). One incident per instance. Nova is waiting for someone to confirm or revert, and holds the resources of both the old and new size until then. Check with its owner, then run \`openstack server resize confirm <instance>\` or \`openstack server resize revert <instance>\`.`,
1276
+ incidentDescription: `This instance has finished resizing and is waiting for someone to confirm or revert it, and has been for ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_STUCK_MINUTES} minutes. Nova holds the resources of both its old and its new size until then. Check with its owner, then run openstack server resize confirm or openstack server resize revert for the instance named above. The incident resolves on its own once it is confirmed or reverted.`,
1277
+ });
1278
+ // --- Network ---
1279
+ const routerNotActiveTemplate = {
1280
+ id: "openstack-router-not-active",
1281
+ name: "Router Not Active",
1282
+ summary: "A router's status is not ACTIVE.",
1283
+ description: "Alert when a region holds a router whose status is not ACTIVE for 10 minutes (openstack_neutron_routers_not_active above 0). One incident per region, because the exporter only counts them. Check `openstack router list --long`, then `openstack router show` on each one that is not ACTIVE, and the L3 agents or OVN behind it.",
1284
+ category: "Network",
1285
+ severity: "Warning",
1286
+ getMonitorStep: (args) => {
1287
+ const metricAlias = "routers_not_active";
1288
+ return buildCeilingStep({
1289
+ args,
1290
+ service: OpenStackResourceKind_1.OpenStackServiceType.Network,
1291
+ groupByAttributeKeys: API_GROUP,
1292
+ queries: [
1293
+ {
1294
+ alias: metricAlias,
1295
+ metricName: "openstack_neutron_routers_not_active",
1296
+ aggregationType: MetricsAggregationType_1.default.Max,
1297
+ },
1298
+ ],
1299
+ aliases: [metricAlias],
1300
+ value: 0,
1301
+ words: {
1302
+ incidentTitle: "[OpenStack] Router Not Active",
1303
+ incidentDescription: `A router in this region has a status other than ACTIVE, so the networks behind it may have lost their way out. Check openstack router list --long, then openstack router show on each one that is not ACTIVE, and the L3 agents or OVN behind it. The incident resolves on its own once every router is ACTIVE.`,
1304
+ criteriaName: "Router Not Active - count > 0",
1305
+ criteriaDescription: "Triggers when a region holds a router that is not ACTIVE for the whole window.",
1306
+ },
1307
+ });
1308
+ },
1309
+ };
1310
+ const floatingIpNotActiveTemplate = {
1311
+ id: "openstack-floating-ip-not-active",
1312
+ name: "Floating IP Not Active",
1313
+ summary: "A floating IP in use is not ACTIVE.",
1314
+ description: "Alert when a region holds a floating IP that is attached to something and not ACTIVE, for 10 minutes (openstack_neutron_floating_ips_associated_not_active above 0). A spare one is meant to be down, and does not count. One incident per region, because the exporter only counts them. Check `openstack floating ip list --long`, then the router it goes through and the L3 agents or OVN behind that.",
1315
+ category: "Network",
1316
+ severity: "Warning",
1317
+ getMonitorStep: (args) => {
1318
+ const metricAlias = "floating_ips_not_active";
1319
+ return buildCeilingStep({
1320
+ args,
1321
+ service: OpenStackResourceKind_1.OpenStackServiceType.Network,
1322
+ groupByAttributeKeys: API_GROUP,
1323
+ queries: [
1324
+ {
1325
+ alias: metricAlias,
1326
+ metricName: "openstack_neutron_floating_ips_associated_not_active",
1327
+ aggregationType: MetricsAggregationType_1.default.Max,
1328
+ },
1329
+ ],
1330
+ aliases: [metricAlias],
1331
+ value: 0,
1332
+ words: {
1333
+ incidentTitle: "[OpenStack] Floating IP Not Active",
1334
+ incidentDescription: `A floating IP in this region is attached to something and is not ACTIVE, so that instance cannot be reached from outside on it. Check openstack floating ip list --long for the ones that are not ACTIVE, then the router each goes through, and the L3 agents or OVN behind that. The incident resolves on its own once every one in use is ACTIVE.`,
1335
+ criteriaName: "Floating IP Not Active - count > 0",
1336
+ criteriaDescription: "Triggers when a region holds a floating IP in use that is not ACTIVE for the whole window.",
1337
+ },
1338
+ });
1339
+ },
1340
+ };
1341
+ /*
1342
+ * How full an external network is. Only the networks people depend on drawing from
1343
+ * count, as on the pages: a tenant's own small network filling up is theirs to see.
1344
+ *
1345
+ * Whether a network is external is only on `openstack_neutron_network`, so that is
1346
+ * read beside the address series, and the worker lines the two up on network_id
1347
+ * (getOpenStackGroupByKeysForMetric). Its value is a status code, 0 for ACTIVE, so
1348
+ * a Count says the row is there.
1349
+ *
1350
+ * Avg over Avg is the network's total, not a Sum: the Avgs of its subnets divide to
1351
+ * the same share as their totals, whatever a bucket holds. And IPv4 alone, because
1352
+ * a /64 is 2^64 addresses, so with one beside it a full IPv4 pool reads as 0%.
1353
+ */
1354
+ function buildExternalPoolStep(data) {
1355
+ const metricAlias = "addresses_used_percent";
1356
+ const externalAlias = "is_external_network";
1357
+ const attributes = { ip_version: "4" };
1358
+ return buildOpenStackMonitorStep({
1359
+ openstackMonitor: buildOpenStackSeriesConfig({
1360
+ cloudIdentifier: data.args.cloudIdentifier,
1361
+ queries: [
1362
+ {
1363
+ alias: "addresses_used",
1364
+ metricName: "openstack_neutron_network_ip_availabilities_used",
1365
+ aggregationType: MetricsAggregationType_1.default.Avg,
1366
+ attributes,
1367
+ },
1368
+ {
1369
+ alias: "addresses_total",
1370
+ metricName: "openstack_neutron_network_ip_availabilities_total",
1371
+ aggregationType: MetricsAggregationType_1.default.Avg,
1372
+ attributes,
1373
+ },
1374
+ {
1375
+ alias: externalAlias,
1376
+ metricName: "openstack_neutron_network",
1377
+ aggregationType: MetricsAggregationType_1.default.Count,
1378
+ attributes: { is_external: "true" },
1379
+ },
1380
+ ],
1381
+ formulas: [
1382
+ {
1383
+ alias: metricAlias,
1384
+ legend: "IPv4 Addresses Used (%)",
1385
+ legendUnit: "%",
1386
+ formula: "(addresses_used / addresses_total) * 100",
1387
+ },
1388
+ ],
1389
+ rollingTime: exports.OPENSTACK_WINDOW_BY_SERVICE[OpenStackResourceKind_1.OpenStackServiceType.Network],
1390
+ groupByAttributeKeys: NETWORK_GROUP,
1391
+ anchorService: OpenStackResourceKind_1.OpenStackServiceType.Network,
1392
+ }),
1393
+ offlineCriteriaInstance: buildOfflineCriteria({
1394
+ notification: Object.assign({ args: data.args }, data.words),
1395
+ metricAlias,
1396
+ filterType: data.filterType,
1397
+ value: data.value,
1398
+ // Both on one series: this network is external, and this full.
1399
+ filterCondition: FilterCondition_1.default.All,
1400
+ additionalFilters: [
1401
+ {
1402
+ metricAlias: externalAlias,
1403
+ filterType: CriteriaFilter_1.FilterType.GreaterThan,
1404
+ value: 0,
1405
+ },
1406
+ ],
1407
+ }),
1408
+ onlineCriteriaInstance: (0, RecommendationCriteriaBuilder_1.buildHealthyCriteriaInstance)({
1409
+ onlineMonitorStatusId: data.args.onlineMonitorStatusId,
1410
+ metricAlias,
1411
+ filterType: data.filterType === CriteriaFilter_1.FilterType.GreaterThanOrEqualTo
1412
+ ? CriteriaFilter_1.FilterType.LessThan
1413
+ : CriteriaFilter_1.FilterType.LessThanOrEqualTo,
1414
+ value: data.value,
1415
+ treatNoDataAsZero: true,
1416
+ /*
1417
+ * Any: a tenant's network reads as fine here however full it is, and a
1418
+ * network that stopped being external stops being this monitor's business.
1419
+ */
1420
+ additionalFilters: [
1421
+ {
1422
+ metricAlias: externalAlias,
1423
+ filterType: CriteriaFilter_1.FilterType.EqualTo,
1424
+ value: 0,
1425
+ },
1426
+ ],
1427
+ }),
1428
+ });
1429
+ }
1430
+ const externalIpPoolNearlyFullTemplate = {
1431
+ id: "openstack-external-ip-pool-nearly-full",
1432
+ name: "External IP Pool Nearly Full",
1433
+ summary: `An external network has used more than ${OpenStackHealthRules_1.OPENSTACK_IP_POOL_WARNING_PERCENT}% of its addresses.`,
1434
+ description: `Alert when an external network has used more than ${OpenStackHealthRules_1.OPENSTACK_IP_POOL_WARNING_PERCENT}% of its IPv4 addresses for 10 minutes (openstack_neutron_network_ip_availabilities_used / _total, read beside is_external on openstack_neutron_network). One incident per network. Tenant networks never fire: they are theirs to see. Check \`openstack ip availability show <network>\` and \`openstack floating ip list --network <network>\` for spare floating IPs to release, then add a subnet.`,
1435
+ category: "Network",
1436
+ severity: "Warning",
1437
+ getMonitorStep: (args) => {
1438
+ return buildExternalPoolStep({
1439
+ args,
1440
+ filterType: CriteriaFilter_1.FilterType.GreaterThan,
1441
+ value: OpenStackHealthRules_1.OPENSTACK_IP_POOL_WARNING_PERCENT,
1442
+ words: {
1443
+ incidentTitle: `[OpenStack] External IP Pool Nearly Full (>${OpenStackHealthRules_1.OPENSTACK_IP_POOL_WARNING_PERCENT}%)`,
1444
+ incidentDescription: `This external network has used nearly all its IPv4 addresses, so floating IPs and router gateways will soon stop being given out. Check openstack ip availability show for the network named above and openstack floating ip list --network for spare floating IPs to release, then add a subnet. The incident resolves on its own once it falls back.`,
1445
+ criteriaName: `External IP Pool - used > ${OpenStackHealthRules_1.OPENSTACK_IP_POOL_WARNING_PERCENT}%`,
1446
+ criteriaDescription: `Triggers when an external network has used more than ${OpenStackHealthRules_1.OPENSTACK_IP_POOL_WARNING_PERCENT}% of its IPv4 addresses for the whole window.`,
1447
+ },
1448
+ });
1449
+ },
1450
+ };
1451
+ const networkOutOfIpsTemplate = {
1452
+ id: "openstack-network-out-of-ips",
1453
+ name: "Network Out of IPs",
1454
+ summary: "An external network has no addresses left.",
1455
+ description: `Alert when an external network has given out every IPv4 address it has, for 10 minutes (openstack_neutron_network_ip_availabilities_used / _total at ${OpenStackHealthRules_1.OPENSTACK_IP_POOL_EXHAUSTED_PERCENT}%, read beside is_external on openstack_neutron_network). One incident per network. No new floating IP or router gateway can come from it. Tenant networks never fire: they are theirs to see. Check \`openstack ip availability show <network>\` and \`openstack floating ip list --network <network>\` for spare floating IPs to release, then add a subnet.`,
1456
+ category: "Network",
1457
+ severity: "Critical",
1458
+ getMonitorStep: (args) => {
1459
+ return buildExternalPoolStep({
1460
+ args,
1461
+ filterType: CriteriaFilter_1.FilterType.GreaterThanOrEqualTo,
1462
+ value: OpenStackHealthRules_1.OPENSTACK_IP_POOL_EXHAUSTED_PERCENT,
1463
+ words: {
1464
+ incidentTitle: "[OpenStack] Network Out of IPs",
1465
+ incidentDescription: `This external network has given out every IPv4 address it has, so no new floating IP or router gateway can come from it. Check openstack ip availability show for the network named above and openstack floating ip list --network for spare floating IPs to release, then add a subnet. The incident resolves on its own once it has room again.`,
1466
+ criteriaName: "Network Out of IPs - no addresses left",
1467
+ criteriaDescription: "Triggers when an external network has no IPv4 addresses left for the whole window.",
1468
+ },
1469
+ });
1470
+ },
1471
+ };
1472
+ const L3_AGENT_OF_ROUTER = "openstack_neutron_l3_agent_of_router";
1473
+ const routerWithoutActiveAgentTemplate = {
1474
+ id: "openstack-router-without-active-agent",
1475
+ name: "Router Without Active Agent",
1476
+ summary: "No alive L3 agent holds a router.",
1477
+ description: "Alert when no L3 agent set up that holds a router is alive, for 10 minutes (the Max of openstack_neutron_l3_agent_of_router by router reads below 1, filtered to agent_admin_up true). One incident per router. Its traffic has no way out. A cloud on OVN has no such agents, so this stays quiet there. Check `openstack network agent list --router <router> --long`, then the L3 agents' services and logs.",
1478
+ category: "Network",
1479
+ severity: "Critical",
1480
+ getMonitorStep: (args) => {
1481
+ return buildFloorStep({
1482
+ args,
1483
+ service: OpenStackResourceKind_1.OpenStackServiceType.Network,
1484
+ groupByAttributeKeys: ROUTER_GROUP,
1485
+ queries: [
1486
+ {
1487
+ alias: "agent_alive",
1488
+ metricName: L3_AGENT_OF_ROUTER,
1489
+ // Max across its agents: 1 while any one of them is alive.
1490
+ aggregationType: MetricsAggregationType_1.default.Max,
1491
+ attributes: { agent_admin_up: "true" },
1492
+ },
1493
+ ],
1494
+ words: {
1495
+ incidentTitle: "[OpenStack] Router Without Active Agent",
1496
+ incidentDescription: `No L3 agent holding this router is alive, so the networks behind it have no way out. Check openstack network agent list --router for the router named above, then the L3 agents' services and logs on those hosts. openstack network agent add router moves it to an agent that is alive, if none of them will come back. The incident resolves on its own once an agent is alive again.`,
1497
+ criteriaName: "Router Without Active Agent - none alive",
1498
+ criteriaDescription: "Triggers when no alive L3 agent holds a router for the whole window.",
1499
+ },
1500
+ });
1501
+ },
1502
+ };
1503
+ const routerWithTwoActiveAgentsTemplate = {
1504
+ id: "openstack-router-with-two-active-agents",
1505
+ name: "Router With Two Active Agents",
1506
+ summary: "Two L3 agents are both active for one router.",
1507
+ description: "Alert when two alive L3 agents both say they are active for one router, for 10 minutes (a Count of openstack_neutron_l3_agent_of_router filtered to ha_state active, agent_alive true and agent_admin_up true, above 1). One incident per router. A split brain: both answer for its addresses, and its traffic resets and drops. A cloud on OVN has no such agents, so this stays quiet there. Check `openstack network agent list --router <router> --long`, then keepalived and the HA network between those hosts.",
1508
+ category: "Network",
1509
+ severity: "Critical",
1510
+ getMonitorStep: (args) => {
1511
+ const metricAlias = "active_agents";
1512
+ return buildCeilingStep({
1513
+ args,
1514
+ service: OpenStackResourceKind_1.OpenStackServiceType.Network,
1515
+ groupByAttributeKeys: ROUTER_GROUP,
1516
+ queries: [
1517
+ {
1518
+ alias: metricAlias,
1519
+ metricName: L3_AGENT_OF_ROUTER,
1520
+ /*
1521
+ * One row per agent per collection, and the network job takes at least
1522
+ * 2 minutes (a test holds the agent to that), so a one-minute bucket's
1523
+ * Count is how many agents.
1524
+ */
1525
+ aggregationType: MetricsAggregationType_1.default.Count,
1526
+ attributes: {
1527
+ ha_state: "active",
1528
+ agent_alive: "true",
1529
+ agent_admin_up: "true",
1530
+ },
1531
+ },
1532
+ ],
1533
+ aliases: [metricAlias],
1534
+ value: OpenStackHealthRules_1.OPENSTACK_ROUTER_MAX_ACTIVE_AGENTS,
1535
+ // A count recovers at the line: a dead band below 1 would never be reached.
1536
+ recoveryValue: OpenStackHealthRules_1.OPENSTACK_ROUTER_MAX_ACTIVE_AGENTS,
1537
+ words: {
1538
+ incidentTitle: "[OpenStack] Router With Two Active Agents",
1539
+ incidentDescription: `Two alive L3 agents both say they are active for this router. That is a split brain: both answer for its addresses, so its traffic resets and drops. Check openstack network agent list --router for the router named above, then keepalived and the HA network between those hosts. The incident resolves on its own once only one is active.`,
1540
+ criteriaName: "Router With Two Active Agents - active agents > 1",
1541
+ criteriaDescription: "Triggers when more than one alive L3 agent is active for a router for the whole window.",
1542
+ },
1543
+ });
1544
+ },
1545
+ };
1546
+ // --- Storage ---
1547
+ function buildStoragePoolTemplate(data) {
1548
+ const metricAlias = "pool_used_percent";
1549
+ return {
1550
+ id: data.id,
1551
+ name: data.name,
1552
+ summary: `A storage pool is more than ${data.value}% full.`,
1553
+ description: `Alert when a Cinder storage pool is more than ${data.value}% full for 10 minutes. Computed per pool as (total - free) / total from openstack_cinder_pool_capacity_total_gb and _free_gb, as the backend reports them. One incident per pool. Check \`openstack volume backend pool list --long\`, then delete what is no longer used, or add capacity.`,
1554
+ category: "Storage",
1555
+ severity: data.severity,
1556
+ getMonitorStep: (args) => {
1557
+ return buildCeilingStep({
1558
+ args,
1559
+ service: OpenStackResourceKind_1.OpenStackServiceType.Volume,
1560
+ groupByAttributeKeys: STORAGE_POOL_GROUP,
1561
+ queries: [
1562
+ {
1563
+ alias: "pool_total",
1564
+ metricName: "openstack_cinder_pool_capacity_total_gb",
1565
+ aggregationType: MetricsAggregationType_1.default.Max,
1566
+ },
1567
+ {
1568
+ alias: "pool_free",
1569
+ metricName: "openstack_cinder_pool_capacity_free_gb",
1570
+ aggregationType: MetricsAggregationType_1.default.Min,
1571
+ },
1572
+ ],
1573
+ formulas: [
1574
+ {
1575
+ alias: metricAlias,
1576
+ legend: "Storage Pool Used (%)",
1577
+ legendUnit: "%",
1578
+ formula: "((pool_total - pool_free) / pool_total) * 100",
1579
+ },
1580
+ ],
1581
+ aliases: [metricAlias],
1582
+ value: data.value,
1583
+ words: {
1584
+ incidentTitle: `[OpenStack] ${data.name} (>${data.value}%)`,
1585
+ incidentDescription: data.incidentDescription,
1586
+ criteriaName: `${data.name} - used > ${data.value}%`,
1587
+ criteriaDescription: `Triggers when a storage pool is more than ${data.value}% full for the whole window.`,
1588
+ },
1589
+ });
1590
+ },
1591
+ };
1592
+ }
1593
+ const storagePoolWarningTemplate = buildStoragePoolTemplate({
1594
+ id: "openstack-storage-pool-warning",
1595
+ name: "Storage Pool Warning",
1596
+ severity: "Warning",
1597
+ value: OpenStackHealthRules_1.OPENSTACK_STORAGE_POOL_WARNING_PERCENT,
1598
+ incidentDescription: `This Cinder storage pool is filling up. New volumes start failing with No valid backend before it is actually full, because Cinder keeps some back. Check openstack volume backend pool list --long, then delete what is no longer used or add capacity. The incident resolves on its own once it falls back.`,
1599
+ });
1600
+ const storagePoolCriticalTemplate = buildStoragePoolTemplate({
1601
+ id: "openstack-storage-pool-critical",
1602
+ name: "Storage Pool Critical",
1603
+ severity: "Critical",
1604
+ value: OpenStackHealthRules_1.OPENSTACK_STORAGE_POOL_CRITICAL_PERCENT,
1605
+ incidentDescription: `This Cinder storage pool is nearly full. New volumes and snapshots are failing or about to, and on a thin-provisioned backend writes to existing volumes can fail too. Check openstack volume backend pool list --long, then delete what is no longer used or add capacity now. The incident resolves on its own once it falls back.`,
1606
+ });
1607
+ const volumesInErrorTemplate = {
1608
+ id: "openstack-volumes-in-error",
1609
+ name: "Volumes in Error",
1610
+ summary: "A volume in a region is in an error state.",
1611
+ description: `Alert when a region holds a volume in an error state for 10 minutes (openstack_cinder_volume_status_counter above 0, for each of ${Array.from(OpenStackResourceKind_1.OPENSTACK_VOLUME_ERROR_STATUSES).join(", ")}). One incident per region and status word, so one cloud's many volumes make few incidents. Check \`openstack volume list --all-projects --status <status>\`, then \`openstack volume show\` and cinder-volume's log on its backend.`,
1612
+ category: "Storage",
1613
+ severity: "Warning",
1614
+ getMonitorStep: (args) => {
1615
+ const queries = Array.from(OpenStackResourceKind_1.OPENSTACK_VOLUME_ERROR_STATUSES).map((status) => {
1616
+ return {
1617
+ alias: statusAlias(status),
1618
+ metricName: "openstack_cinder_volume_status_counter",
1619
+ aggregationType: MetricsAggregationType_1.default.Max,
1620
+ attributes: { status },
1621
+ };
1622
+ });
1623
+ return buildCeilingStep({
1624
+ args,
1625
+ service: OpenStackResourceKind_1.OpenStackServiceType.Volume,
1626
+ groupByAttributeKeys: [REGION, "status"],
1627
+ queries,
1628
+ aliases: queries.map((query) => {
1629
+ return query.alias;
1630
+ }),
1631
+ value: 0,
1632
+ words: {
1633
+ incidentTitle: "[OpenStack] Volumes in Error",
1634
+ incidentDescription: `One or more volumes in this region are in the error state named above. Check openstack volume list --all-projects --status for that state, then openstack volume show on each and cinder-volume's log on its backend. openstack volume set --state available is the usual way out once you know the volume is sound. The incident resolves on its own once none is left.`,
1635
+ criteriaName: "Volumes in Error - count > 0",
1636
+ criteriaDescription: "Triggers when a region holds a volume in an error state for the whole window.",
1637
+ },
1638
+ });
1639
+ },
1640
+ };
1641
+ /*
1642
+ * Per volume, read from its own series, rather than from the status counter the
1643
+ * issue names. The counter cannot tell one volume stuck for half an hour from a
1644
+ * steady stream of them each passing through `creating`, and cannot name it. Each
1645
+ * status word is its own query, as for instances.
1646
+ */
1647
+ const volumeStuckTemplate = {
1648
+ id: "openstack-volume-stuck",
1649
+ name: "Volume Stuck",
1650
+ summary: `A volume stays in a passing state for ${OpenStackHealthRules_1.OPENSTACK_VOLUME_STUCK_MINUTES} minutes.`,
1651
+ description: `Alert when a volume stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_VOLUME_TRANSITIONAL_STATUSES).join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_VOLUME_STUCK_MINUTES} minutes (openstack_cinder_volume_gb filtered to that status label, in every collection of the window). One incident per volume. Check \`openstack volume show <volume>\`, then cinder-volume's log on its backend. A large copy can honestly take this long.`,
1652
+ category: "Storage",
1653
+ severity: "Warning",
1654
+ getMonitorStep: (args) => {
1655
+ const queries = Array.from(OpenStackResourceKind_1.OPENSTACK_VOLUME_TRANSITIONAL_STATUSES).map((status) => {
1656
+ return {
1657
+ alias: statusAlias(status),
1658
+ metricName: "openstack_cinder_volume_gb",
1659
+ // Its value is its size, never 0: it says the row is there.
1660
+ aggregationType: MetricsAggregationType_1.default.Max,
1661
+ attributes: { status },
1662
+ };
1663
+ });
1664
+ return buildCeilingStep({
1665
+ args,
1666
+ service: OpenStackResourceKind_1.OpenStackServiceType.Volume,
1667
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_VOLUME_STUCK_MINUTES),
1668
+ groupByAttributeKeys: VOLUME_GROUP,
1669
+ queries,
1670
+ aliases: queries.map((query) => {
1671
+ return query.alias;
1672
+ }),
1673
+ value: 0,
1674
+ words: {
1675
+ incidentTitle: "[OpenStack] Volume Stuck",
1676
+ incidentDescription: `This volume has held one status on the way to another for ${OpenStackHealthRules_1.OPENSTACK_VOLUME_STUCK_MINUTES} minutes. A large copy can honestly take this long, but it is usually waiting on a cinder-volume that has gone quiet, or a backend that stopped answering. Check openstack volume show for the volume named above, then cinder-volume's log on its backend. openstack volume set --state is the way out once you know nothing is still working on it. The incident resolves on its own once it reaches its next status.`,
1677
+ criteriaName: `Volume Stuck - same status for ${OpenStackHealthRules_1.OPENSTACK_VOLUME_STUCK_MINUTES} minutes`,
1678
+ criteriaDescription: `Triggers when a volume holds the status for the whole ${OpenStackHealthRules_1.OPENSTACK_VOLUME_STUCK_MINUTES}-minute window.`,
1679
+ },
1680
+ });
1681
+ },
1682
+ };
1683
+ /*
1684
+ * Per image, from the one series of an image that names its status. Its value is when it was
1685
+ * created, never 0, so it says the row is there. Glance is read every five minutes, so the hour the
1686
+ * pages call stuck holds twelve collections. A status series exists only while an image is in that
1687
+ * status, so one uploaded at last, or deleted, recovers by going away.
1688
+ */
1689
+ const imageStuckTemplate = {
1690
+ id: "openstack-image-stuck",
1691
+ name: "Image Stuck",
1692
+ summary: `An image stays in a passing state for ${OpenStackHealthRules_1.OPENSTACK_IMAGE_STUCK_MINUTES} minutes.`,
1693
+ description: `Alert when an image stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_IMAGE_TRANSITIONAL_STATUSES).join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_IMAGE_STUCK_MINUTES} minutes (openstack_glance_image_created_at filtered to that status label, in every collection of the window). One incident per image. An image left in queued is what a failed upload looks like, and nothing moves it on. Check \`openstack image show <image>\`, then glance-api's log. A very large import can honestly take this long.`,
1694
+ category: "Storage",
1695
+ severity: "Warning",
1696
+ getMonitorStep: (args) => {
1697
+ const queries = Array.from(OpenStackResourceKind_1.OPENSTACK_IMAGE_TRANSITIONAL_STATUSES).map((status) => {
1698
+ return {
1699
+ alias: statusAlias(status),
1700
+ metricName: "openstack_glance_image_created_at",
1701
+ aggregationType: MetricsAggregationType_1.default.Max,
1702
+ attributes: { status },
1703
+ };
1704
+ });
1705
+ return buildCeilingStep({
1706
+ args,
1707
+ service: OpenStackResourceKind_1.OpenStackServiceType.Image,
1708
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_IMAGE_STUCK_MINUTES),
1709
+ groupByAttributeKeys: IMAGE_GROUP,
1710
+ queries,
1711
+ aliases: queries.map((query) => {
1712
+ return query.alias;
1713
+ }),
1714
+ value: 0,
1715
+ words: {
1716
+ incidentTitle: "[OpenStack] Image Stuck",
1717
+ incidentDescription: `This image has held one status on the way to another for ${OpenStackHealthRules_1.OPENSTACK_IMAGE_STUCK_MINUTES} minutes. An image left in queued is what a failed upload looks like: nothing moves it on, and an instance asking for it fails. Check openstack image show for the image named above, then glance-api's log. Upload it again, or delete it with openstack image delete. The incident resolves on its own once it reaches its next status or is deleted.`,
1718
+ criteriaName: `Image Stuck - same status for ${OpenStackHealthRules_1.OPENSTACK_IMAGE_STUCK_MINUTES} minutes`,
1719
+ criteriaDescription: `Triggers when an image holds the status for the whole ${OpenStackHealthRules_1.OPENSTACK_IMAGE_STUCK_MINUTES}-minute window.`,
1720
+ },
1721
+ });
1722
+ },
1723
+ };
1724
+ // --- Orchestration ---
1725
+ /*
1726
+ * A stack or cluster holding one word for the whole window, each word its own query because a
1727
+ * monitor's attribute filter is equality. Per part rather than per region, because what someone needs
1728
+ * from these is its name: the exporter counts Heat's words per region too, but a count cannot tell one
1729
+ * stack stuck for two hours from a stream of them passing through, and cannot say which. Its value is
1730
+ * the word's code, none of them 0 for the words read here, so it says the row is there. A word's series
1731
+ * goes away with the word, so one fixed, deleted or finished recovers by that.
1732
+ *
1733
+ * Heat's and Magnum's own timeouts fail what takes too long, and the agent reads both every five
1734
+ * minutes, so a failed one holds three collections in fifteen minutes and a stuck one twenty-four.
1735
+ */
1736
+ function buildLifecycleTemplate(data) {
1737
+ return {
1738
+ id: data.id,
1739
+ name: data.name,
1740
+ summary: data.summary,
1741
+ description: data.description,
1742
+ category: "Orchestration",
1743
+ severity: "Warning",
1744
+ forService: data.service,
1745
+ getMonitorStep: (args) => {
1746
+ const queries = data.statuses.map((status) => {
1747
+ return {
1748
+ alias: statusAlias(status),
1749
+ metricName: data.metricName,
1750
+ aggregationType: MetricsAggregationType_1.default.Max,
1751
+ attributes: { status },
1752
+ };
1753
+ });
1754
+ return buildCeilingStep({
1755
+ args,
1756
+ service: data.service,
1757
+ rollingTime: data.rollingTime,
1758
+ groupByAttributeKeys: data.groupByAttributeKeys,
1759
+ queries,
1760
+ aliases: queries.map((query) => {
1761
+ return query.alias;
1762
+ }),
1763
+ value: 0,
1764
+ words: {
1765
+ incidentTitle: `[OpenStack] ${data.name}`,
1766
+ incidentDescription: data.incidentDescription,
1767
+ criteriaName: data.criteriaName,
1768
+ criteriaDescription: data.criteriaDescription,
1769
+ },
1770
+ });
1771
+ },
1772
+ };
1773
+ }
1774
+ const stackFailedTemplate = buildLifecycleTemplate({
1775
+ id: "openstack-stack-failed",
1776
+ name: "Stack Failed",
1777
+ summary: "A Heat stack is in a failed state.",
1778
+ description: `Alert when a stack reads one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_STACK_FAILED_STATUSES).join(", ")} for 15 minutes (openstack_heat_stack_status filtered to that status label, in every collection of the window). One incident per stack. A failed stack stays failed until someone updates or deletes it. Check \`openstack stack failures list <stack>\`, then \`openstack stack event list <stack>\`. Magnum builds each cluster with a stack, so a failed cluster fires this too, on its stack.`,
1779
+ service: OpenStackResourceKind_1.OpenStackServiceType.Orchestration,
1780
+ metricName: "openstack_heat_stack_status",
1781
+ statuses: Array.from(OpenStackResourceKind_1.OPENSTACK_STACK_FAILED_STATUSES),
1782
+ groupByAttributeKeys: STACK_GROUP,
1783
+ incidentDescription: `This Heat stack is in the failed state named above, and stays that way until someone updates or deletes it. Whatever asked for it did not get it: what it built may be partly there, and is still using its project's quota. Check openstack stack failures list for the stack named above, then openstack stack event list. If it belongs to a Kubernetes cluster, openstack coe cluster show says which of its node groups failed. The incident resolves on its own once it is updated or deleted.`,
1784
+ criteriaName: "Stack Failed - a failed status for the whole window",
1785
+ criteriaDescription: "Triggers when a stack holds a failed status for the whole window.",
1786
+ });
1787
+ /*
1788
+ * INIT_IN_PROGRESS is left out, because its code is 0 and so reads as nothing here. It lasts a moment
1789
+ * in Heat, before a stack has an action to be stuck in.
1790
+ */
1791
+ const STACK_STUCK_STATUSES = Array.from(OpenStackResourceKind_1.OPENSTACK_STACK_IN_PROGRESS_STATUSES).filter((status) => {
1792
+ return status !== "INIT_IN_PROGRESS";
1793
+ });
1794
+ const stackStuckTemplate = buildLifecycleTemplate({
1795
+ id: "openstack-stack-stuck",
1796
+ name: "Stack Stuck In Progress",
1797
+ summary: `A Heat stack stays in progress for ${OpenStackHealthRules_1.OPENSTACK_STACK_STUCK_MINUTES} minutes.`,
1798
+ description: `Alert when a stack stays in one of ${STACK_STUCK_STATUSES.join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_STACK_STUCK_MINUTES} minutes (openstack_heat_stack_status filtered to that status label, in every collection of the window). One incident per stack. Heat fails what passes its own timeout, an hour unless someone chose longer, so this is one with a longer timeout, or one whose engine stopped: on a real cloud, restarting the engine moved neither stack it had been working on. Check \`openstack stack show <stack>\` and \`openstack orchestration service list\`, then heat-engine's log.`,
1799
+ service: OpenStackResourceKind_1.OpenStackServiceType.Orchestration,
1800
+ metricName: "openstack_heat_stack_status",
1801
+ statuses: STACK_STUCK_STATUSES,
1802
+ groupByAttributeKeys: STACK_GROUP,
1803
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_STACK_STUCK_MINUTES),
1804
+ incidentDescription: `This Heat stack has been in progress for ${OpenStackHealthRules_1.OPENSTACK_STACK_STUCK_MINUTES} minutes, past the hour Heat gives a stack unless someone chose longer. Either someone did, or the engine working on it stopped, and a restarted engine does not pick it back up by itself. Check openstack stack show for the stack named above and openstack orchestration service list, then heat-engine's log. openstack stack cancel, or an update, is the usual way out once you know why it stopped. The incident resolves on its own once it reaches its next status or is deleted.`,
1805
+ criteriaName: `Stack Stuck In Progress - same status for ${OpenStackHealthRules_1.OPENSTACK_STACK_STUCK_MINUTES} minutes`,
1806
+ criteriaDescription: `Triggers when a stack holds an in-progress status for the whole ${OpenStackHealthRules_1.OPENSTACK_STACK_STUCK_MINUTES}-minute window.`,
1807
+ });
1808
+ const containerClusterFailedTemplate = buildLifecycleTemplate({
1809
+ id: "openstack-container-cluster-failed",
1810
+ name: "Kubernetes Cluster Failed",
1811
+ summary: "A Magnum cluster is in a failed state.",
1812
+ description: `Alert when a Magnum cluster reads one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_CONTAINER_CLUSTER_FAILED_STATUSES).join(", ")} for 15 minutes (openstack_container_infra_cluster_status filtered to that status label, in every collection of the window). One incident per cluster. A cluster that failed to build usually has its reason on its Heat stack, and its project's quota is still in use. Check \`openstack coe cluster show <cluster>\` and \`openstack stack failures list <stack_id>\`.`,
1813
+ service: OpenStackResourceKind_1.OpenStackServiceType.ContainerInfra,
1814
+ metricName: "openstack_container_infra_cluster_status",
1815
+ statuses: Array.from(OpenStackResourceKind_1.OPENSTACK_CONTAINER_CLUSTER_FAILED_STATUSES),
1816
+ groupByAttributeKeys: CONTAINER_CLUSTER_GROUP,
1817
+ incidentDescription: `This Magnum cluster is in the failed state named above. Whoever asked for it does not have a working cluster, and what it built so far is still using its project's quota. Check openstack coe cluster show for the cluster named above, whose status_reason says which of its node groups failed, then openstack stack failures list on its stack_id, because Magnum builds a cluster with a Heat stack. The incident resolves on its own once it is updated or deleted.`,
1818
+ criteriaName: "Kubernetes Cluster Failed - a failed status for the whole window",
1819
+ criteriaDescription: "Triggers when a cluster holds a failed status for the whole window.",
1820
+ });
1821
+ const containerClusterStuckTemplate = buildLifecycleTemplate({
1822
+ id: "openstack-container-cluster-stuck",
1823
+ name: "Kubernetes Cluster Stuck",
1824
+ summary: `A Magnum cluster stays in progress for ${OpenStackHealthRules_1.OPENSTACK_CONTAINER_CLUSTER_STUCK_MINUTES} minutes.`,
1825
+ description: `Alert when a Magnum cluster stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_CONTAINER_CLUSTER_IN_PROGRESS_STATUSES).join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_CONTAINER_CLUSTER_STUCK_MINUTES} minutes (openstack_container_infra_cluster_status filtered to that status label, in every collection of the window). One incident per cluster. Magnum fails what passes the timeout it was created with, an hour unless someone chose longer, and only its conductor can notice: a stopped conductor leaves a cluster reading this for good. Check \`openstack coe service list\`, then \`openstack coe cluster show <cluster>\` and its stack.`,
1826
+ service: OpenStackResourceKind_1.OpenStackServiceType.ContainerInfra,
1827
+ metricName: "openstack_container_infra_cluster_status",
1828
+ statuses: Array.from(OpenStackResourceKind_1.OPENSTACK_CONTAINER_CLUSTER_IN_PROGRESS_STATUSES),
1829
+ groupByAttributeKeys: CONTAINER_CLUSTER_GROUP,
1830
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_CONTAINER_CLUSTER_STUCK_MINUTES),
1831
+ incidentDescription: `This Magnum cluster has been in progress for ${OpenStackHealthRules_1.OPENSTACK_CONTAINER_CLUSTER_STUCK_MINUTES} minutes, past the hour Magnum gives a cluster unless someone chose longer. Either someone did, or its conductor has stopped noticing how its Heat stack is doing: only a conductor moves a cluster on. Check openstack coe service list, then openstack coe cluster show for the cluster named above, and its stack with openstack stack show. The incident resolves on its own once it reaches its next status or is deleted.`,
1832
+ criteriaName: `Kubernetes Cluster Stuck - same status for ${OpenStackHealthRules_1.OPENSTACK_CONTAINER_CLUSTER_STUCK_MINUTES} minutes`,
1833
+ criteriaDescription: `Triggers when a cluster holds an in-progress status for the whole ${OpenStackHealthRules_1.OPENSTACK_CONTAINER_CLUSTER_STUCK_MINUTES}-minute window.`,
1834
+ });
1835
+ /*
1836
+ * Only a native read of these APIs lists their workers: the exporter has no series for them, so these
1837
+ * two can only be set up on a cloud a probe collects. No adminState filter on Heat's, because Heat has
1838
+ * no such thing, and every record of a host's engine is one series to a host and binary, by Min.
1839
+ */
1840
+ const orchestrationEngineDownTemplate = {
1841
+ id: "openstack-orchestration-engine-down",
1842
+ name: "Heat Engine Down",
1843
+ summary: "A heat-engine is down, on a cloud a probe collects.",
1844
+ description: "Alert when Heat lists a heat-engine as down for 15 minutes (openstack_heat_agent_state below 1, which only a probe sends, because only a read of Heat's own API says so). One incident per host. Heat keeps a record per engine process, and the others carry on while any is left, which is why this is a Warning. With every engine stopped Heat's API can't answer at all, recorded, and Orchestration API Down fires instead. Check `openstack orchestration service list`, then heat-engine's service and logs on that host.",
1845
+ category: "Control Plane",
1846
+ severity: "Warning",
1847
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Orchestration,
1848
+ requiresProbe: true,
1849
+ getMonitorStep: (args) => {
1850
+ return buildFloorStep({
1851
+ args,
1852
+ service: OpenStackResourceKind_1.OpenStackServiceType.Orchestration,
1853
+ groupByAttributeKeys: WORKER_GROUP,
1854
+ queries: [
1855
+ {
1856
+ alias: "heat_engine_up",
1857
+ metricName: "openstack_heat_agent_state",
1858
+ aggregationType: MetricsAggregationType_1.default.Min,
1859
+ },
1860
+ ],
1861
+ words: {
1862
+ incidentTitle: "[OpenStack] Heat Engine Down",
1863
+ incidentDescription: `Heat lists a heat-engine as down. The others carry on while any is left, though with less room, and a stack this engine was working on stays in progress until someone moves it. Check openstack orchestration service list, then heat-engine's service and logs on the host named above, and its route to RabbitMQ. The incident resolves on its own once it is up again, or Heat has dropped its record.`,
1864
+ criteriaName: "Heat Engine Down - heat-engine < 1",
1865
+ criteriaDescription: "Triggers when Heat lists a heat-engine as down for the whole window.",
1866
+ },
1867
+ });
1868
+ },
1869
+ };
1870
+ const containerInfraConductorDownTemplate = {
1871
+ id: "openstack-container-infra-conductor-down",
1872
+ name: "Magnum Conductor Down",
1873
+ summary: "A magnum-conductor is down, on a cloud a probe collects.",
1874
+ description: "Alert when an enabled magnum-conductor is down for 15 minutes (openstack_container_infra_agent_state below 1, filtered to adminState enabled, which only a probe sends, because only a read of Magnum's own API says so). One incident per host, and one someone disabled never fires. Magnum's API carries on answering without one, recorded, so nothing else says this: its clusters just stop moving. Check `openstack coe service list`, then magnum-conductor's service and logs on that host.",
1875
+ category: "Control Plane",
1876
+ severity: "Critical",
1877
+ forService: OpenStackResourceKind_1.OpenStackServiceType.ContainerInfra,
1878
+ requiresProbe: true,
1879
+ getMonitorStep: (args) => {
1880
+ return buildFloorStep({
1881
+ args,
1882
+ service: OpenStackResourceKind_1.OpenStackServiceType.ContainerInfra,
1883
+ groupByAttributeKeys: WORKER_GROUP,
1884
+ queries: [
1885
+ {
1886
+ alias: "magnum_conductor_up",
1887
+ metricName: "openstack_container_infra_agent_state",
1888
+ aggregationType: MetricsAggregationType_1.default.Min,
1889
+ attributes: { adminState: "enabled" },
1890
+ },
1891
+ ],
1892
+ words: {
1893
+ incidentTitle: "[OpenStack] Magnum Conductor Down",
1894
+ incidentDescription: `Magnum lists an enabled magnum-conductor as down. Its API carries on answering, so nothing else says this, but with none left no cluster can be created, resized or deleted, and clusters in progress stop moving. Check openstack coe service list, then magnum-conductor's service and logs on the host named above, and its route to RabbitMQ. The incident resolves on its own once it is up again, or disabled.`,
1895
+ criteriaName: "Magnum Conductor Down - enabled magnum-conductor < 1",
1896
+ criteriaDescription: "Triggers when Magnum lists an enabled magnum-conductor as down for the whole window.",
1897
+ },
1898
+ });
1899
+ },
1900
+ };
1901
+ // --- Bare Metal ---
1902
+ const IRONIC_NODE = "openstack_ironic_node";
1903
+ /*
1904
+ * A node in one of a set of provision states, on Ironic's own word: each is its own query, because
1905
+ * a monitor's attribute filter is equality. Per node, because it is a machine that is lost, and
1906
+ * grouped no finer, so a node that goes on to the next word or has its reason changed is the same
1907
+ * incident. The series only says a node is there, so its value is 1 and this reads whether it has
1908
+ * one at all. A node that moves on leaves the query and recovers by going away.
1909
+ */
1910
+ function bareMetalStateQueries(data) {
1911
+ return Array.from(data.states).map((state) => {
1912
+ return {
1913
+ alias: statusAlias(state),
1914
+ metricName: IRONIC_NODE,
1915
+ aggregationType: MetricsAggregationType_1.default.Max,
1916
+ attributes: Object.assign({ provision_state: state }, data.attributes),
1917
+ };
1918
+ });
1919
+ }
1920
+ const bareMetalNodeInErrorTemplate = {
1921
+ id: "openstack-bare-metal-node-in-error",
1922
+ name: "Bare Metal Node in Error",
1923
+ forService: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
1924
+ summary: "A bare metal node stays in a failed provision state.",
1925
+ description: `Alert when a bare metal node stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_BARE_METAL_ERROR_STATES).join(", ")} for 15 minutes (openstack_ironic_node filtered to that provision_state label, in every collection of the window). One incident per node, in maintenance or not, because Ironic does not always put a failed node in maintenance, and it stays failed until someone acts. Check the conductor's log as well as \`openstack baremetal node show <node> -c last_error\`: the exporter does not carry why, and Ironic can empty last_error within about a minute of a failure. A probe reads last_error, and keeps the last one it saw.`,
1926
+ category: "Bare Metal",
1927
+ severity: "Warning",
1928
+ getMonitorStep: (args) => {
1929
+ const queries = bareMetalStateQueries({
1930
+ states: OpenStackResourceKind_1.OPENSTACK_BARE_METAL_ERROR_STATES,
1931
+ });
1932
+ return buildCeilingStep({
1933
+ args,
1934
+ service: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
1935
+ groupByAttributeKeys: BARE_METAL_NODE_GROUP,
1936
+ queries,
1937
+ aliases: queries.map((query) => {
1938
+ return query.alias;
1939
+ }),
1940
+ value: 0,
1941
+ words: {
1942
+ incidentTitle: "[OpenStack] Bare Metal Node in Error",
1943
+ incidentDescription: `This node is in a failed provision state, so the machine is out of what the cloud can give until someone acts: Ironic retries none of these by itself. Check openstack baremetal node show for the node named above, and the conductor's log: Ironic can empty last_error within about a minute of a failure. Once it is fixed, move the node on with openstack baremetal node manage or provide. The incident resolves on its own once it has left the failed state.`,
1944
+ criteriaName: "Bare Metal Node in Error - failed provision state",
1945
+ criteriaDescription: "Triggers when a node holds a failed provision state for the whole window.",
1946
+ },
1947
+ });
1948
+ },
1949
+ };
1950
+ const bareMetalNodeStuckTemplate = {
1951
+ id: "openstack-bare-metal-node-stuck",
1952
+ name: "Bare Metal Node Stuck Transitioning",
1953
+ forService: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
1954
+ summary: `A bare metal node stays in a passing state for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_STUCK_MINUTES / 60} hours.`,
1955
+ description: `Alert when a bare metal node stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_BARE_METAL_TRANSITIONAL_STATES).join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_STUCK_MINUTES / 60} hours (openstack_ironic_node filtered to that provision_state label and maintenance false, in every collection of the window). One incident per node. Ironic gives up on a node waiting for its agent after 30 minutes by default, and the node then says it failed, so past this something else is holding it. A long disk erase can honestly take this long: the node's page reads Ironic's own time, which an erase's heartbeats keep moving, and an alert only reads the word. A node someone put in maintenance is left out. Check \`openstack baremetal node show <node>\` and the conductor's log.`,
1956
+ category: "Bare Metal",
1957
+ severity: "Warning",
1958
+ getMonitorStep: (args) => {
1959
+ const queries = bareMetalStateQueries({
1960
+ states: OpenStackResourceKind_1.OPENSTACK_BARE_METAL_TRANSITIONAL_STATES,
1961
+ attributes: { maintenance: "false" },
1962
+ });
1963
+ return buildCeilingStep({
1964
+ args,
1965
+ service: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
1966
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_BARE_METAL_STUCK_MINUTES),
1967
+ groupByAttributeKeys: BARE_METAL_NODE_GROUP,
1968
+ queries,
1969
+ aliases: queries.map((query) => {
1970
+ return query.alias;
1971
+ }),
1972
+ value: 0,
1973
+ words: {
1974
+ incidentTitle: "[OpenStack] Bare Metal Node Stuck Transitioning",
1975
+ incidentDescription: `This node has held one state on the way to another for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_STUCK_MINUTES / 60} hours, far past when Ironic gives up on waiting by default. Check openstack baremetal node show for the node named above and the conductor's log. A long disk erase can honestly take this long, and a node's page can tell, because an erase's heartbeats move Ironic's own time. The incident resolves on its own once it reaches its next state.`,
1976
+ criteriaName: `Bare Metal Node Stuck - same state for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_STUCK_MINUTES / 60} hours`,
1977
+ criteriaDescription: `Triggers when a node holds the state for the whole ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_STUCK_MINUTES / 60}-hour window.`,
1978
+ },
1979
+ });
1980
+ },
1981
+ };
1982
+ const bareMetalNodeMaintenanceTooLongTemplate = {
1983
+ id: "openstack-bare-metal-node-maintenance-too-long",
1984
+ name: "Bare Metal Node in Maintenance Too Long",
1985
+ forService: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
1986
+ summary: `A bare metal node stays in maintenance for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_MAINTENANCE_WARNING_DAYS} days.`,
1987
+ description: `Alert when a bare metal node stays in maintenance for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_MAINTENANCE_WARNING_DAYS} days (openstack_ironic_node filtered to maintenance true, in every collection of the window). A node someone put in maintenance is planned, like a service someone disabled, so nothing fires before that; past it, somebody has probably forgotten a machine the cloud has gone without all this time. One incident per node. This needs your metrics kept for at least that long. Check \`openstack baremetal node show <node> -c maintenance_reason\`, then \`openstack baremetal node maintenance unset <node>\`, or retire it.`,
1988
+ category: "Bare Metal",
1989
+ severity: "Warning",
1990
+ getMonitorStep: (args) => {
1991
+ const metricAlias = "in_maintenance";
1992
+ return buildCeilingStep({
1993
+ args,
1994
+ service: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
1995
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_BARE_METAL_MAINTENANCE_WARNING_DAYS * 24 * 60),
1996
+ groupByAttributeKeys: BARE_METAL_NODE_GROUP,
1997
+ queries: [
1998
+ {
1999
+ alias: metricAlias,
2000
+ metricName: IRONIC_NODE,
2001
+ aggregationType: MetricsAggregationType_1.default.Max,
2002
+ attributes: { maintenance: "true" },
2003
+ },
2004
+ ],
2005
+ aliases: [metricAlias],
2006
+ value: 0,
2007
+ words: {
2008
+ incidentTitle: "[OpenStack] Bare Metal Node in Maintenance Too Long",
2009
+ incidentDescription: `This node has been in maintenance for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_MAINTENANCE_WARNING_DAYS} days, and has been out of what the cloud can give all that time. Check openstack baremetal node show for the node named above and its maintenance reason, then finish the work and run openstack baremetal node maintenance unset, or retire it. The incident resolves on its own once it is out of maintenance.`,
2010
+ criteriaName: `Bare Metal Node in Maintenance - for ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_MAINTENANCE_WARNING_DAYS} days`,
2011
+ criteriaDescription: `Triggers when a node reads in maintenance for the whole ${OpenStackHealthRules_1.OPENSTACK_BARE_METAL_MAINTENANCE_WARNING_DAYS}-day window.`,
2012
+ },
2013
+ });
2014
+ },
2015
+ };
2016
+ const bareMetalPowerStateUnexpectedTemplate = {
2017
+ id: "openstack-bare-metal-power-state-unexpected",
2018
+ name: "Bare Metal Power State Unexpected",
2019
+ forService: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
2020
+ summary: "A deployed bare metal node has its power off.",
2021
+ description: `Alert when a deployed bare metal node reads power off for 15 minutes (openstack_ironic_node filtered to provision_state active, power_state power off and maintenance false). One incident per node. Nothing else counts as unexpected: a failed deploy leaves a node on, a node between deploys may be on or off, and an empty power state is not known rather than wrong. An instance its owner stopped does this too, and this alert cannot tell, because it reads one series: the node's page can, and says so. Check \`openstack baremetal node show <node>\`, then \`openstack server show\` for the instance on it, and whether anyone meant it.`,
2022
+ category: "Bare Metal",
2023
+ severity: "Warning",
2024
+ getMonitorStep: (args) => {
2025
+ const metricAlias = "deployed_with_power_off";
2026
+ return buildCeilingStep({
2027
+ args,
2028
+ service: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
2029
+ groupByAttributeKeys: BARE_METAL_NODE_GROUP,
2030
+ queries: [
2031
+ {
2032
+ alias: metricAlias,
2033
+ metricName: IRONIC_NODE,
2034
+ aggregationType: MetricsAggregationType_1.default.Max,
2035
+ attributes: {
2036
+ provision_state: "active",
2037
+ power_state: "power off",
2038
+ maintenance: "false",
2039
+ },
2040
+ },
2041
+ ],
2042
+ aliases: [metricAlias],
2043
+ value: 0,
2044
+ words: {
2045
+ incidentTitle: "[OpenStack] Bare Metal Power State Unexpected",
2046
+ incidentDescription: `This node is deployed and has its power off, so whatever runs on it has stopped. If its owner stopped the instance on it, that is planned, and this alert cannot tell: the node's page in OneUptime can. Check openstack server show for the instance on the node named above, then openstack baremetal node power on if nobody meant it. The incident resolves on its own once it is powered on, or no longer deployed.`,
2047
+ criteriaName: "Bare Metal Power State - deployed with its power off",
2048
+ criteriaDescription: "Triggers when a deployed node reads power off for the whole window.",
2049
+ },
2050
+ });
2051
+ },
2052
+ };
2053
+ /*
2054
+ * Only what Ironic says of itself, and never `up`, which reads 0 for this job on every cloud whenever
2055
+ * the exporter is down, with Ironic or without. So this speaks only where a read of Ironic gets far
2056
+ * enough to say 0: a probe, which reads the catalog first, and exporter 1.7.0. Stopped, the exporter
2057
+ * the agent runs answers an empty 200, the same as a cloud without Ironic (recorded:
2058
+ * services-ironic/api-down), so no alert can tell those apart from what it sends, and the pages say
2059
+ * only that it has gone quiet.
2060
+ */
2061
+ const bareMetalApiDownTemplate = {
2062
+ id: "openstack-bare-metal-api-down",
2063
+ name: "Bare Metal API Down",
2064
+ forService: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
2065
+ summary: "Ironic's API says it is not answering.",
2066
+ description: "Alert when Ironic's API reads as not answering for 15 minutes (openstack_ironic_up). One incident per region. This speaks where something can say so: a cloud a probe collects, or exporter 1.7.0. A stopped Ironic gives the exporter the OpenStack Agent runs nothing at all to read, which is what a cloud without Ironic looks like, so on an agent's cloud this stays quiet and the cloud's Bare Metal page says when it last heard from Ironic. Check `openstack baremetal node list` with a credential that may, then the ironic-api service's log.",
2067
+ category: "Bare Metal",
2068
+ severity: "Critical",
2069
+ getMonitorStep: (args) => {
2070
+ return buildFloorStep({
2071
+ args,
2072
+ service: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
2073
+ hasOwnAnchor: true,
2074
+ groupByAttributeKeys: API_GROUP,
2075
+ queries: [
2076
+ {
2077
+ alias: "api_up",
2078
+ metricName: exports.OPENSTACK_API_UP_METRIC_BY_SERVICE[OpenStackResourceKind_1.OpenStackServiceType.BareMetal],
2079
+ aggregationType: MetricsAggregationType_1.default.Min,
2080
+ },
2081
+ ],
2082
+ words: {
2083
+ incidentTitle: "[OpenStack] Bare Metal API Down",
2084
+ incidentDescription: "Ironic's API is not answering in this region, so nobody can deploy, clean or manage a bare metal node there. What is already deployed keeps running. Check the ironic-api service and its log, then openstack baremetal node list with a credential that may. The incident resolves on its own once it answers again.",
2085
+ criteriaName: "Bare Metal API Down - not answering",
2086
+ criteriaDescription: "Triggers when Ironic's API does not answer for the whole window.",
2087
+ },
2088
+ });
2089
+ },
2090
+ };
2091
+ // --- Shared file systems ---
2092
+ /*
2093
+ * A share holding one of a set of words for the whole window, one query per word, because a monitor's
2094
+ * attribute filter is equality. Per share rather than from the status counter: a count can't say which
2095
+ * share, or tell one stuck from a stream of them passing through. Read from _share_gb and not
2096
+ * _share_status, whose value is a code for the word, and creating's code is 0, recorded, so it would
2097
+ * never read as anything. A share's size is never 0. Its series goes away with the word, so a share
2098
+ * fixed, deleted or finished recovers by that.
2099
+ */
2100
+ function shareStateQueries(statuses) {
2101
+ return Array.from(statuses).map((status) => {
2102
+ return {
2103
+ alias: statusAlias(status),
2104
+ metricName: "openstack_sharev2_share_gb",
2105
+ aggregationType: MetricsAggregationType_1.default.Max,
2106
+ attributes: { status },
2107
+ };
2108
+ });
2109
+ }
2110
+ const shareInErrorTemplate = {
2111
+ id: "openstack-share-in-error",
2112
+ name: "Share in Error",
2113
+ forService: OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems,
2114
+ summary: "A Manila share is in an error state.",
2115
+ description: `Alert when a share stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_SHARE_ERROR_STATUSES).join(", ")} for 15 minutes (openstack_sharev2_share_gb filtered to that status label, in every collection of the window). One incident per share, in a region. Manila retries none of these by itself, so one stays until someone deals with it, and recovers when it is fixed or deleted. Check \`openstack share show <share>\`, then \`openstack share message list --resource-id <share>\`.`,
2116
+ category: "Storage",
2117
+ severity: "Warning",
2118
+ getMonitorStep: (args) => {
2119
+ const queries = shareStateQueries(OpenStackResourceKind_1.OPENSTACK_SHARE_ERROR_STATUSES);
2120
+ return buildCeilingStep({
2121
+ args,
2122
+ service: OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems,
2123
+ groupByAttributeKeys: SHARE_GROUP,
2124
+ queries,
2125
+ aliases: queries.map((query) => {
2126
+ return query.alias;
2127
+ }),
2128
+ value: 0,
2129
+ words: {
2130
+ incidentTitle: "[OpenStack] Share in Error",
2131
+ incidentDescription: `This share is in the error state named above, and whoever asked for it does not have what they asked for. Manila retries none of these by itself. Check openstack share show and openstack share message list for this share, then manila-share's log on its backend. A share that no backend could take has no zone, recorded, which is what a share type nothing matches looks like. The incident resolves on its own once it is fixed or deleted.`,
2132
+ criteriaName: "Share in Error - an error state for the whole window",
2133
+ criteriaDescription: "Triggers when a share holds an error state for the whole window.",
2134
+ },
2135
+ });
2136
+ },
2137
+ };
2138
+ const shareStuckTemplate = {
2139
+ id: "openstack-share-stuck",
2140
+ name: "Share Stuck",
2141
+ forService: OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems,
2142
+ summary: `A Manila share stays in a passing state for ${OpenStackHealthRules_1.OPENSTACK_SHARE_STUCK_MINUTES} minutes.`,
2143
+ description: `Alert when a share stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_SHARE_TRANSITIONAL_STATUSES).join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_SHARE_STUCK_MINUTES} minutes (openstack_sharev2_share_gb filtered to that status label, in every collection of the window). One incident per share, in a region. Manila has no timeout of its own for a slow backend, so a backend that hung reads the same as a slow one, and only time tells them apart. A share migrating or being backed up isn't watched: those last as long as its data takes to copy, because someone asked for that. Check \`openstack share service list\`, then manila-share's log on its backend.`,
2144
+ category: "Storage",
2145
+ severity: "Warning",
2146
+ getMonitorStep: (args) => {
2147
+ const queries = shareStateQueries(OpenStackResourceKind_1.OPENSTACK_SHARE_TRANSITIONAL_STATUSES);
2148
+ return buildCeilingStep({
2149
+ args,
2150
+ service: OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems,
2151
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_SHARE_STUCK_MINUTES),
2152
+ groupByAttributeKeys: SHARE_GROUP,
2153
+ queries,
2154
+ aliases: queries.map((query) => {
2155
+ return query.alias;
2156
+ }),
2157
+ value: 0,
2158
+ words: {
2159
+ incidentTitle: "[OpenStack] Share Stuck",
2160
+ incidentDescription: `This share has held the status named above for ${OpenStackHealthRules_1.OPENSTACK_SHARE_STUCK_MINUTES} minutes. Manila has no timeout of its own for this, so either its backend is very slow or nothing is working on it any more. Check openstack share service list, then manila-share's log on the backend that holds it. Only an admin can move it on, with openstack share set --status. The incident resolves on its own once it reaches its next status, or is deleted.`,
2161
+ criteriaName: `Share Stuck - same status for ${OpenStackHealthRules_1.OPENSTACK_SHARE_STUCK_MINUTES} minutes`,
2162
+ criteriaDescription: `Triggers when a share holds a passing status for the whole ${OpenStackHealthRules_1.OPENSTACK_SHARE_STUCK_MINUTES}-minute window.`,
2163
+ },
2164
+ });
2165
+ },
2166
+ };
2167
+ const sharedFileSystemsApiDownTemplate = buildApiDownTemplate({
2168
+ id: "openstack-shared-file-systems-api-down",
2169
+ name: "Shared File Systems API Down",
2170
+ summary: "Manila's API does not answer for 15 minutes.",
2171
+ description: "Alert when Manila's API does not answer for 15 minutes: every call the exporter made failed (openstack_sharev2_up reads 0), or the exporter did not answer that collection (up reads 0). One incident per region. Recorded on a stopped API, and every credential that can log in reads 1, so this can't be a credential being refused. Shares already mounted carry on, because their data doesn't go through this API. Check the manila-api service and its log, then `openstack share list`.",
2172
+ service: OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems,
2173
+ collectionMetricName: "up",
2174
+ incidentDescription: `Manila's API is not answering: every call the exporter made failed, or the exporter did not answer that collection. Shares already mounted carry on, but none can be created, resized or given new access. Check the manila-api service and its log, then openstack share list with a credential that works. The incident resolves on its own once it answers again.`,
2175
+ });
2176
+ /*
2177
+ * Only a read of Manila's API lists its services: the exporter has no series for them, so this can
2178
+ * only be set up on a cloud a probe collects. Stopped and down both read below 1. Someone who stopped
2179
+ * one on purpose and means it to stay stopped has the cloud's maintenance windows for that.
2180
+ */
2181
+ const shareServiceDownTemplate = {
2182
+ id: "openstack-share-service-down",
2183
+ name: "Manila Service Down",
2184
+ forService: OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems,
2185
+ requiresProbe: true,
2186
+ summary: "A Manila service stops, on a cloud a probe collects.",
2187
+ description: "Alert when an enabled Manila service reads stopped or down for 15 minutes (openstack_sharev2_agent_state below 1, filtered to adminState enabled, which only a probe sends, because only a read of Manila's own API says so). One incident per host and service. Recorded: a service shut down cleanly reads stopped at once, and one that died reads down only once its heartbeat has grown old. Its API carries on answering either way, so nothing else says this, and without its scheduler Manila's pools read 500. Check `openstack share service list`, and the service's log on its host.",
2188
+ category: "Control Plane",
2189
+ severity: "Warning",
2190
+ getMonitorStep: (args) => {
2191
+ return buildFloorStep({
2192
+ args,
2193
+ service: OpenStackResourceKind_1.OpenStackServiceType.SharedFileSystems,
2194
+ groupByAttributeKeys: WORKER_GROUP,
2195
+ queries: [
2196
+ {
2197
+ alias: "manila_service_up",
2198
+ metricName: "openstack_sharev2_agent_state",
2199
+ aggregationType: MetricsAggregationType_1.default.Min,
2200
+ attributes: { adminState: "enabled" },
2201
+ },
2202
+ ],
2203
+ words: {
2204
+ incidentTitle: "[OpenStack] Manila Service Down",
2205
+ incidentDescription: `Manila lists this service as stopped or down. Shares already mounted carry on, because their data doesn't go through it, but none on its backend can be created, resized or deleted. Check openstack share service list and the service's log on the host named above. The incident resolves on its own once it reads up, or someone disables it.`,
2206
+ criteriaName: "Manila Service Down - enabled service < 1",
2207
+ criteriaDescription: "Triggers when Manila lists an enabled service as stopped or down for the whole window.",
2208
+ },
2209
+ });
2210
+ },
2211
+ };
2212
+ // --- Load balancers ---
2213
+ const OCTAVIA_LOAD_BALANCER = "openstack_loadbalancer_loadbalancer_status";
2214
+ const OCTAVIA_POOL = "openstack_loadbalancer_pool_status";
2215
+ const OCTAVIA_AMPHORA = "openstack_loadbalancer_amphora_status";
2216
+ /*
2217
+ * Octavia's series carry a status in their labels and a code in their value, and the code of a healthy
2218
+ * one is 0 (recorded: a load balancer in ERROR in provisioning, with nothing wrong in operating, reads
2219
+ * 0 too). So a template reads which series are there, as a Count of the ones with the status label,
2220
+ * and never the value. One row per thing per collection, and the job takes at least 2 minutes, so a
2221
+ * bucket's Count is how many things hold the word.
2222
+ */
2223
+ function octaviaStateQueries(data) {
2224
+ return Array.from(data.statuses).map((status) => {
2225
+ return {
2226
+ alias: statusAlias(status),
2227
+ metricName: data.metricName,
2228
+ aggregationType: MetricsAggregationType_1.default.Count,
2229
+ attributes: Object.assign(Object.assign({}, (data.extraAttributes || {})), { [data.label]: status }),
2230
+ };
2231
+ });
2232
+ }
2233
+ function buildOctaviaStateTemplate(data) {
2234
+ return {
2235
+ id: data.id,
2236
+ name: data.name,
2237
+ summary: data.summary,
2238
+ description: data.description,
2239
+ category: "Load Balancers",
2240
+ severity: data.severity,
2241
+ forService: OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer,
2242
+ getMonitorStep: (args) => {
2243
+ const queries = octaviaStateQueries({
2244
+ metricName: data.metricName,
2245
+ label: data.label,
2246
+ statuses: data.statuses,
2247
+ extraAttributes: data.extraAttributes,
2248
+ });
2249
+ return buildCeilingStep({
2250
+ args,
2251
+ service: OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer,
2252
+ rollingTime: data.rollingTime,
2253
+ groupByAttributeKeys: data.groupByAttributeKeys,
2254
+ queries,
2255
+ aliases: queries.map((query) => {
2256
+ return query.alias;
2257
+ }),
2258
+ value: 0,
2259
+ words: {
2260
+ incidentTitle: `[OpenStack] ${data.name}`,
2261
+ incidentDescription: data.incidentDescription,
2262
+ criteriaName: data.criteriaName,
2263
+ criteriaDescription: data.criteriaDescription,
2264
+ },
2265
+ });
2266
+ },
2267
+ };
2268
+ }
2269
+ /*
2270
+ * Said by a cloud's exporter only while Octavia answers. A stopped API reads nothing, not 0
2271
+ * (services-octavia/api-down), as for a cloud without Octavia, so on an agent's cloud this stays quiet
2272
+ * and the cloud's Load Balancers page says when it last heard from Octavia.
2273
+ */
2274
+ const loadBalancerApiDownTemplate = {
2275
+ id: "openstack-load-balancer-api-down",
2276
+ name: "Load Balancers API Down",
2277
+ forService: OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer,
2278
+ summary: "Octavia's API says it is not answering.",
2279
+ description: "Alert when Octavia's API reads as not answering for 15 minutes (openstack_loadbalancer_up). One incident per region. This speaks only where something can say 0: a stopped Octavia API gives the exporter the OpenStack Agent runs an empty answer, which is what a cloud without Octavia looks like (recorded), so on an agent's cloud this stays quiet and the cloud's Load Balancers page says when it last heard from Octavia. Traffic through load balancers already built carries on either way. Check `openstack loadbalancer list` with a credential that may, then the octavia-api service and its log.",
2280
+ category: "Load Balancers",
2281
+ severity: "Critical",
2282
+ getMonitorStep: (args) => {
2283
+ return buildFloorStep({
2284
+ args,
2285
+ service: OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer,
2286
+ hasOwnAnchor: true,
2287
+ groupByAttributeKeys: API_GROUP,
2288
+ queries: [
2289
+ {
2290
+ alias: "api_up",
2291
+ metricName: exports.OPENSTACK_API_UP_METRIC_BY_SERVICE[OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer],
2292
+ aggregationType: MetricsAggregationType_1.default.Min,
2293
+ },
2294
+ ],
2295
+ words: {
2296
+ incidentTitle: "[OpenStack] Load Balancers API Down",
2297
+ incidentDescription: "Octavia's API is not answering in this region, so nobody can create, change or delete a load balancer there. Load balancers already built carry on, because their traffic doesn't go through this API. Check the octavia-api service and its log, then openstack loadbalancer list with a credential that may. The incident resolves on its own once it answers again.",
2298
+ criteriaName: "Load Balancers API Down - not answering",
2299
+ criteriaDescription: "Triggers when Octavia's API does not answer for the whole window.",
2300
+ },
2301
+ });
2302
+ },
2303
+ };
2304
+ const loadBalancerInErrorTemplate = buildOctaviaStateTemplate({
2305
+ id: "openstack-load-balancer-in-error",
2306
+ name: "Load Balancer in Error",
2307
+ summary: "An Octavia load balancer is in ERROR.",
2308
+ description: `Alert when a load balancer stays in provisioning status ERROR for 15 minutes (openstack_loadbalancer_loadbalancer_status filtered to that provisioning_status label, in every collection of the window). One incident per load balancer, in a region. Octavia retries none of these by itself, so one stays until someone fails it over or deletes it. Recorded: with the project amphorae boot in out of instance quota, Nova refused the amphora and the load balancer went to ERROR on its own, reading operating status OFFLINE. Check \`openstack loadbalancer show <load balancer>\`, then octavia-worker's log for the request.`,
2309
+ severity: "Critical",
2310
+ metricName: OCTAVIA_LOAD_BALANCER,
2311
+ label: "provisioning_status",
2312
+ statuses: OpenStackResourceKind_1.OPENSTACK_LOAD_BALANCER_ERROR_STATUSES,
2313
+ groupByAttributeKeys: LOAD_BALANCER_GROUP,
2314
+ incidentDescription: `This load balancer is in provisioning status ERROR, so whoever asked for it does not have one that works: it serves nothing, or whatever change was asked of it was not made. Octavia retries none of these by itself. Check openstack loadbalancer show for the load balancer named above, then octavia-worker's log; the usual causes are Nova refusing the amphora (quota, no valid host) and the management network. openstack loadbalancer failover can rebuild its amphora once that is fixed. The incident resolves on its own once it is back to ACTIVE or deleted.`,
2315
+ criteriaName: "Load Balancer in Error - provisioning ERROR for the whole window",
2316
+ criteriaDescription: "Triggers when a load balancer holds provisioning status ERROR for the whole window.",
2317
+ });
2318
+ const loadBalancerStuckTemplate = buildOctaviaStateTemplate({
2319
+ id: "openstack-load-balancer-stuck-pending",
2320
+ name: "Load Balancer Stuck Pending",
2321
+ summary: `An Octavia load balancer stays in a PENDING state for ${OpenStackHealthRules_1.OPENSTACK_LOAD_BALANCER_STUCK_MINUTES} minutes.`,
2322
+ description: `Alert when a load balancer stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_LOAD_BALANCER_TRANSITIONAL_STATUSES).join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_LOAD_BALANCER_STUCK_MINUTES} minutes (openstack_loadbalancer_loadbalancer_status filtered to that provisioning_status label, in every collection of the window), which is Canonical's own rule. One incident per load balancer. Octavia's API accepts a request and its worker does it, so with the worker stopped a change stays PENDING_UPDATE and a new load balancer PENDING_CREATE for as long as it is stopped (recorded), and the API still answers. Check \`openstack loadbalancer show <load balancer>\`, that octavia-worker is running and its route to RabbitMQ, then its log.`,
2323
+ severity: "Warning",
2324
+ metricName: OCTAVIA_LOAD_BALANCER,
2325
+ label: "provisioning_status",
2326
+ statuses: OpenStackResourceKind_1.OPENSTACK_LOAD_BALANCER_TRANSITIONAL_STATUSES,
2327
+ groupByAttributeKeys: LOAD_BALANCER_GROUP,
2328
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_LOAD_BALANCER_STUCK_MINUTES),
2329
+ incidentDescription: `This load balancer has held the PENDING status named above for ${OpenStackHealthRules_1.OPENSTACK_LOAD_BALANCER_STUCK_MINUTES} minutes. Octavia's API accepts a request and its worker does it, so the worker is stopped or cannot reach RabbitMQ, or it died partway: the load balancer stays locked, and no further change is accepted until it moves. Check openstack loadbalancer show for the load balancer named above, that octavia-worker is running on its hosts and its log. The incident resolves on its own once it reaches ACTIVE or ERROR, or is deleted.`,
2330
+ criteriaName: `Load Balancer Stuck Pending - same status for ${OpenStackHealthRules_1.OPENSTACK_LOAD_BALANCER_STUCK_MINUTES} minutes`,
2331
+ criteriaDescription: `Triggers when a load balancer holds a PENDING status for the whole ${OpenStackHealthRules_1.OPENSTACK_LOAD_BALANCER_STUCK_MINUTES}-minute window.`,
2332
+ });
2333
+ const amphoraInErrorTemplate = buildOctaviaStateTemplate({
2334
+ id: "openstack-amphora-in-error",
2335
+ name: "Amphora in Error",
2336
+ summary: "An Octavia amphora is in ERROR.",
2337
+ description: `Alert when an amphora stays in status ERROR for 15 minutes (openstack_loadbalancer_amphora_status filtered to that status label, in every collection of the window). One incident per amphora. Octavia's health manager replaces a failed amphora of an active-standby pair by itself, so one that stays in ERROR is one it could not replace, and the load balancer is running on one amphora or none. Only an admin may list amphorae, so a cloud read with a lower credential never sees this. Check \`openstack loadbalancer amphora list --loadbalancer <id>\`, then octavia-health-manager's log.`,
2338
+ severity: "Critical",
2339
+ metricName: OCTAVIA_AMPHORA,
2340
+ label: "status",
2341
+ statuses: OpenStackResourceKind_1.OPENSTACK_AMPHORA_ERROR_STATUSES,
2342
+ groupByAttributeKeys: AMPHORA_GROUP,
2343
+ incidentDescription: `This amphora is in status ERROR, which Octavia's health manager did not repair. Its load balancer runs on its other amphora, if it has one, and serves nothing if it has none. Check openstack loadbalancer amphora list for the load balancer named above and octavia-health-manager's log; the amphora's instance is the compute_id on its row. openstack loadbalancer failover rebuilds it. The incident resolves on its own once it is replaced.`,
2344
+ criteriaName: "Amphora in Error - status ERROR for the whole window",
2345
+ criteriaDescription: "Triggers when an amphora holds status ERROR for the whole window.",
2346
+ });
2347
+ const poolWithoutHealthyMembersTemplate = buildOctaviaStateTemplate({
2348
+ id: "openstack-pool-without-healthy-members",
2349
+ name: "Pool Has No Healthy Members",
2350
+ summary: "Every member of an Octavia pool is failing its health check.",
2351
+ description: "Alert when a pool's operating status is ERROR for 15 minutes (openstack_loadbalancer_pool_status filtered to that operating_status label, in every collection of the window). One incident per pool. Octavia's operating status is what the health monitors say, and it is a different question from provisioning: recorded, with a security group that stopped the checks, every member went ERROR while the pool and its load balancer stayed ACTIVE in provisioning, so nothing else shows it. A pool with only some members down reads DEGRADED, and nothing pages for that. Check `openstack loadbalancer member list <pool>`, then the members' security group and the health monitor's path.",
2352
+ severity: "Critical",
2353
+ metricName: OCTAVIA_POOL,
2354
+ label: "operating_status",
2355
+ statuses: new Set(["ERROR"]),
2356
+ groupByAttributeKeys: LOAD_BALANCER_GROUP,
2357
+ incidentDescription: `Every member of this pool fails its health check, so the load balancer has nowhere to send what it gets. The pool and the load balancer still read ACTIVE, because provisioning is a different thing from health. Check openstack loadbalancer member list for the pool named above, then whether the members are running, listen on their port and answer the health monitor's path, and whether their security group lets the amphora's checks in. The incident resolves on its own once a member is healthy again.`,
2358
+ criteriaName: "Pool Has No Healthy Members - operating ERROR for the whole window",
2359
+ criteriaDescription: "Triggers when a pool's operating status is ERROR for the whole window.",
2360
+ });
2361
+ /*
2362
+ * An active-standby pair has one MASTER. A Count of the ALLOCATED amphorae saying MASTER for one load
2363
+ * balancer, above 1, as the router rule counts its active agents. An amphora being replaced is in ERROR
2364
+ * or BOOTING and so is left out.
2365
+ */
2366
+ const loadBalancerWithTwoMastersTemplate = {
2367
+ id: "openstack-load-balancer-with-two-masters",
2368
+ name: "Load Balancer With Two Masters",
2369
+ summary: "Two amphorae are both MASTER for one load balancer.",
2370
+ description: "Alert when two allocated amphorae both say MASTER for one load balancer, for 15 minutes (a Count of openstack_loadbalancer_amphora_status filtered to role MASTER and status ALLOCATED, above 1). One incident per load balancer. A split pair: both answer for its address. The pair's keepalived settles which is active over their VRRP, so this is the VRRP traffic between them being cut, or one amphora's record being stale. Only an admin may list amphorae. Check `openstack loadbalancer amphora list --loadbalancer <id>`, then the VRRP traffic on the load balancer's network between the two.",
2371
+ category: "Load Balancers",
2372
+ severity: "Critical",
2373
+ forService: OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer,
2374
+ getMonitorStep: (args) => {
2375
+ const metricAlias = "master_amphorae";
2376
+ return buildCeilingStep({
2377
+ args,
2378
+ service: OpenStackResourceKind_1.OpenStackServiceType.LoadBalancer,
2379
+ groupByAttributeKeys: [REGION, "loadbalancer_id"],
2380
+ queries: [
2381
+ {
2382
+ alias: metricAlias,
2383
+ metricName: OCTAVIA_AMPHORA,
2384
+ // One row per amphora per collection: a bucket's Count is how many.
2385
+ aggregationType: MetricsAggregationType_1.default.Count,
2386
+ attributes: {
2387
+ role: OpenStackResourceKind_1.OPENSTACK_AMPHORA_ROLE_MASTER,
2388
+ status: "ALLOCATED",
2389
+ },
2390
+ },
2391
+ ],
2392
+ aliases: [metricAlias],
2393
+ value: 1,
2394
+ // A count recovers at the line: a dead band below 1 would never be reached.
2395
+ recoveryValue: 1,
2396
+ words: {
2397
+ incidentTitle: "[OpenStack] Load Balancer With Two Masters",
2398
+ incidentDescription: `Two amphorae both say they are the MASTER for this load balancer. That is a split pair: both answer for its address, so its connections reset and drop. Check openstack loadbalancer amphora list for the load balancer named above, then the VRRP traffic between the two amphorae on its network. openstack loadbalancer failover rebuilds one. The incident resolves on its own once only one is MASTER.`,
2399
+ criteriaName: "Load Balancer With Two Masters - MASTER amphorae > 1",
2400
+ criteriaDescription: "Triggers when more than one allocated amphora says MASTER for a load balancer for the whole window.",
2401
+ },
2402
+ });
2403
+ },
2404
+ };
2405
+ // --- Databases ---
2406
+ /*
2407
+ * An instance holding one of a set of words for the whole window, one query per word. By a count of
2408
+ * its datapoints, because the series' value is a code for the word, and a code can be 0. Its series
2409
+ * goes away with the word, so an instance fixed, deleted or finished recovers by that.
2410
+ */
2411
+ function databaseInstanceStateQueries(statuses) {
2412
+ return Array.from(statuses).map((status) => {
2413
+ return {
2414
+ alias: statusAlias(status),
2415
+ metricName: "openstack_trove_instance_status",
2416
+ aggregationType: MetricsAggregationType_1.default.Count,
2417
+ attributes: { status },
2418
+ };
2419
+ });
2420
+ }
2421
+ const databaseInstanceInErrorTemplate = {
2422
+ id: "openstack-database-instance-in-error",
2423
+ name: "Database Instance in Error",
2424
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Database,
2425
+ summary: "A Trove database instance is in an error state.",
2426
+ description: `Alert when a database instance reads one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_DATABASE_INSTANCE_ERROR_STATUSES).join(", ")} for 15 minutes (openstack_trove_instance_status filtered to that status label, in every collection of the window). One incident per instance, in a region. Trove retries none of these by itself, so one stays until someone deals with it, and recovers when it is fixed or deleted. Check \`openstack database instance show <instance>\`, whose fault says why.`,
2427
+ category: "Databases",
2428
+ severity: "Warning",
2429
+ getMonitorStep: (args) => {
2430
+ const queries = databaseInstanceStateQueries(OpenStackResourceKind_1.OPENSTACK_DATABASE_INSTANCE_ERROR_STATUSES);
2431
+ return buildCeilingStep({
2432
+ args,
2433
+ service: OpenStackResourceKind_1.OpenStackServiceType.Database,
2434
+ groupByAttributeKeys: DATABASE_INSTANCE_GROUP,
2435
+ queries,
2436
+ aliases: queries.map((query) => {
2437
+ return query.alias;
2438
+ }),
2439
+ value: 0,
2440
+ words: {
2441
+ incidentTitle: "[OpenStack] Database Instance in Error",
2442
+ incidentDescription: `This database instance is in the error state named above, and whoever asked for it does not have it. Check openstack database instance show for its fault, which says why Trove gave up: usually Nova refused its guest, or the guest never reported. The incident resolves on its own once it is fixed or deleted.`,
2443
+ criteriaName: "Database Instance in Error - an error state for the whole window",
2444
+ criteriaDescription: "Triggers when an instance holds an error state for the whole window.",
2445
+ },
2446
+ });
2447
+ },
2448
+ };
2449
+ const databaseInstanceStuckTemplate = {
2450
+ id: "openstack-database-instance-stuck",
2451
+ name: "Database Instance Stuck",
2452
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Database,
2453
+ summary: `A Trove database instance stays on its way for ${OpenStackHealthRules_1.OPENSTACK_DATABASE_INSTANCE_STUCK_MINUTES} minutes.`,
2454
+ description: `Alert when a database instance stays in one of ${Array.from(OpenStackResourceKind_1.OPENSTACK_DATABASE_INSTANCE_TRANSITIONAL_STATUSES).join(", ")} for ${OpenStackHealthRules_1.OPENSTACK_DATABASE_INSTANCE_STUCK_MINUTES} minutes (openstack_trove_instance_status filtered to that status label, in every collection of the window). One incident per instance, in a region. Trove has no list of its own workers, so a stopped trove-taskmanager shows up nowhere else: its lists keep answering without it, recorded, and what it was working on just stops moving. Check that trove-taskmanager is running, then \`openstack database instance show <instance>\`.`,
2455
+ category: "Databases",
2456
+ severity: "Warning",
2457
+ getMonitorStep: (args) => {
2458
+ const queries = databaseInstanceStateQueries(OpenStackResourceKind_1.OPENSTACK_DATABASE_INSTANCE_TRANSITIONAL_STATUSES);
2459
+ return buildCeilingStep({
2460
+ args,
2461
+ service: OpenStackResourceKind_1.OpenStackServiceType.Database,
2462
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_DATABASE_INSTANCE_STUCK_MINUTES),
2463
+ groupByAttributeKeys: DATABASE_INSTANCE_GROUP,
2464
+ queries,
2465
+ aliases: queries.map((query) => {
2466
+ return query.alias;
2467
+ }),
2468
+ value: 0,
2469
+ words: {
2470
+ incidentTitle: "[OpenStack] Database Instance Stuck",
2471
+ incidentDescription: `This database instance has held the status named above for ${OpenStackHealthRules_1.OPENSTACK_DATABASE_INSTANCE_STUCK_MINUTES} minutes. Trove gives up on a guest by itself well before that, so nothing is working on it any more. Check that trove-taskmanager is running, then openstack database instance show. The incident resolves on its own once it reaches its next status, or is deleted.`,
2472
+ criteriaName: `Database Instance Stuck - same status for ${OpenStackHealthRules_1.OPENSTACK_DATABASE_INSTANCE_STUCK_MINUTES} minutes`,
2473
+ criteriaDescription: `Triggers when an instance holds a passing status for the whole ${OpenStackHealthRules_1.OPENSTACK_DATABASE_INSTANCE_STUCK_MINUTES}-minute window.`,
2474
+ },
2475
+ });
2476
+ },
2477
+ };
2478
+ /*
2479
+ * What its database has used of its volume, per instance. An instance that isn't running reads 0 used,
2480
+ * recorded, so a stopped one can't fire this. No recording has a running one: a runner can't get a
2481
+ * guest to ACTIVE, so the used side of this has only met made-up rows.
2482
+ */
2483
+ const databaseVolumeNearlyFullTemplate = {
2484
+ id: "openstack-database-volume-nearly-full",
2485
+ name: "Database Volume Nearly Full",
2486
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Database,
2487
+ summary: `A Trove database's volume is past ${OpenStackHealthRules_1.OPENSTACK_DATABASE_VOLUME_WARNING_PERCENT}% used.`,
2488
+ description: `Alert when a database instance has used ${OpenStackHealthRules_1.OPENSTACK_DATABASE_VOLUME_WARNING_PERCENT}% of its volume for 15 minutes (openstack_trove_instance_volume_used_gb over openstack_trove_instance_volume_size_gb). One incident per instance, in a region. A database that fills its volume stops taking writes, and resizing it is a change someone has to plan. It recovers when the volume is resized or the database shrinks. Check \`openstack database instance show <instance>\`, then \`openstack database instance resize volume\`.`,
2489
+ category: "Databases",
2490
+ severity: "Warning",
2491
+ getMonitorStep: (args) => {
2492
+ return buildCeilingStep({
2493
+ args,
2494
+ service: OpenStackResourceKind_1.OpenStackServiceType.Database,
2495
+ groupByAttributeKeys: DATABASE_INSTANCE_GROUP,
2496
+ queries: [
2497
+ {
2498
+ alias: "used_gb",
2499
+ metricName: "openstack_trove_instance_volume_used_gb",
2500
+ aggregationType: MetricsAggregationType_1.default.Max,
2501
+ },
2502
+ {
2503
+ alias: "size_gb",
2504
+ metricName: "openstack_trove_instance_volume_size_gb",
2505
+ aggregationType: MetricsAggregationType_1.default.Max,
2506
+ },
2507
+ ],
2508
+ formulas: [
2509
+ {
2510
+ alias: "volume_used_percent",
2511
+ legend: "Volume used (%)",
2512
+ legendUnit: "%",
2513
+ formula: "(used_gb / size_gb) * 100",
2514
+ },
2515
+ ],
2516
+ aliases: ["volume_used_percent"],
2517
+ filterType: CriteriaFilter_1.FilterType.GreaterThanOrEqualTo,
2518
+ value: OpenStackHealthRules_1.OPENSTACK_DATABASE_VOLUME_WARNING_PERCENT,
2519
+ words: {
2520
+ incidentTitle: "[OpenStack] Database Volume Nearly Full",
2521
+ incidentDescription: `This database has used ${OpenStackHealthRules_1.OPENSTACK_DATABASE_VOLUME_WARNING_PERCENT}% or more of its volume, and it stops taking writes when that fills. Check openstack database instance show, then resize it with openstack database instance resize volume, or have whoever owns it clear out what it holds. The incident resolves on its own once it has room again.`,
2522
+ criteriaName: `Database Volume Nearly Full - used >= ${OpenStackHealthRules_1.OPENSTACK_DATABASE_VOLUME_WARNING_PERCENT}%`,
2523
+ criteriaDescription: `Triggers when a database has used ${OpenStackHealthRules_1.OPENSTACK_DATABASE_VOLUME_WARNING_PERCENT}% of its volume for the whole window.`,
2524
+ },
2525
+ });
2526
+ },
2527
+ };
2528
+ /*
2529
+ * A stopped conductor leaves Ironic's API answering and its nodes listed as they were, recorded on
2530
+ * DevStack, so only its own list says so. The exporter has no series for that, and Ironic refuses a
2531
+ * project's credential the list, so this speaks only for a probe on a cloud whose policy lets it read
2532
+ * them. Warning, as several conductors share the nodes between them.
2533
+ */
2534
+ const bareMetalConductorDownTemplate = {
2535
+ id: "openstack-bare-metal-conductor-down",
2536
+ name: "Bare Metal Conductor Down",
2537
+ summary: "An ironic-conductor is down, on a cloud a probe collects.",
2538
+ description: "Alert when Ironic lists a conductor as not alive for 15 minutes (openstack_ironic_agent_state below 1, which only a probe sends, and only where the cloud's policy lets its credential read Ironic's conductors: by default it refuses a project's). One incident per host. Ironic's API carries on answering with a conductor stopped, and every node reads as it did, recorded, so nothing else says this. Check `openstack baremetal conductor list`.",
2539
+ category: "Bare Metal",
2540
+ severity: "Warning",
2541
+ forService: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
2542
+ requiresProbe: true,
2543
+ getMonitorStep: (args) => {
2544
+ return buildFloorStep({
2545
+ args,
2546
+ service: OpenStackResourceKind_1.OpenStackServiceType.BareMetal,
2547
+ groupByAttributeKeys: WORKER_GROUP,
2548
+ queries: [
2549
+ {
2550
+ alias: "ironic_conductor_up",
2551
+ metricName: "openstack_ironic_agent_state",
2552
+ aggregationType: MetricsAggregationType_1.default.Min,
2553
+ },
2554
+ ],
2555
+ words: {
2556
+ incidentTitle: "[OpenStack] Bare Metal Conductor Down",
2557
+ incidentDescription: "Ironic lists this conductor as not alive. Another takes its nodes where there is one. With none left, nodes read as they did and nothing can be deployed, cleaned or powered through Ironic. Check openstack baremetal conductor list, then ironic-conductor's service and logs on the host named above. The incident resolves on its own once Ironic lists it as alive again, or has dropped its record.",
2558
+ criteriaName: "Bare Metal Conductor Down - ironic-conductor < 1",
2559
+ criteriaDescription: "Triggers when Ironic lists a conductor as not alive for the whole window.",
2560
+ },
2561
+ });
2562
+ },
2563
+ };
2564
+ const databaseApiDownTemplate = buildApiDownTemplate({
2565
+ id: "openstack-database-api-down",
2566
+ name: "Databases API Down",
2567
+ summary: "Trove's API does not answer for 15 minutes.",
2568
+ description: "Alert when the exporter's read of Trove fails for 15 minutes (openstack_trove_up reads 0), or the exporter does not answer that collection (up reads 0). One incident per region. The exporter reads Trove's mgmt API, which only an admin may, so a credential it refuses reads the same as a stopped API, recorded. A cloud whose credential has never read Trove isn't offered this. A stopped trove-taskmanager leaves this at 1: Database Instance Stuck is what says that. Check the trove-api service and its log, then `openstack database instance list --all-projects`.",
2569
+ service: OpenStackResourceKind_1.OpenStackServiceType.Database,
2570
+ collectionMetricName: "up",
2571
+ incidentDescription: `The exporter's read of Trove is failing: its API stopped answering, or this credential is no longer allowed its mgmt API, which reads the same. Databases already running carry on, but none can be created, resized or backed up. Check the trove-api service and its log, then openstack database instance list --all-projects with this credential. The incident resolves on its own once it answers again.`,
2572
+ });
2573
+ // --- DNS ---
2574
+ const dnsZoneInErrorTemplate = {
2575
+ id: "openstack-dns-zone-in-error",
2576
+ name: "DNS Zone in Error",
2577
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2578
+ summary: "A Designate zone is in ERROR.",
2579
+ description: `Alert when a zone reads ${OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_ERROR} for 15 minutes (openstack_designate_zone_status filtered to that status label, in every collection of the window). One incident per zone, in a region. Its worker gave up on writing it to a DNS server, recorded with the server stopped, so what the zone says may be out of date there. Check that the DNS servers in its pool are answering, then \`openstack zone show\`. It recovers when the zone reads anything else.`,
2580
+ category: "Network",
2581
+ severity: "Warning",
2582
+ getMonitorStep: (args) => {
2583
+ return buildCeilingStep({
2584
+ args,
2585
+ service: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2586
+ groupByAttributeKeys: DNS_ZONE_GROUP,
2587
+ queries: [
2588
+ {
2589
+ alias: statusAlias(OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_ERROR),
2590
+ metricName: "openstack_designate_zone_status",
2591
+ aggregationType: MetricsAggregationType_1.default.Count,
2592
+ attributes: { status: OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_ERROR },
2593
+ },
2594
+ ],
2595
+ aliases: [statusAlias(OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_ERROR)],
2596
+ value: 0,
2597
+ words: {
2598
+ incidentTitle: "[OpenStack] DNS Zone in Error",
2599
+ incidentDescription: `Designate's worker gave up writing this zone to a DNS server, so what it answers there may be out of date. Check that the DNS servers in its pool are answering, then openstack zone show and the designate-worker log. The incident resolves on its own once it reads anything else.`,
2600
+ criteriaName: "DNS Zone in Error - ERROR for the whole window",
2601
+ criteriaDescription: "Triggers when a zone reads ERROR for the whole window.",
2602
+ },
2603
+ });
2604
+ },
2605
+ };
2606
+ const dnsZoneStuckPendingTemplate = {
2607
+ id: "openstack-dns-zone-stuck-pending",
2608
+ name: "DNS Zone Stuck Pending",
2609
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2610
+ summary: `A Designate zone stays PENDING for ${OpenStackHealthRules_1.OPENSTACK_DNS_ZONE_PENDING_STUCK_MINUTES} minutes.`,
2611
+ description: `Alert when a zone reads ${OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_PENDING} for ${OpenStackHealthRules_1.OPENSTACK_DNS_ZONE_PENDING_STUCK_MINUTES} minutes (a count of openstack_designate_zone_status filtered to that status label, in every collection of the window, because PENDING's code is 0). One incident per zone, in a region. Its worker gives up by itself in a few minutes, so what stays PENDING has nothing working on it: a stopped worker reads this way, recorded, and the API goes on taking changes it never carries out. Check that designate-worker is running, then \`openstack dns service list\`.`,
2612
+ category: "Network",
2613
+ severity: "Warning",
2614
+ getMonitorStep: (args) => {
2615
+ return buildCeilingStep({
2616
+ args,
2617
+ service: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2618
+ rollingTime: windowHolding(OpenStackHealthRules_1.OPENSTACK_DNS_ZONE_PENDING_STUCK_MINUTES),
2619
+ groupByAttributeKeys: DNS_ZONE_GROUP,
2620
+ queries: [
2621
+ {
2622
+ alias: statusAlias(OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_PENDING),
2623
+ metricName: "openstack_designate_zone_status",
2624
+ aggregationType: MetricsAggregationType_1.default.Count,
2625
+ attributes: { status: OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_PENDING },
2626
+ },
2627
+ ],
2628
+ aliases: [statusAlias(OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_PENDING)],
2629
+ value: 0,
2630
+ words: {
2631
+ incidentTitle: "[OpenStack] DNS Zone Stuck Pending",
2632
+ incidentDescription: `This zone has read PENDING for ${OpenStackHealthRules_1.OPENSTACK_DNS_ZONE_PENDING_STUCK_MINUTES} minutes, and its worker gives up long before that, so nothing is working on it. Changes to it are being accepted and not carried out. Check that designate-worker is running, then openstack dns service list. The incident resolves on its own once it reads anything else.`,
2633
+ criteriaName: `DNS Zone Stuck Pending - PENDING for ${OpenStackHealthRules_1.OPENSTACK_DNS_ZONE_PENDING_STUCK_MINUTES} minutes`,
2634
+ criteriaDescription: `Triggers when a zone reads PENDING for the whole ${OpenStackHealthRules_1.OPENSTACK_DNS_ZONE_PENDING_STUCK_MINUTES}-minute window.`,
2635
+ },
2636
+ });
2637
+ },
2638
+ };
2639
+ /*
2640
+ * One query per type someone asks for, because a monitor's attribute filter is equality, and a zone's
2641
+ * own SOA and NS read ERROR with it, recorded: DNS Zone in Error already says that. Per zone, so one
2642
+ * failure of a zone's writes is one incident.
2643
+ */
2644
+ const dnsRecordsetInErrorTemplate = {
2645
+ id: "openstack-dns-recordset-in-error",
2646
+ name: "DNS Recordset in Error",
2647
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2648
+ summary: "A Designate recordset someone asked for is in ERROR.",
2649
+ description: `Alert when a recordset of type ${OpenStackResourceKind_1.OPENSTACK_DNS_RECORD_TYPES_SOMEONE_ASKED_FOR.join(", ")} reads ${OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_ERROR} for 15 minutes (openstack_designate_recordsets_status filtered to that status and type). One incident per zone, however many of its recordsets went wrong together. A zone's own SOA and NS read ERROR when the zone does, recorded, so they are left to DNS Zone in Error. Check \`openstack recordset list\` for the zone, and that the DNS servers in its pool are answering.`,
2650
+ category: "Network",
2651
+ severity: "Warning",
2652
+ getMonitorStep: (args) => {
2653
+ const queries = OpenStackResourceKind_1.OPENSTACK_DNS_RECORD_TYPES_SOMEONE_ASKED_FOR.map((type) => {
2654
+ return {
2655
+ alias: `recordset_${type.toLowerCase()}`,
2656
+ metricName: "openstack_designate_recordsets_status",
2657
+ aggregationType: MetricsAggregationType_1.default.Count,
2658
+ attributes: { status: OpenStackResourceKind_1.OPENSTACK_DNS_STATUS_ERROR, type },
2659
+ };
2660
+ });
2661
+ return buildCeilingStep({
2662
+ args,
2663
+ service: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2664
+ groupByAttributeKeys: DNS_ZONE_OF_RECORDSET_GROUP,
2665
+ queries,
2666
+ aliases: queries.map((query) => {
2667
+ return query.alias;
2668
+ }),
2669
+ value: 0,
2670
+ words: {
2671
+ incidentTitle: "[OpenStack] DNS Recordset in Error",
2672
+ incidentDescription: `A recordset in this zone reads ERROR: Designate's worker could not write it to a DNS server, so it may not answer as asked. Check openstack recordset list for the zone named above, and that the DNS servers in its pool are answering. The incident resolves on its own once it reads anything else.`,
2673
+ criteriaName: "DNS Recordset in Error - ERROR for the whole window",
2674
+ criteriaDescription: "Triggers when a recordset someone asked for reads ERROR for the whole window.",
2675
+ },
2676
+ });
2677
+ },
2678
+ };
2679
+ /*
2680
+ * Only a probe can say this: to the agent's exporter a stopped Designate reads as nothing at all, the
2681
+ * same as a cloud without it, recorded, and all it can do is go quiet.
2682
+ */
2683
+ const dnsApiDownTemplate = {
2684
+ id: "openstack-dns-api-down",
2685
+ name: "DNS API Down",
2686
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2687
+ requiresProbe: true,
2688
+ summary: "Designate's API does not answer, on a cloud a probe collects.",
2689
+ description: "Alert when Designate's API does not answer for 15 minutes (openstack_designate_up reads 0, which is what a probe says when its catalog names Designate and the API doesn't answer). One incident per region. Only a probe sends this: a stopped Designate gives the agent's exporter an empty answer, the same as a cloud without Designate, recorded, so a cloud the agent collects can only say it went quiet. On Services it does. Check the designate-api service and its log, then `openstack zone list` with a credential that works.",
2690
+ category: "Availability",
2691
+ severity: "Critical",
2692
+ getMonitorStep: (args) => {
2693
+ return buildFloorStep({
2694
+ args,
2695
+ service: OpenStackResourceKind_1.OpenStackServiceType.Dns,
2696
+ hasOwnAnchor: true,
2697
+ groupByAttributeKeys: API_GROUP,
2698
+ queries: [
2699
+ {
2700
+ alias: "api_up",
2701
+ metricName: exports.OPENSTACK_API_UP_METRIC_BY_SERVICE[OpenStackResourceKind_1.OpenStackServiceType.Dns],
2702
+ aggregationType: MetricsAggregationType_1.default.Min,
2703
+ },
2704
+ ],
2705
+ words: {
2706
+ incidentTitle: "[OpenStack] DNS API Down",
2707
+ incidentDescription: "Designate's API is not answering. Names already served go on answering from their DNS servers, but none can be created or changed. Check the designate-api service and its log, then openstack zone list with a credential that works. The incident resolves on its own once it answers again.",
2708
+ criteriaName: "DNS API Down - not answering",
2709
+ criteriaDescription: "Triggers when Designate's API does not answer for the whole window.",
2710
+ },
2711
+ });
2712
+ },
2713
+ };
2714
+ // --- Metrics: Gnocchi, on a cloud that runs it ---
2715
+ const metricApiDownTemplate = buildApiDownTemplate({
2716
+ id: "openstack-metric-api-down",
2717
+ name: "Metrics API Down",
2718
+ summary: "Gnocchi's API does not answer for 15 minutes.",
2719
+ description: "Alert when the exporter's read of Gnocchi fails for 15 minutes (openstack_gnocchi_up reads 0), or the exporter does not answer that collection (up reads 0). One incident per region. The exporter reads Gnocchi's status, which only an admin may, so a credential it refuses reads the same as a stopped API, recorded. A cloud whose credential has never read Gnocchi isn't offered this. Check the gnocchi-api service and its log, then `openstack metric status` with this credential.",
2720
+ service: OpenStackResourceKind_1.OpenStackServiceType.Metric,
2721
+ collectionMetricName: "up",
2722
+ incidentDescription: `The exporter's read of Gnocchi is failing: its API stopped answering, or this credential is no longer allowed its status, which reads the same. Measures can't reach Gnocchi while its API is down, and nothing can read them. Check the gnocchi-api service and its log, then openstack metric status with this credential. The incident resolves on its own once it answers again.`,
2723
+ });
2724
+ const metricNoProcessorsTemplate = {
2725
+ id: "openstack-metric-no-processors",
2726
+ name: "Gnocchi No Processors",
2727
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Metric,
2728
+ summary: "Nothing processes Gnocchi's measures for 15 minutes.",
2729
+ description: "Alert when Gnocchi's status names no metricd processor for 15 minutes (openstack_gnocchi_status_metricd_processors reads 0, recorded with gnocchi-metricd stopped). One incident per region. Gnocchi's API goes on answering and taking measures, so Metrics API Down says nothing of this. Nothing is lost, but nothing newer can be read until metricd is back. Check the gnocchi-metricd service and its log, then `openstack metric status`.",
2730
+ category: "Metrics",
2731
+ severity: "Critical",
2732
+ getMonitorStep: (args) => {
2733
+ return buildFloorStep({
2734
+ args,
2735
+ service: OpenStackResourceKind_1.OpenStackServiceType.Metric,
2736
+ groupByAttributeKeys: REGION_GROUP,
2737
+ queries: [
2738
+ {
2739
+ alias: "processors",
2740
+ metricName: "openstack_gnocchi_status_metricd_processors",
2741
+ aggregationType: MetricsAggregationType_1.default.Max,
2742
+ },
2743
+ ],
2744
+ words: {
2745
+ incidentTitle: "[OpenStack] Gnocchi No Processors",
2746
+ incidentDescription: `Gnocchi's status names no metricd processor, so measures are piling up and nothing newer can be read. Nothing is lost while this lasts. Check the gnocchi-metricd service and its log, then openstack metric status. The incident resolves on its own once a processor is back.`,
2747
+ criteriaName: "Gnocchi No Processors - none running",
2748
+ criteriaDescription: "Triggers when Gnocchi's status names no metricd processor for the whole window.",
2749
+ },
2750
+ });
2751
+ },
2752
+ };
2753
+ /*
2754
+ * Where the backlog is heading, read as a line through the last two hours. A busy cloud's backlog is never 0 and
2755
+ * may be large, so one that is falling is fine however large it is, and a flat reading under the line is too.
2756
+ * What this says is that nothing has been catching up. Recorded only at 5 and then 10 measures, a minute apart,
2757
+ * so the line itself is proven on what a monitor would read of those, and the size on made-up readings.
2758
+ */
2759
+ const metricBacklogGrowingTemplate = {
2760
+ id: "openstack-metric-backlog-growing",
2761
+ name: "Gnocchi Backlog Growing",
2762
+ forService: OpenStackResourceKind_1.OpenStackServiceType.Metric,
2763
+ summary: `Gnocchi's backlog is heading past ${OpenStackHealthRules_1.OPENSTACK_GNOCCHI_BACKLOG_WARNING_MEASURES} measures within the hour.`,
2764
+ description: `Alert when a line through the last two hours of Gnocchi's backlog (openstack_gnocchi_status_measures_to_process) passes ${OpenStackHealthRules_1.OPENSTACK_GNOCCHI_BACKLOG_WARNING_MEASURES} measures within the next hour. One incident per region. One already past that and falling doesn't fire, and that's what recovering looks like. Check how much gnocchi-metricd has been given to do, then \`openstack metric status\` for how many processors it has.`,
2765
+ category: "Metrics",
2766
+ severity: "Warning",
2767
+ getMonitorStep: (args) => {
2768
+ return buildForecastStep({
2769
+ args,
2770
+ service: OpenStackResourceKind_1.OpenStackServiceType.Metric,
2771
+ // Two hours, so a five-minute scrape's newest reading is never stale when it's checked.
2772
+ rollingTime: RollingTime_1.default.Past2Hours,
2773
+ horizonInHours: 1,
2774
+ groupByAttributeKeys: REGION_GROUP,
2775
+ query: {
2776
+ alias: "measures_to_process",
2777
+ metricName: "openstack_gnocchi_status_measures_to_process",
2778
+ aggregationType: MetricsAggregationType_1.default.Max,
2779
+ },
2780
+ value: OpenStackHealthRules_1.OPENSTACK_GNOCCHI_BACKLOG_WARNING_MEASURES,
2781
+ words: {
2782
+ incidentTitle: "[OpenStack] Gnocchi Backlog Growing",
2783
+ incidentDescription: `Gnocchi's backlog is heading past ${OpenStackHealthRules_1.OPENSTACK_GNOCCHI_BACKLOG_WARNING_MEASURES} measures within the hour, so metricd isn't keeping up and what can be read is falling behind. Check how much gnocchi-metricd has been given to do, then openstack metric status for how many processors it has. The incident resolves on its own once the backlog is falling or under the line.`,
2784
+ criteriaName: `Gnocchi Backlog Growing - heading past ${OpenStackHealthRules_1.OPENSTACK_GNOCCHI_BACKLOG_WARNING_MEASURES} measures`,
2785
+ criteriaDescription: `Triggers when a line through the last two hours of Gnocchi's backlog passes ${OpenStackHealthRules_1.OPENSTACK_GNOCCHI_BACKLOG_WARNING_MEASURES} measures within the next hour.`,
2786
+ },
2787
+ });
2788
+ },
2789
+ };
2790
+ // --- Object storage: Swift, on a cloud that runs it ---
2791
+ const objectStoreApiDownTemplate = buildApiDownTemplate({
2792
+ id: "openstack-object-store-api-down",
2793
+ name: "Object Storage API Down",
2794
+ summary: "Swift's API does not answer for 15 minutes.",
2795
+ description: "Alert when the exporter's read of Swift fails for 15 minutes (openstack_object_store_up reads 0), or the exporter does not answer that collection (up reads 0). One incident per region. A credential Swift refuses reads the same as a stopped proxy, recorded, so a cloud whose credential has never read Swift isn't offered this. Swift's proxy answers with an object server stopped, so this says nothing of that. Check the swift-proxy-server service and its log, then `openstack object store account show` with this credential.",
2796
+ service: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2797
+ collectionMetricName: "up",
2798
+ incidentDescription: `The exporter's read of Swift is failing: its proxy stopped answering, or this credential is no longer allowed its own account, which reads the same. Nothing can read or write an object while the proxy is down. Check the swift-proxy-server service and its log, then openstack object store account show with this credential. The incident resolves on its own once it answers again.`,
2799
+ });
2800
+ /*
2801
+ * Where a container is heading, read as a line through the last week. Swift says nothing of how much room a
2802
+ * cloud has unless its storage servers' /recon are read, so the line is one a person would want to hear about,
2803
+ * and it's theirs to change. A cloud fills up at its own pace, so this reads a week and looks a week ahead.
2804
+ */
2805
+ const objectContainerGrowthTemplate = {
2806
+ id: "openstack-object-container-growth",
2807
+ name: "Object Container Growth Forecast",
2808
+ forService: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2809
+ summary: "A Swift container is heading past 1 TiB within a week.",
2810
+ description: "Alert when a line through the last week of a container's size (openstack_object_store_bytes) passes 1 TiB within the next week. One incident per container. Only the containers of this credential's own project are read, recorded. Change the line to what this cloud should hear about. Check what writes to it, then `openstack object store account show` for how much that project holds.",
2811
+ category: "Storage",
2812
+ severity: "Warning",
2813
+ getMonitorStep: (args) => {
2814
+ return buildForecastStep({
2815
+ args,
2816
+ service: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2817
+ rollingTime: RollingTime_1.default.Past7Days,
2818
+ horizonInHours: 7 * 24,
2819
+ groupByAttributeKeys: OBJECT_CONTAINER_GROUP,
2820
+ query: {
2821
+ alias: "bytes",
2822
+ metricName: "openstack_object_store_bytes",
2823
+ aggregationType: MetricsAggregationType_1.default.Max,
2824
+ },
2825
+ value: OpenStackHealthRules_1.OPENSTACK_OBJECT_CONTAINER_GROWTH_WARNING_BYTES,
2826
+ words: {
2827
+ incidentTitle: "[OpenStack] Object Container Growth Forecast",
2828
+ incidentDescription: "This container is heading past 1 TiB within a week at its growth over the last one. Nothing is wrong yet. Check what writes to it, then openstack object store account show for how much its project holds. The incident resolves on its own once its growth no longer gets there.",
2829
+ criteriaName: "Object Container Growth Forecast - heading past 1 TiB",
2830
+ criteriaDescription: "Triggers when a line through the last week of a container's size passes 1 TiB within the next week.",
2831
+ },
2832
+ });
2833
+ },
2834
+ };
2835
+ // --- Key manager: Barbican, on a cloud a probe collects ---
2836
+ const keyManagerApiDownTemplate = {
2837
+ id: "openstack-key-manager-api-down",
2838
+ name: "Key Manager API Down",
2839
+ forService: OpenStackResourceKind_1.OpenStackServiceType.KeyManager,
2840
+ requiresProbe: true,
2841
+ summary: "Barbican's API does not answer, on a cloud a probe collects.",
2842
+ description: "Alert when Barbican's API does not answer for 15 minutes (openstack_barbican_up reads 0, which only a probe sends: the exporter has no reader for Barbican at all, recorded). One incident per region. A credential Barbican refuses still reads as answering, because it did. Check the barbican-api service and its log, then `openstack secret list` with a credential that works.",
2843
+ category: "Availability",
2844
+ severity: "Critical",
2845
+ getMonitorStep: (args) => {
2846
+ return buildFloorStep({
2847
+ args,
2848
+ service: OpenStackResourceKind_1.OpenStackServiceType.KeyManager,
2849
+ hasOwnAnchor: true,
2850
+ groupByAttributeKeys: REGION_GROUP,
2851
+ queries: [
2852
+ {
2853
+ alias: "api_up",
2854
+ metricName: exports.OPENSTACK_API_UP_METRIC_BY_SERVICE[OpenStackResourceKind_1.OpenStackServiceType.KeyManager],
2855
+ aggregationType: MetricsAggregationType_1.default.Min,
2856
+ },
2857
+ ],
2858
+ words: {
2859
+ incidentTitle: "[OpenStack] Key Manager API Down",
2860
+ incidentDescription: "Barbican's API is not answering, so nothing can read or store a secret: whatever keeps its encryption keys there, such as an encrypted volume, can't be attached. Check the barbican-api service and its log, then openstack secret list with a credential that works. The incident resolves on its own once it answers again.",
2861
+ criteriaName: "Key Manager API Down - not answering",
2862
+ criteriaDescription: "Triggers when Barbican's API does not answer for the whole window.",
2863
+ },
2864
+ });
2865
+ },
2866
+ };
2867
+ // --- What Swift's storage servers say through /recon, where someone named them ---
2868
+ const swiftStorageServerDownTemplate = {
2869
+ id: "openstack-swift-storage-server-down",
2870
+ name: "Swift Storage Server Not Answering",
2871
+ forService: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2872
+ requiresProbe: true,
2873
+ summary: "One of Swift's storage servers stops answering, on a cloud a probe collects.",
2874
+ description: "Alert when a storage server named in the cloud's settings doesn't answer /recon for 15 minutes (openstack_object_store_recon_up reads 0, which only a probe sends). One incident per server. Swift's proxy goes on answering without it, recorded, so nothing else says this. Check the swift-object, swift-container and swift-account services on that host, then `openstack object store account show`.",
2875
+ category: "Storage",
2876
+ severity: "Warning",
2877
+ getMonitorStep: (args) => {
2878
+ return buildFloorStep({
2879
+ args,
2880
+ service: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2881
+ groupByAttributeKeys: [REGION, "address"],
2882
+ queries: [
2883
+ {
2884
+ alias: "recon_up",
2885
+ metricName: "openstack_object_store_recon_up",
2886
+ aggregationType: MetricsAggregationType_1.default.Min,
2887
+ },
2888
+ ],
2889
+ words: {
2890
+ incidentTitle: "[OpenStack] Swift Storage Server Not Answering",
2891
+ incidentDescription: "This storage server isn't answering /recon. Swift's proxy goes on answering without it, and what it holds is served from its other replicas while they last. Check the swift-object, swift-container and swift-account services on that host, then openstack object store account show. The incident resolves on its own once it answers again.",
2892
+ criteriaName: "Swift Storage Server Not Answering - /recon < 1",
2893
+ criteriaDescription: "Triggers when a storage server doesn't answer /recon for the whole window.",
2894
+ },
2895
+ });
2896
+ },
2897
+ };
2898
+ const swiftRingsDifferTemplate = {
2899
+ id: "openstack-swift-rings-differ",
2900
+ name: "Swift Rings Differ",
2901
+ forService: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2902
+ requiresProbe: true,
2903
+ summary: "Swift's storage servers don't all have the same ring.",
2904
+ description: "Alert when the storage servers named in the cloud's settings report different checksums for a ring for 15 minutes (openstack_object_store_recon_rings_differ reads 1, which only a probe sends). One incident per ring. Servers on different rings put data in different places. Check that the ring was pushed to every server, then `swift-recon --md5`, and `openstack object store account show` to see that the proxy still answers.",
2905
+ category: "Storage",
2906
+ severity: "Warning",
2907
+ getMonitorStep: (args) => {
2908
+ return buildCeilingStep({
2909
+ args,
2910
+ service: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2911
+ groupByAttributeKeys: [REGION, "ring"],
2912
+ queries: [
2913
+ {
2914
+ alias: "rings_differ",
2915
+ metricName: "openstack_object_store_recon_rings_differ",
2916
+ aggregationType: MetricsAggregationType_1.default.Min,
2917
+ },
2918
+ ],
2919
+ aliases: ["rings_differ"],
2920
+ value: 0,
2921
+ words: {
2922
+ incidentTitle: "[OpenStack] Swift Rings Differ",
2923
+ incidentDescription: "Swift's storage servers report different checksums for this ring, so they put data in different places. Check that the ring was pushed to every server, then swift-recon --md5, and openstack object store account show to see that the proxy still answers. The incident resolves on its own once they agree.",
2924
+ criteriaName: "Swift Rings Differ - checksums differ",
2925
+ criteriaDescription: "Triggers when the storage servers report different checksums for a ring for the whole window.",
2926
+ },
2927
+ });
2928
+ },
2929
+ };
2930
+ const swiftReplicationStaleTemplate = {
2931
+ id: "openstack-swift-replication-stale",
2932
+ name: "Swift Replication Stale",
2933
+ forService: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2934
+ requiresProbe: true,
2935
+ summary: `A Swift server hasn't finished replicating in ${OpenStackHealthRules_1.OPENSTACK_SWIFT_REPLICATION_STALE_SECONDS / 3600} hours.`,
2936
+ description: `Alert when a storage server named in the cloud's settings last finished a pass of replication more than ${OpenStackHealthRules_1.OPENSTACK_SWIFT_REPLICATION_STALE_SECONDS / 3600} hours ago (openstack_object_store_recon_replication_age_seconds, which only a probe sends). One incident per server and ring. A pass can take a long time on a large cluster, so this is for one that has stopped rather than one that's slow. Check the swift-*-replicator services on that host, then \`swift-recon --replication\`, and \`openstack object store account show\` to see that the proxy still answers.`,
2937
+ category: "Storage",
2938
+ severity: "Warning",
2939
+ getMonitorStep: (args) => {
2940
+ return buildCeilingStep({
2941
+ args,
2942
+ service: OpenStackResourceKind_1.OpenStackServiceType.ObjectStore,
2943
+ groupByAttributeKeys: [REGION, "address", "ring"],
2944
+ queries: [
2945
+ {
2946
+ alias: "replication_age_seconds",
2947
+ metricName: "openstack_object_store_recon_replication_age_seconds",
2948
+ aggregationType: MetricsAggregationType_1.default.Min,
2949
+ },
2950
+ ],
2951
+ aliases: ["replication_age_seconds"],
2952
+ value: OpenStackHealthRules_1.OPENSTACK_SWIFT_REPLICATION_STALE_SECONDS,
2953
+ words: {
2954
+ incidentTitle: "[OpenStack] Swift Replication Stale",
2955
+ incidentDescription: `This storage server last finished a pass of replication for this ring more than ${OpenStackHealthRules_1.OPENSTACK_SWIFT_REPLICATION_STALE_SECONDS / 3600} hours ago, so what it holds may have fallen behind its other replicas. Check the swift-*-replicator services on that host, then swift-recon --replication, and openstack object store account show to see that the proxy still answers. The incident resolves on its own once a pass finishes.`,
2956
+ criteriaName: `Swift Replication Stale - older than ${OpenStackHealthRules_1.OPENSTACK_SWIFT_REPLICATION_STALE_SECONDS / 3600} hours`,
2957
+ criteriaDescription: `Triggers when a server's last finished pass of replication is more than ${OpenStackHealthRules_1.OPENSTACK_SWIFT_REPLICATION_STALE_SECONDS / 3600} hours old for the whole window.`,
2958
+ },
2959
+ });
2960
+ },
2961
+ };
2962
+ // --- Projects ---
2963
+ const projectQuotaNearlyReachedTemplate = {
2964
+ id: "openstack-project-quota-nearly-reached",
2965
+ name: "Project Quota Nearly Reached",
2966
+ summary: `A project has used ${OpenStackHealthRules_1.OPENSTACK_PROJECT_QUOTA_WARNING_PERCENT}% or more of a quota.`,
2967
+ description: `Alert when a project has used ${OpenStackHealthRules_1.OPENSTACK_PROJECT_QUOTA_WARNING_PERCENT}% or more of its vCPU, memory, instance or volume quota for 3 hours, which is three of the hourly readings these series have (openstack_nova_limits_* and openstack_cinder_limits_volume_*, used / max per project). One incident per project, and a project with no limit never fires. These series are off by default, because they cost API calls per project, so this template stays quiet until you turn them on: run the agent's install.sh again with OPENSTACK_COLLECT_QUOTAS=true, or on a cloud a probe reads, turn on Project limits. Check \`openstack limits show --absolute --project <project>\`, then raise the quota or ask its owner to free some.`,
2968
+ category: "Projects",
2969
+ severity: "Warning",
2970
+ getMonitorStep: (args) => {
2971
+ const percent = (data) => {
2972
+ return {
2973
+ alias: data.alias,
2974
+ legend: data.legend,
2975
+ legendUnit: "%",
2976
+ formula: `(${data.used} / ${data.limit}) * 100`,
2977
+ };
2978
+ };
2979
+ const limit = (alias, metricName) => {
2980
+ return {
2981
+ alias,
2982
+ metricName,
2983
+ aggregationType: MetricsAggregationType_1.default.Max,
2984
+ };
2985
+ };
2986
+ return buildCeilingStep({
2987
+ args,
2988
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
2989
+ // Three of the agent's hourly readings, as every template reads three of its series'.
2990
+ rollingTime: RollingTime_1.default.Past3Hours,
2991
+ groupByAttributeKeys: PROJECT_GROUP,
2992
+ queries: [
2993
+ limit("vcpus_used", "openstack_nova_limits_vcpus_used"),
2994
+ limit("vcpus_limit", "openstack_nova_limits_vcpus_max"),
2995
+ limit("memory_used", "openstack_nova_limits_memory_used"),
2996
+ limit("memory_limit", "openstack_nova_limits_memory_max"),
2997
+ limit("instances_used", "openstack_nova_limits_instances_used"),
2998
+ limit("instances_limit", "openstack_nova_limits_instances_max"),
2999
+ limit("volume_gb_used", "openstack_cinder_limits_volume_used_gb"),
3000
+ limit("volume_gb_limit", "openstack_cinder_limits_volume_max_gb"),
3001
+ ],
3002
+ formulas: [
3003
+ percent({
3004
+ alias: "vcpus_used_percent",
3005
+ legend: "vCPU Quota Used (%)",
3006
+ used: "vcpus_used",
3007
+ limit: "vcpus_limit",
3008
+ }),
3009
+ percent({
3010
+ alias: "memory_used_percent",
3011
+ legend: "Memory Quota Used (%)",
3012
+ used: "memory_used",
3013
+ limit: "memory_limit",
3014
+ }),
3015
+ percent({
3016
+ alias: "instances_used_percent",
3017
+ legend: "Instance Quota Used (%)",
3018
+ used: "instances_used",
3019
+ limit: "instances_limit",
3020
+ }),
3021
+ percent({
3022
+ alias: "volume_gb_used_percent",
3023
+ legend: "Volume Quota Used (%)",
3024
+ used: "volume_gb_used",
3025
+ limit: "volume_gb_limit",
3026
+ }),
3027
+ ],
3028
+ aliases: [
3029
+ "vcpus_used_percent",
3030
+ "memory_used_percent",
3031
+ "instances_used_percent",
3032
+ "volume_gb_used_percent",
3033
+ ],
3034
+ // At the line, as Needs attention reads it: isOpenStackQuotaAtLine.
3035
+ filterType: CriteriaFilter_1.FilterType.GreaterThanOrEqualTo,
3036
+ value: OpenStackHealthRules_1.OPENSTACK_PROJECT_QUOTA_WARNING_PERCENT,
3037
+ words: {
3038
+ incidentTitle: `[OpenStack] Project Quota Nearly Reached (>=${OpenStackHealthRules_1.OPENSTACK_PROJECT_QUOTA_WARNING_PERCENT}%)`,
3039
+ incidentDescription: `This project has used nearly all of a quota, so its next instance or volume is about to be refused. Check openstack limits show --absolute --project for the project named above, then raise the quota or ask its owner to free some. The incident resolves on its own once it falls back.`,
3040
+ criteriaName: `Project Quota - used >= ${OpenStackHealthRules_1.OPENSTACK_PROJECT_QUOTA_WARNING_PERCENT}%`,
3041
+ criteriaDescription: `Triggers when a project has used ${OpenStackHealthRules_1.OPENSTACK_PROJECT_QUOTA_WARNING_PERCENT}% or more of a quota for the whole window.`,
3042
+ },
3043
+ });
3044
+ },
3045
+ };
3046
+ // --- Checks from outside ---
3047
+ /*
3048
+ * WHAT A PROBE FOUND FROM OUTSIDE THE CLOUD (Types/OpenStack/OpenStackCheck), BY THE SAME RULES.
3049
+ *
3050
+ * Each minute's API check says what it found and what the last lifecycle run found (see
3051
+ * OpenStackCheckMetrics for why), so all of these read series that arrive once a minute and hold
3052
+ * five collections in five minutes, as every other template holds at least three. A failed lifecycle
3053
+ * run opens its incident within minutes of failing and closes it within minutes of the next run that
3054
+ * passes, whatever the check's interval is, because what the alert reads is the last verdict.
3055
+ *
3056
+ * Their anchor is the check's own series, not a service's `_up`: these go on whichever way the cloud
3057
+ * is collected, and stop when the probe does. Silence still is not recovery, so a dead probe leaves
3058
+ * an open incident open.
3059
+ *
3060
+ * One incident per region: what a run met goes in the description, from what the run reported
3061
+ * (OpenStackAlertContext), so a boot that fails in a different way next time does not open another.
3062
+ */
3063
+ const CHECK_WINDOW = RollingTime_1.default.Past5Minutes;
3064
+ const REGION_GROUP = [REGION];
3065
+ const TURN_ON_API_CHECKS = "Reads nothing until API checks are on, on the cloud's Checks page.";
3066
+ const TURN_ON_LIFECYCLE = "Reads nothing until the lifecycle check is on, on the cloud's Checks page.";
3067
+ const tokenIssueFailingTemplate = {
3068
+ id: "openstack-token-issue-failing",
3069
+ name: "Token Issue Failing",
3070
+ summary: "Keystone issues a probe outside the cloud no token for 5 minutes.",
3071
+ description: `Alert when Keystone issues no token to the probe checking this cloud from outside, for 5 minutes: it answered with an error, refused the credential, or could not be reached. One incident per region. Nobody can start anything without a token, whatever the services themselves report. ${TURN_ON_API_CHECKS} Check keystone's service and logs, the load balancer in front of it and the database behind it, then run \`openstack token issue\`.`,
3072
+ category: "Availability",
3073
+ severity: "Critical",
3074
+ requiresCheck: "api",
3075
+ getMonitorStep: (args) => {
3076
+ return buildFloorStep({
3077
+ args,
3078
+ service: OpenStackResourceKind_1.OpenStackServiceType.Identity,
3079
+ hasOwnAnchor: true,
3080
+ rollingTime: CHECK_WINDOW,
3081
+ groupByAttributeKeys: REGION_GROUP,
3082
+ queries: [
3083
+ {
3084
+ alias: "token_issued",
3085
+ metricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.TokenSuccess,
3086
+ aggregationType: MetricsAggregationType_1.default.Min,
3087
+ },
3088
+ ],
3089
+ words: {
3090
+ incidentTitle: "[OpenStack] Token Issue Failing",
3091
+ incidentDescription: `A probe outside this cloud cannot get a token from Keystone, so nobody can start anything new here, whatever the services themselves report. Check keystone's service and logs on the controllers, the load balancer in front of it and the database behind it, then run openstack token issue. The incident resolves on its own once a token is issued again.`,
3092
+ criteriaName: "Token Issue Failing - no token issued",
3093
+ criteriaDescription: "Triggers when Keystone issues the check no token for the whole window.",
3094
+ },
3095
+ });
3096
+ },
3097
+ };
3098
+ const serviceApiCheckFailingTemplate = {
3099
+ id: "openstack-service-api-check-failing",
3100
+ name: "Service API Check Failing",
3101
+ summary: "A service in the catalog does not answer a probe for 5 minutes.",
3102
+ description: `Alert when a service the catalog names does not answer a one-row read from a probe outside the cloud, for 5 minutes: it failed, timed out, could not be reached, or refused a token Keystone just issued. One incident per region and service, for every service in the catalog, with no list to keep. One that refuses this credential is answering, so it does not fire. ${TURN_ON_API_CHECKS} Check that service's API and the load balancer in front of it, then run \`openstack endpoint list --interface public\`.`,
3103
+ category: "Availability",
3104
+ severity: "Critical",
3105
+ requiresCheck: "api",
3106
+ getMonitorStep: (args) => {
3107
+ return buildFloorStep({
3108
+ args,
3109
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
3110
+ anchorMetricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.TokenSuccess,
3111
+ rollingTime: CHECK_WINDOW,
3112
+ groupByAttributeKeys: [REGION, "service_type"],
3113
+ queries: [
3114
+ {
3115
+ alias: "api_answered",
3116
+ metricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.ApiSuccess,
3117
+ aggregationType: MetricsAggregationType_1.default.Min,
3118
+ },
3119
+ ],
3120
+ words: {
3121
+ incidentTitle: "[OpenStack] Service API Check Failing",
3122
+ incidentDescription: `A service in this cloud's catalog is not answering a probe outside the cloud, as it would not answer anyone else. Check that service's API and logs, and the load balancer in front of it, then run openstack endpoint list --interface public to see where it should answer. The incident resolves on its own once it answers again.`,
3123
+ criteriaName: "Service API Check Failing - not answering",
3124
+ criteriaDescription: "Triggers when a service in the catalog does not answer the check for the whole window.",
3125
+ },
3126
+ });
3127
+ },
3128
+ };
3129
+ // Days left only go down, until someone renews it.
3130
+ function buildCertificateExpiringTemplate(data) {
3131
+ const name = `Public Certificate Expiring in ${data.days} Days`;
3132
+ return {
3133
+ id: data.id,
3134
+ name: name,
3135
+ summary: `A public endpoint's certificate expires in under ${data.days} days.`,
3136
+ description: `Alert when the certificate on an endpoint the catalog names expires in under ${data.days} days, as read by a probe outside the cloud off the connection it made. One incident per host and port, and it stays open past the expiry, when every user's connection starts failing. ${TURN_ON_API_CHECKS} Check \`openstack endpoint list --interface public\` for what is on that host, and ${data.checkNext}`,
3137
+ category: "Availability",
3138
+ severity: data.severity,
3139
+ requiresCheck: "api",
3140
+ getMonitorStep: (args) => {
3141
+ return buildOpenStackMonitorStep({
3142
+ openstackMonitor: buildOpenStackSeriesConfig({
3143
+ cloudIdentifier: args.cloudIdentifier,
3144
+ queries: [
3145
+ {
3146
+ alias: "days_left",
3147
+ metricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.CertificateExpiry,
3148
+ aggregationType: MetricsAggregationType_1.default.Min,
3149
+ },
3150
+ ],
3151
+ rollingTime: CHECK_WINDOW,
3152
+ groupByAttributeKeys: [REGION, "host", "port"],
3153
+ anchorMetricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.TokenSuccess,
3154
+ }),
3155
+ offlineCriteriaInstance: buildOfflineCriteria({
3156
+ notification: {
3157
+ args,
3158
+ incidentTitle: `[OpenStack] ${name}`,
3159
+ incidentDescription: `The certificate on an endpoint this cloud's catalog names expires in under ${data.days} days. When it does, every connection to that API fails. Run openstack endpoint list --interface public to check what is on the host named above, and ${data.checkNext} The incident resolves on its own once the check sees a renewed one.`,
3160
+ criteriaName: `${name} - under ${data.days} days left`,
3161
+ criteriaDescription: `Triggers when the certificate on a public endpoint has under ${data.days} days left for the whole window.`,
3162
+ },
3163
+ metricAlias: "days_left",
3164
+ filterType: CriteriaFilter_1.FilterType.LessThan,
3165
+ value: data.days,
3166
+ }),
3167
+ onlineCriteriaInstance: countGoneSeriesAsRecovered((0, RecommendationCriteriaBuilder_1.buildHealthyCriteriaInstance)({
3168
+ onlineMonitorStatusId: args.onlineMonitorStatusId,
3169
+ metricAlias: "days_left",
3170
+ filterType: CriteriaFilter_1.FilterType.GreaterThanOrEqualTo,
3171
+ value: data.days,
3172
+ filterCondition: FilterCondition_1.default.All,
3173
+ })),
3174
+ });
3175
+ },
3176
+ };
3177
+ }
3178
+ const certificateExpiringIn30DaysTemplate = buildCertificateExpiringTemplate({
3179
+ id: "openstack-public-certificate-expiring-30-days",
3180
+ days: OpenStackHealthRules_1.OPENSTACK_CERTIFICATE_EXPIRY_WARNING_DAYS,
3181
+ severity: "Warning",
3182
+ checkNext: "renew it while there is time to.",
3183
+ });
3184
+ const certificateExpiringIn7DaysTemplate = buildCertificateExpiringTemplate({
3185
+ id: "openstack-public-certificate-expiring-7-days",
3186
+ days: OpenStackHealthRules_1.OPENSTACK_CERTIFICATE_EXPIRY_CRITICAL_DAYS,
3187
+ severity: "Critical",
3188
+ checkNext: "renew it now.",
3189
+ });
3190
+ // One part of the lifecycle check, in one region, as its last run left it.
3191
+ function buildLifecyclePhaseFloorStep(data) {
3192
+ return buildFloorStep({
3193
+ args: data.args,
3194
+ service: data.service,
3195
+ anchorMetricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.LifecycleSuccess,
3196
+ rollingTime: CHECK_WINDOW,
3197
+ groupByAttributeKeys: REGION_GROUP,
3198
+ queries: [
3199
+ {
3200
+ alias: data.alias,
3201
+ metricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.LifecyclePhaseSuccess,
3202
+ aggregationType: MetricsAggregationType_1.default.Min,
3203
+ attributes: { phase: data.phase },
3204
+ },
3205
+ ],
3206
+ words: data.words,
3207
+ });
3208
+ }
3209
+ const instanceBootFailingTemplate = {
3210
+ id: "openstack-instance-boot-failing",
3211
+ name: "Instance Boot Failing",
3212
+ summary: "The last lifecycle run could not boot an instance in this region.",
3213
+ description: `Alert when the last lifecycle run in a region could not boot an instance: Nova refused it, its server went to ERROR, or it never reached ACTIVE. Opens within minutes of the run and closes within minutes of the next run that boots. One incident per region, and it says the step and the fault Nova gave. Every service can read healthy while this fires, which is what this is for. ${TURN_ON_LIFECYCLE} Check \`openstack compute service list\`, then the scheduler's and conductor's logs, and Placement.`,
3214
+ category: "Compute",
3215
+ severity: "Critical",
3216
+ requiresCheck: "lifecycle",
3217
+ getMonitorStep: (args) => {
3218
+ return buildLifecyclePhaseFloorStep({
3219
+ args,
3220
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
3221
+ alias: "boot_passed",
3222
+ phase: OpenStackCheck_1.OpenStackLifecyclePhase.Boot,
3223
+ words: {
3224
+ incidentTitle: "[OpenStack] Instance Boot Failing",
3225
+ incidentDescription: `A probe outside this cloud tried to do what a user does, and could not boot an instance. New instances are probably failing for your users too, whatever each service reports. Check openstack compute service list, then the logs of nova-scheduler and nova-conductor, and Placement. The step that failed and the fault Nova gave are below. The incident resolves on its own once a run boots an instance again.`,
3226
+ criteriaName: "Instance Boot Failing - the last run could not boot",
3227
+ criteriaDescription: "Triggers when the last lifecycle run in a region could not boot an instance.",
3228
+ },
3229
+ });
3230
+ },
3231
+ };
3232
+ const instanceBootSlowTemplate = {
3233
+ id: "openstack-instance-boot-slow",
3234
+ name: "Instance Boot Slow",
3235
+ summary: `The last lifecycle run took over ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_BOOT_SLOW_SECONDS / 60} minutes to reach ACTIVE.`,
3236
+ description: `Alert when the last lifecycle run in a region took over ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_BOOT_SLOW_SECONDS} seconds to take a server from Nova accepting it to ACTIVE, which is how long OpenStack's own tests allow (Tempest's build_timeout). It boots the small flavor and image the check was given, so your own will take longer. One incident per region. With an OSProfiler key saved on the Checks page, the run has a trace. ${TURN_ON_LIFECYCLE} Check \`openstack compute service list\`, then what the image and the network are doing on the compute hosts.`,
3237
+ category: "Compute",
3238
+ severity: "Warning",
3239
+ requiresCheck: "lifecycle",
3240
+ getMonitorStep: (args) => {
3241
+ return buildCeilingStep({
3242
+ args,
3243
+ service: OpenStackResourceKind_1.OpenStackServiceType.Compute,
3244
+ rollingTime: CHECK_WINDOW,
3245
+ anchorMetricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.LifecycleSuccess,
3246
+ groupByAttributeKeys: REGION_GROUP,
3247
+ queries: [
3248
+ {
3249
+ alias: "boot_seconds",
3250
+ metricName: OpenStackCheckMetrics_1.OpenStackCheckMetric.LifecycleStepDuration,
3251
+ aggregationType: MetricsAggregationType_1.default.Max,
3252
+ attributes: { step: OpenStackCheck_1.OpenStackLifecycleStep.ServerActive },
3253
+ },
3254
+ ],
3255
+ aliases: ["boot_seconds"],
3256
+ value: OpenStackHealthRules_1.OPENSTACK_INSTANCE_BOOT_SLOW_SECONDS,
3257
+ words: {
3258
+ incidentTitle: "[OpenStack] Instance Boot Slow",
3259
+ incidentDescription: `The last lifecycle run took over ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_BOOT_SLOW_SECONDS} seconds to reach ACTIVE, with a small flavor and image, so your users' instances are probably slower still. Check openstack compute service list, then whether the compute hosts are copying images and how quickly ports are being wired. If an OSProfiler key is saved on the Checks page, the run below has a trace. The incident resolves on its own once a run boots faster.`,
3260
+ criteriaName: `Instance Boot Slow - over ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_BOOT_SLOW_SECONDS} seconds`,
3261
+ criteriaDescription: `Triggers when the last lifecycle run took over ${OpenStackHealthRules_1.OPENSTACK_INSTANCE_BOOT_SLOW_SECONDS} seconds to reach ACTIVE.`,
3262
+ },
3263
+ });
3264
+ },
3265
+ };
3266
+ const volumeAttachFailingTemplate = {
3267
+ id: "openstack-volume-attach-failing",
3268
+ name: "Volume Attach Failing",
3269
+ summary: "The last lifecycle run could not create or attach a volume.",
3270
+ description: `Alert when the last lifecycle run in a region could not create a volume or attach it to its server. One incident per region, and it says the step and what Cinder or Nova gave as the reason. ${TURN_ON_LIFECYCLE} It also needs the volume part of the check on. Check \`openstack volume service list\`, then cinder-volume's logs and the storage backend behind it.`,
3271
+ category: "Storage",
3272
+ severity: "Critical",
3273
+ requiresCheck: "lifecycle",
3274
+ getMonitorStep: (args) => {
3275
+ return buildLifecyclePhaseFloorStep({
3276
+ args,
3277
+ service: OpenStackResourceKind_1.OpenStackServiceType.Volume,
3278
+ alias: "volume_passed",
3279
+ phase: OpenStackCheck_1.OpenStackLifecyclePhase.Volume,
3280
+ words: {
3281
+ incidentTitle: "[OpenStack] Volume Attach Failing",
3282
+ incidentDescription: `A probe outside this cloud could not create a volume or attach it to a server it had just booted, so your users probably cannot either. Volumes already attached usually carry on. Check openstack volume service list, then cinder-volume's logs and the storage backend behind it. The step that failed and what the service gave as the reason are below. The incident resolves on its own once a run attaches a volume again.`,
3283
+ criteriaName: "Volume Attach Failing - the last run could not attach",
3284
+ criteriaDescription: "Triggers when the last lifecycle run in a region could not create or attach a volume.",
3285
+ },
3286
+ });
3287
+ },
3288
+ };
3289
+ const floatingIpUnreachableTemplate = {
3290
+ id: "openstack-floating-ip-unreachable",
3291
+ name: "Floating IP Unreachable",
3292
+ summary: "The last lifecycle run could not reach its server's floating IP.",
3293
+ description: `Alert when the last lifecycle run in a region could not give its server a floating IP, or got no ping back from one. One incident per region, and it says the step and what Neutron gave as the reason. A probe with no route to the floating range reads the same, so run it from where your users are. ${TURN_ON_LIFECYCLE} It also needs the floating IP part of the check on. Check \`openstack network agent list\`, then the router and whatever carries the external network.`,
3294
+ category: "Network",
3295
+ severity: "Critical",
3296
+ requiresCheck: "lifecycle",
3297
+ getMonitorStep: (args) => {
3298
+ return buildLifecyclePhaseFloorStep({
3299
+ args,
3300
+ service: OpenStackResourceKind_1.OpenStackServiceType.Network,
3301
+ alias: "floating_ip_passed",
3302
+ phase: OpenStackCheck_1.OpenStackLifecyclePhase.FloatingIp,
3303
+ words: {
3304
+ incidentTitle: "[OpenStack] Floating IP Unreachable",
3305
+ incidentDescription: `A probe outside this cloud booted a server and could not reach it through a floating IP, so your users' new instances may be unreachable too. Addresses already in use may carry on. Check openstack network agent list, then the router and whatever carries the external network, and that the probe has a route to the floating range. The step that failed and what it met are below. The incident resolves on its own once a run reaches its server again.`,
3306
+ criteriaName: "Floating IP Unreachable - the last run got no reply",
3307
+ criteriaDescription: "Triggers when the last lifecycle run in a region could not reach its server through a floating IP.",
3308
+ },
3309
+ });
3310
+ },
3311
+ };
3312
+ // --- Capacity ---
3313
+ /*
3314
+ * Whether a flavor fits, whether a zone can lose a host and when something fills up take every host
3315
+ * and flavor to work out, so OneUptime writes these series itself from each cloud's rows
3316
+ * (OpenStackCapacitySeries), every two minutes while it reports. Each is written only when it can
3317
+ * say something: a flavor no host could ever hold, one whose only room is on a host someone
3318
+ * disabled, a zone with a host someone disabled, and anything too new to forecast all have no
3319
+ * series, and so nothing to fire on. Allocation, not load: an idle instance holds all of it.
3320
+ */
3321
+ const FLAVOR_GROUP = [REGION, "flavor_id", "flavor"];
3322
+ const ZONE_GROUP = [REGION, "availability_zone"];
3323
+ const CAPACITY_GROUP = [
3324
+ REGION,
3325
+ OpenStackCapacitySeries_1.OPENSTACK_CAPACITY_SCOPE_LABEL,
3326
+ OpenStackCapacitySeries_1.OPENSTACK_CAPACITY_NAME_LABEL,
3327
+ OpenStackCapacitySeries_1.OPENSTACK_CAPACITY_RESOURCE_LABEL,
3328
+ ];
3329
+ const flavorCannotBePlacedTemplate = {
3330
+ id: "openstack-flavor-cannot-be-placed",
3331
+ name: "Flavor Can No Longer Be Placed",
3332
+ summary: "No host has room for one more of a flavor people can ask for.",
3333
+ description: `Alert when no host can take one more of a flavor for 10 minutes: booting one now fails with No valid host. Counted host by host, from openstack_capacity_flavor_fits, which a probe reads from Placement's own allocation candidates, so it respects traits, and which a cloud on the agent works out from inventories. One incident per flavor per region. Only flavors someone can ask for (public ones and private ones in use), and never one too large for every host, which was never going to fit, or one whose only room is on a host someone disabled, which is planned work. This is allocation, not load. On the cloud's Capacity page, the flavor's row says how many would fit if what is free were on one host, which tells a full cloud from a fragmented one. Check \`openstack allocation candidate list --resource VCPU=<vcpus> --resource MEMORY_MB=<ram> --resource DISK_GB=<disk>\`, then move instances to make a whole host's room, or add capacity.`,
3334
+ category: "Capacity",
3335
+ severity: "Warning",
3336
+ getMonitorStep: (args) => {
3337
+ return buildFloorStep({
3338
+ args,
3339
+ service: OpenStackResourceKind_1.OpenStackServiceType.Placement,
3340
+ groupByAttributeKeys: FLAVOR_GROUP,
3341
+ queries: [
3342
+ {
3343
+ alias: "room_for",
3344
+ metricName: OpenStackCapacitySeries_1.OPENSTACK_CAPACITY_FLAVOR_FITS_SERIES,
3345
+ aggregationType: MetricsAggregationType_1.default.Max,
3346
+ },
3347
+ ],
3348
+ words: {
3349
+ incidentTitle: "[OpenStack] Flavor Can No Longer Be Placed",
3350
+ incidentDescription: `No host has room for one more of the flavor named above, so anyone booting one now is told No valid host. This is what has been promised, not what is busy. The cloud's Capacity page says whether the cloud is full or only fragmented: free capacity spread too thinly for one instance of this size. Check openstack allocation candidate list for the flavor's size, then live-migrate instances to make a whole host's room, or add capacity. The incident resolves on its own once a host has room.`,
3351
+ criteriaName: "Flavor Can No Longer Be Placed - room for < 1",
3352
+ criteriaDescription: "Triggers when no host has room for one more of a flavor for the whole window.",
3353
+ },
3354
+ });
3355
+ },
3356
+ };
3357
+ /*
3358
+ * How long until something is full, at its growth over the last week. Each thing that fills up is
3359
+ * one series, so this is one template: a zone's vCPUs, memory or disk, an external network's IPv4
3360
+ * addresses and a storage pool's bytes alike. It reads a number the worker worked out rather than
3361
+ * a forecast criteria's own fit, because a page and an alert that disagree about when something
3362
+ * fills up are how people stop trusting both: this number is what the Capacity page says.
3363
+ */
3364
+ const capacityForecastUnderDaysTemplate = {
3365
+ id: "openstack-capacity-forecast-under-days",
3366
+ name: `Capacity Forecast Under ${OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS} Days`,
3367
+ summary: `Something fills up in under ${OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS} days at its growth this week.`,
3368
+ description: `Alert when a zone's vCPUs, memory or disk, an external network's IPv4 addresses or a storage pool will be full in under ${OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS} days, for 10 minutes, at its growth over the last week. Reads openstack_capacity_days_until_full: a straight line through what was allocated, against what there is today. One incident per zone and resource class, network or pool. A new cloud stays quiet until it has a day of history, and something not growing has nothing to project. This is allocation, not load: it is how soon Placement runs out of things to promise. Check the cloud's Capacity page, which lists what fills up soonest first, and \`openstack server list --all-projects --long\` for what is growing, then add capacity or ask its owner.`,
3369
+ category: "Capacity",
3370
+ severity: "Warning",
3371
+ getMonitorStep: (args) => {
3372
+ return buildFloorStep({
3373
+ args,
3374
+ service: OpenStackResourceKind_1.OpenStackServiceType.Placement,
3375
+ groupByAttributeKeys: CAPACITY_GROUP,
3376
+ queries: [
3377
+ {
3378
+ alias: "days_until_full",
3379
+ metricName: OpenStackCapacitySeries_1.OPENSTACK_CAPACITY_DAYS_UNTIL_FULL_SERIES,
3380
+ aggregationType: MetricsAggregationType_1.default.Max,
3381
+ },
3382
+ ],
3383
+ value: OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS,
3384
+ words: {
3385
+ incidentTitle: `[OpenStack] Capacity Forecast Under ${OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS} Days`,
3386
+ incidentDescription: `What is named above will be full in under ${OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS} days at its growth over the last week. The cloud's Capacity page lists what fills up soonest first. Check openstack server list --all-projects for a zone, openstack floating ip list --network for an external network and openstack volume list --all-projects for a pool to find what is growing, then add capacity before it fills, or ask its owner. The incident resolves on its own once it has longer than that.`,
3387
+ criteriaName: `Capacity Forecast - days until full < ${OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS}`,
3388
+ criteriaDescription: `Triggers when something will be full in under ${OpenStackHealthRules_1.OPENSTACK_CAPACITY_FORECAST_WARNING_DAYS} days at its recent growth, for the whole window.`,
3389
+ },
3390
+ });
3391
+ },
3392
+ };
3393
+ /*
3394
+ * Whether a zone could lose its largest host and still fit what runs on it, as VMware's Host failure
3395
+ * asks of a cluster. Min across the classes, so any one of them short reads 0, and it is one
3396
+ * incident for the zone however many are.
3397
+ */
3398
+ const reservedHeadroomGoneTemplate = {
3399
+ id: "openstack-reserved-headroom-gone",
3400
+ name: "Reserved Headroom Gone",
3401
+ summary: "A zone can't lose its largest host and still fit what runs on it.",
3402
+ description: `Alert when a zone could not lose its largest host and still fit what runs on it, for 10 minutes: what is allocated, on any host in the zone, against what its other hosts could promise. Reads openstack_capacity_can_lose_a_host, one series per zone and resource class. One incident per zone. A zone with fewer than two hosts has nothing to say, and neither does one with a host someone disabled, because that is planned work and it says so on the Capacity page. It compares amounts rather than where each instance would land, so passing means an evacuation has room, not that every instance finds a host: the Capacity page's flavor table shows what is fragmented. This is allocation, not load. Check \`openstack hypervisor list --long\` for what each host holds, then add capacity, or move instances out of the zone.`,
3403
+ category: "Capacity",
3404
+ severity: "Warning",
3405
+ getMonitorStep: (args) => {
3406
+ return buildFloorStep({
3407
+ args,
3408
+ service: OpenStackResourceKind_1.OpenStackServiceType.Placement,
3409
+ groupByAttributeKeys: ZONE_GROUP,
3410
+ queries: [
3411
+ {
3412
+ alias: "can_lose_a_host",
3413
+ metricName: OpenStackCapacitySeries_1.OPENSTACK_CAPACITY_CAN_LOSE_A_HOST_SERIES,
3414
+ aggregationType: MetricsAggregationType_1.default.Min,
3415
+ },
3416
+ ],
3417
+ words: {
3418
+ incidentTitle: "[OpenStack] Reserved Headroom Gone",
3419
+ incidentDescription: `If this zone lost its largest host now, its other hosts could not fit what runs on it, so some instances would have nowhere to be evacuated to. Check openstack hypervisor list --long and the cloud's Capacity page, which says which resource is short and by how much, then add capacity, or move instances out of the zone. The incident resolves on its own once it could lose a host again.`,
3420
+ criteriaName: "Reserved Headroom Gone - can lose a host < 1",
3421
+ criteriaDescription: "Triggers when a zone could not lose its largest host and still fit what runs on it for the whole window.",
3422
+ },
3423
+ });
3424
+ },
3425
+ };
3426
+ function getAllOpenStackAlertTemplates() {
3427
+ return [
3428
+ cloudStoppedReportingTemplate,
3429
+ identityApiDownTemplate,
3430
+ computeApiDownTemplate,
3431
+ networkApiDownTemplate,
3432
+ blockStorageApiDownTemplate,
3433
+ imageApiDownTemplate,
3434
+ placementApiDownTemplate,
3435
+ tokenIssueFailingTemplate,
3436
+ serviceApiCheckFailingTemplate,
3437
+ certificateExpiringIn30DaysTemplate,
3438
+ certificateExpiringIn7DaysTemplate,
3439
+ instanceBootFailingTemplate,
3440
+ instanceBootSlowTemplate,
3441
+ volumeAttachFailingTemplate,
3442
+ floatingIpUnreachableTemplate,
3443
+ orchestrationApiDownTemplate,
3444
+ containerInfraApiDownTemplate,
3445
+ ratingApiDownTemplate,
3446
+ computeServiceDownTemplate,
3447
+ computeServiceDisabledTemplate,
3448
+ schedulerOrConductorDownTemplate,
3449
+ everySchedulerOrConductorDownTemplate,
3450
+ networkAgentDownTemplate,
3451
+ blockStorageServiceDownTemplate,
3452
+ orchestrationEngineDownTemplate,
3453
+ containerInfraConductorDownTemplate,
3454
+ ...(0, OpenStackControlPlaneAlertTemplates_1.getAllOpenStackControlPlaneAlertTemplates)(),
3455
+ vcpuAllocationHighTemplate,
3456
+ memoryAllocationHighTemplate,
3457
+ localDiskAllocationHighTemplate,
3458
+ hypervisorCpuSaturatedTemplate,
3459
+ hypervisorMemoryPressureTemplate,
3460
+ instanceCpuSaturatedTemplate,
3461
+ instanceDiskLatencyHighTemplate,
3462
+ instancesInErrorTemplate,
3463
+ instanceStuckBuildingTemplate,
3464
+ instanceStuckTransitioningTemplate,
3465
+ instanceStuckInVerifyResizeTemplate,
3466
+ routerNotActiveTemplate,
3467
+ floatingIpNotActiveTemplate,
3468
+ externalIpPoolNearlyFullTemplate,
3469
+ networkOutOfIpsTemplate,
3470
+ routerWithoutActiveAgentTemplate,
3471
+ routerWithTwoActiveAgentsTemplate,
3472
+ storagePoolWarningTemplate,
3473
+ storagePoolCriticalTemplate,
3474
+ volumesInErrorTemplate,
3475
+ volumeStuckTemplate,
3476
+ imageStuckTemplate,
3477
+ stackFailedTemplate,
3478
+ stackStuckTemplate,
3479
+ containerClusterFailedTemplate,
3480
+ containerClusterStuckTemplate,
3481
+ bareMetalApiDownTemplate,
3482
+ bareMetalConductorDownTemplate,
3483
+ sharedFileSystemsApiDownTemplate,
3484
+ shareServiceDownTemplate,
3485
+ shareInErrorTemplate,
3486
+ shareStuckTemplate,
3487
+ loadBalancerApiDownTemplate,
3488
+ loadBalancerInErrorTemplate,
3489
+ loadBalancerStuckTemplate,
3490
+ loadBalancerWithTwoMastersTemplate,
3491
+ amphoraInErrorTemplate,
3492
+ poolWithoutHealthyMembersTemplate,
3493
+ databaseApiDownTemplate,
3494
+ keyManagerApiDownTemplate,
3495
+ objectStoreApiDownTemplate,
3496
+ objectContainerGrowthTemplate,
3497
+ swiftStorageServerDownTemplate,
3498
+ swiftRingsDifferTemplate,
3499
+ swiftReplicationStaleTemplate,
3500
+ metricApiDownTemplate,
3501
+ metricNoProcessorsTemplate,
3502
+ metricBacklogGrowingTemplate,
3503
+ databaseInstanceInErrorTemplate,
3504
+ databaseInstanceStuckTemplate,
3505
+ databaseVolumeNearlyFullTemplate,
3506
+ dnsApiDownTemplate,
3507
+ dnsZoneInErrorTemplate,
3508
+ dnsZoneStuckPendingTemplate,
3509
+ dnsRecordsetInErrorTemplate,
3510
+ bareMetalNodeInErrorTemplate,
3511
+ bareMetalNodeStuckTemplate,
3512
+ bareMetalNodeMaintenanceTooLongTemplate,
3513
+ bareMetalPowerStateUnexpectedTemplate,
3514
+ projectQuotaNearlyReachedTemplate,
3515
+ flavorCannotBePlacedTemplate,
3516
+ capacityForecastUnderDaysTemplate,
3517
+ reservedHeadroomGoneTemplate,
3518
+ ];
3519
+ }
3520
+ /*
3521
+ * What a cloud can be offered: every template, but for those that need what it doesn't have. Nothing
3522
+ * known about it is no grounds to offer more than every cloud has.
3523
+ */
3524
+ function getOpenStackAlertTemplatesForCloud(cloud) {
3525
+ return getAllOpenStackAlertTemplates().filter((template) => {
3526
+ var _a;
3527
+ if (template.requiresProbe && cloud.isCollectedByProbe !== true) {
3528
+ return false;
3529
+ }
3530
+ if (template.requiresCheck === "api" && cloud.isApiCheckOn !== true) {
3531
+ return false;
3532
+ }
3533
+ if (template.requiresCheck === "lifecycle" &&
3534
+ cloud.isLifecycleCheckOn !== true) {
3535
+ return false;
3536
+ }
3537
+ return (!template.forService ||
3538
+ Boolean((_a = cloud.services) === null || _a === void 0 ? void 0 : _a.includes(template.forService)));
3539
+ });
3540
+ }
3541
+ function getOpenStackAlertTemplatesByCategory(category) {
3542
+ return getAllOpenStackAlertTemplates().filter((template) => {
3543
+ return template.category === category;
3544
+ });
3545
+ }
3546
+ function getOpenStackAlertTemplateById(id) {
3547
+ return getAllOpenStackAlertTemplates().find((template) => {
3548
+ return template.id === id;
3549
+ });
3550
+ }
3551
+ /*
3552
+ * The template a NEW OpenStack monitor starts on: the cloud going silent. It is the
3553
+ * one template that still speaks when every other one has stopped being evaluated,
3554
+ * and it has no threshold to tune.
3555
+ */
3556
+ function getOpenStackDefaultAlertTemplateId() {
3557
+ return cloudStoppedReportingTemplate.id;
3558
+ }