@oneuptime/common 11.4.1 → 11.5.0

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 (321) hide show
  1. package/Models/DatabaseModels/AIRun.ts +50 -0
  2. package/Models/DatabaseModels/AlertSeverity.ts +6 -0
  3. package/Models/DatabaseModels/IncidentSeverity.ts +6 -0
  4. package/Models/DatabaseModels/Index.ts +16 -0
  5. package/Models/DatabaseModels/IoTDeviceCredential.ts +471 -0
  6. package/Models/DatabaseModels/LlmLog.ts +56 -0
  7. package/Models/DatabaseModels/LlmProvider.ts +33 -0
  8. package/Models/DatabaseModels/NetworkDevice.ts +1385 -0
  9. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +717 -0
  10. package/Models/DatabaseModels/NetworkDeviceLabelRule.ts +514 -0
  11. package/Models/DatabaseModels/NetworkDeviceOwnerRule.ts +596 -0
  12. package/Models/DatabaseModels/NetworkDeviceOwnerTeam.ts +487 -0
  13. package/Models/DatabaseModels/NetworkDeviceOwnerUser.ts +486 -0
  14. package/Models/DatabaseModels/NetworkInterface.ts +563 -0
  15. package/Models/DatabaseModels/Project.ts +145 -0
  16. package/Models/DatabaseModels/TelemetryEntityRelationship.ts +54 -0
  17. package/Server/API/AIInvestigationAPI.ts +131 -63
  18. package/Server/API/AlertAPI.ts +5 -0
  19. package/Server/API/IncidentAPI.ts +10 -0
  20. package/Server/API/IncidentEpisodeAPI.ts +5 -0
  21. package/Server/API/LlmProviderAPI.ts +4 -0
  22. package/Server/API/ScheduledMaintenanceAPI.ts +5 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.ts +19 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.ts +25 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.ts +31 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.ts +19 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.ts +105 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.ts +15 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.ts +192 -0
  30. package/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.ts +37 -0
  31. package/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.ts +19 -0
  32. package/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.ts +25 -0
  33. package/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.ts +31 -0
  34. package/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.ts +79 -0
  35. package/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.ts +49 -0
  36. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +24 -0
  37. package/Server/Services/AIRunService.ts +58 -0
  38. package/Server/Services/AIService.ts +101 -0
  39. package/Server/Services/IncidentService.ts +14 -41
  40. package/Server/Services/Index.ts +14 -0
  41. package/Server/Services/IoTDeviceCredentialService.ts +351 -0
  42. package/Server/Services/IoTDeviceService.ts +64 -21
  43. package/Server/Services/LlmLogService.ts +26 -0
  44. package/Server/Services/LlmProviderService.ts +3 -0
  45. package/Server/Services/MonitorService.ts +4 -1
  46. package/Server/Services/NetworkDeviceDiscoveryScanService.ts +10 -0
  47. package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +204 -0
  48. package/Server/Services/NetworkDeviceLabelRuleService.ts +14 -0
  49. package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +222 -0
  50. package/Server/Services/NetworkDeviceOwnerRuleService.ts +14 -0
  51. package/Server/Services/NetworkDeviceOwnerTeamService.ts +10 -0
  52. package/Server/Services/NetworkDeviceOwnerUserService.ts +10 -0
  53. package/Server/Services/NetworkDeviceService.ts +50 -0
  54. package/Server/Services/NetworkInterfaceService.ts +10 -0
  55. package/Server/Services/TelemetryEntityRelationshipService.ts +23 -0
  56. package/Server/Services/TelemetryEntityService.ts +72 -2
  57. package/Server/Utils/AI/Sentinel/AlertInvestigationRunner.ts +244 -12
  58. package/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.ts +92 -19
  59. package/Server/Utils/AI/Sentinel/InvestigationQueue.ts +493 -0
  60. package/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.ts +88 -68
  61. package/Server/Utils/AI/Toolbox/Index.ts +2 -1
  62. package/Server/Utils/AI/Toolbox/MetricTools.ts +391 -0
  63. package/Server/Utils/LLM/LLMService.ts +21 -0
  64. package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +170 -2
  65. package/Server/Utils/Monitor/IoTDeviceAbsenceSeries.ts +101 -0
  66. package/Server/Utils/Monitor/MonitorAlert.ts +15 -3
  67. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +1 -1
  68. package/Server/Utils/Monitor/MonitorIncident.ts +19 -3
  69. package/Server/Utils/Monitor/MonitorMetricUtil.ts +87 -0
  70. package/Server/Utils/Monitor/MonitorResource.ts +77 -21
  71. package/Server/Utils/Monitor/MonitorTemplateUtil.ts +1 -1
  72. package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +201 -0
  73. package/Server/Utils/Monitor/NetworkInventoryUtil.ts +215 -0
  74. package/Server/Utils/Monitor/SnmpInterfaceRateUtil.ts +169 -0
  75. package/Tests/Server/Services/AIServiceDailyBudget.test.ts +173 -0
  76. package/Tests/Server/Services/IncidentInternalNoteAnnouncement.test.ts +97 -0
  77. package/Tests/Server/Services/IoTDeviceService.test.ts +54 -0
  78. package/Tests/Server/Utils/AI/BaselineAnomalyTool.test.ts +253 -0
  79. package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +44 -0
  80. package/Tests/Server/Utils/AI/SentinelAlertGating.test.ts +360 -0
  81. package/Tests/Server/Utils/AI/SentinelInvestigationQueue.test.ts +295 -0
  82. package/Tests/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.test.ts +59 -0
  83. package/Tests/Server/Utils/Monitor/IoTDeviceAbsenceSeries.test.ts +113 -0
  84. package/Tests/Server/Utils/Monitor/PerSeriesRecoveryResolution.test.ts +198 -0
  85. package/Tests/Types/Monitor/MonitorType.test.ts +1 -1
  86. package/Tests/Utils/Monitor/LatencyMatrixUtil.test.ts +111 -0
  87. package/Types/AI/AIRunStatus.ts +9 -0
  88. package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +0 -1
  89. package/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.ts +8 -3
  90. package/Types/LlmLogStatus.ts +1 -0
  91. package/Types/Monitor/CriteriaFilter.ts +5 -0
  92. package/Types/Monitor/IotAlertTemplates.ts +22 -3
  93. package/Types/Monitor/LatencyMatrix.ts +27 -0
  94. package/Types/Monitor/MonitorCriteriaInstance.ts +2 -2
  95. package/Types/Monitor/MonitorMetricType.ts +10 -0
  96. package/Types/Monitor/MonitorStep.ts +36 -11
  97. package/Types/Monitor/MonitorStepNetworkDeviceMonitor.ts +55 -0
  98. package/Types/Monitor/MonitorStepSnmpMonitor.ts +8 -0
  99. package/Types/Monitor/MonitorType.ts +14 -9
  100. package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +12 -0
  101. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.ts +116 -0
  102. package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +29 -0
  103. package/Types/Monitor/SnmpMonitor/SnmpInterface.ts +31 -0
  104. package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.ts +24 -0
  105. package/Types/Monitor/SnmpMonitor/SnmpTrap.ts +20 -0
  106. package/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.ts +173 -0
  107. package/Types/Permission.ts +314 -0
  108. package/Types/Probe/ProbeMonitorResponse.ts +8 -0
  109. package/UI/Components/Icon/Icon.tsx +8 -6
  110. package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +2 -2
  111. package/UI/Components/Tabs/Tabs.tsx +10 -1
  112. package/UI/Utils/Navigation.ts +10 -1
  113. package/Utils/Dashboard/Components/DashboardLogChartComponent.ts +16 -21
  114. package/Utils/Monitor/LatencyMatrixUtil.ts +162 -0
  115. package/Utils/Monitor/MonitorMetricType.ts +71 -1
  116. package/Utils/Monitor/NetworkTopologyUtil.ts +159 -0
  117. package/Utils/Telemetry/EntityRelationship.ts +11 -0
  118. package/build/dist/Models/DatabaseModels/AIRun.js +52 -0
  119. package/build/dist/Models/DatabaseModels/AIRun.js.map +1 -1
  120. package/build/dist/Models/DatabaseModels/AlertSeverity.js +6 -0
  121. package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
  122. package/build/dist/Models/DatabaseModels/IncidentSeverity.js +6 -0
  123. package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
  124. package/build/dist/Models/DatabaseModels/Index.js +16 -0
  125. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  126. package/build/dist/Models/DatabaseModels/IoTDeviceCredential.js +493 -0
  127. package/build/dist/Models/DatabaseModels/IoTDeviceCredential.js.map +1 -0
  128. package/build/dist/Models/DatabaseModels/LlmLog.js +58 -0
  129. package/build/dist/Models/DatabaseModels/LlmLog.js.map +1 -1
  130. package/build/dist/Models/DatabaseModels/LlmProvider.js +33 -0
  131. package/build/dist/Models/DatabaseModels/LlmProvider.js.map +1 -1
  132. package/build/dist/Models/DatabaseModels/NetworkDevice.js +1426 -0
  133. package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -0
  134. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +738 -0
  135. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -0
  136. package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js +522 -0
  137. package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js.map +1 -0
  138. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js +603 -0
  139. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js.map +1 -0
  140. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerTeam.js +503 -0
  141. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerTeam.js.map +1 -0
  142. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerUser.js +502 -0
  143. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerUser.js.map +1 -0
  144. package/build/dist/Models/DatabaseModels/NetworkInterface.js +589 -0
  145. package/build/dist/Models/DatabaseModels/NetworkInterface.js.map +1 -0
  146. package/build/dist/Models/DatabaseModels/Project.js +147 -0
  147. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  148. package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js +57 -0
  149. package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js.map +1 -1
  150. package/build/dist/Server/API/AIInvestigationAPI.js +95 -55
  151. package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
  152. package/build/dist/Server/API/AlertAPI.js +5 -0
  153. package/build/dist/Server/API/AlertAPI.js.map +1 -1
  154. package/build/dist/Server/API/IncidentAPI.js +10 -0
  155. package/build/dist/Server/API/IncidentAPI.js.map +1 -1
  156. package/build/dist/Server/API/IncidentEpisodeAPI.js +5 -0
  157. package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
  158. package/build/dist/Server/API/LlmProviderAPI.js +5 -7
  159. package/build/dist/Server/API/LlmProviderAPI.js.map +1 -1
  160. package/build/dist/Server/API/ScheduledMaintenanceAPI.js +5 -0
  161. package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
  162. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.js +12 -0
  163. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.js.map +1 -0
  164. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.js +14 -0
  165. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.js.map +1 -0
  166. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.js +18 -0
  167. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.js.map +1 -0
  168. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.js +12 -0
  169. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.js.map +1 -0
  170. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.js +51 -0
  171. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.js.map +1 -0
  172. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.js +12 -0
  173. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.js.map +1 -0
  174. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.js +101 -0
  175. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.js.map +1 -0
  176. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.js +18 -0
  177. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.js.map +1 -0
  178. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.js +12 -0
  179. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.js.map +1 -0
  180. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.js +14 -0
  181. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.js.map +1 -0
  182. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.js +16 -0
  183. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.js.map +1 -0
  184. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.js +38 -0
  185. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.js.map +1 -0
  186. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.js +22 -0
  187. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.js.map +1 -0
  188. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +24 -0
  189. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  190. package/build/dist/Server/Services/AIRunService.js +33 -0
  191. package/build/dist/Server/Services/AIRunService.js.map +1 -1
  192. package/build/dist/Server/Services/AIService.js +82 -9
  193. package/build/dist/Server/Services/AIService.js.map +1 -1
  194. package/build/dist/Server/Services/IncidentService.js +14 -25
  195. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  196. package/build/dist/Server/Services/Index.js +14 -0
  197. package/build/dist/Server/Services/Index.js.map +1 -1
  198. package/build/dist/Server/Services/IoTDeviceCredentialService.js +321 -0
  199. package/build/dist/Server/Services/IoTDeviceCredentialService.js.map +1 -0
  200. package/build/dist/Server/Services/IoTDeviceService.js +49 -15
  201. package/build/dist/Server/Services/IoTDeviceService.js.map +1 -1
  202. package/build/dist/Server/Services/LlmLogService.js +29 -0
  203. package/build/dist/Server/Services/LlmLogService.js.map +1 -1
  204. package/build/dist/Server/Services/LlmProviderService.js +3 -0
  205. package/build/dist/Server/Services/LlmProviderService.js.map +1 -1
  206. package/build/dist/Server/Services/MonitorService.js +2 -1
  207. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  208. package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +9 -0
  209. package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -0
  210. package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +166 -0
  211. package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -0
  212. package/build/dist/Server/Services/NetworkDeviceLabelRuleService.js +13 -0
  213. package/build/dist/Server/Services/NetworkDeviceLabelRuleService.js.map +1 -0
  214. package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +186 -0
  215. package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -0
  216. package/build/dist/Server/Services/NetworkDeviceOwnerRuleService.js +13 -0
  217. package/build/dist/Server/Services/NetworkDeviceOwnerRuleService.js.map +1 -0
  218. package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js +9 -0
  219. package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js.map +1 -0
  220. package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js +9 -0
  221. package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js.map +1 -0
  222. package/build/dist/Server/Services/NetworkDeviceService.js +52 -0
  223. package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -0
  224. package/build/dist/Server/Services/NetworkInterfaceService.js +9 -0
  225. package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -0
  226. package/build/dist/Server/Services/TelemetryEntityRelationshipService.js +22 -0
  227. package/build/dist/Server/Services/TelemetryEntityRelationshipService.js.map +1 -1
  228. package/build/dist/Server/Services/TelemetryEntityService.js +64 -2
  229. package/build/dist/Server/Services/TelemetryEntityService.js.map +1 -1
  230. package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js +189 -9
  231. package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js.map +1 -1
  232. package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js +84 -17
  233. package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js.map +1 -1
  234. package/build/dist/Server/Utils/AI/Sentinel/InvestigationQueue.js +428 -0
  235. package/build/dist/Server/Utils/AI/Sentinel/InvestigationQueue.js.map +1 -0
  236. package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js +63 -47
  237. package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js.map +1 -1
  238. package/build/dist/Server/Utils/AI/Toolbox/Index.js +2 -1
  239. package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
  240. package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js +300 -0
  241. package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js.map +1 -1
  242. package/build/dist/Server/Utils/LLM/LLMService.js +16 -0
  243. package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
  244. package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +130 -2
  245. package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
  246. package/build/dist/Server/Utils/Monitor/IoTDeviceAbsenceSeries.js +81 -0
  247. package/build/dist/Server/Utils/Monitor/IoTDeviceAbsenceSeries.js.map +1 -0
  248. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +18 -7
  249. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  250. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +1 -1
  251. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  252. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +25 -10
  253. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  254. package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +69 -3
  255. package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
  256. package/build/dist/Server/Utils/Monitor/MonitorResource.js +76 -30
  257. package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
  258. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +1 -1
  259. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
  260. package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +147 -0
  261. package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -0
  262. package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +167 -0
  263. package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -0
  264. package/build/dist/Server/Utils/Monitor/SnmpInterfaceRateUtil.js +93 -0
  265. package/build/dist/Server/Utils/Monitor/SnmpInterfaceRateUtil.js.map +1 -0
  266. package/build/dist/Types/AI/AIRunStatus.js +9 -0
  267. package/build/dist/Types/AI/AIRunStatus.js.map +1 -1
  268. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +0 -1
  269. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
  270. package/build/dist/Types/LlmLogStatus.js +1 -0
  271. package/build/dist/Types/LlmLogStatus.js.map +1 -1
  272. package/build/dist/Types/Monitor/CriteriaFilter.js +5 -0
  273. package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
  274. package/build/dist/Types/Monitor/IotAlertTemplates.js +7 -7
  275. package/build/dist/Types/Monitor/IotAlertTemplates.js.map +1 -1
  276. package/build/dist/Types/Monitor/LatencyMatrix.js +2 -0
  277. package/build/dist/Types/Monitor/LatencyMatrix.js.map +1 -0
  278. package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +2 -2
  279. package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
  280. package/build/dist/Types/Monitor/MonitorMetricType.js +9 -0
  281. package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
  282. package/build/dist/Types/Monitor/MonitorStep.js +22 -9
  283. package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
  284. package/build/dist/Types/Monitor/MonitorStepNetworkDeviceMonitor.js +36 -0
  285. package/build/dist/Types/Monitor/MonitorStepNetworkDeviceMonitor.js.map +1 -0
  286. package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js +3 -0
  287. package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js.map +1 -1
  288. package/build/dist/Types/Monitor/MonitorType.js +14 -9
  289. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  290. package/build/dist/Types/Monitor/SnmpMonitor/LldpNeighbor.js +2 -0
  291. package/build/dist/Types/Monitor/SnmpMonitor/LldpNeighbor.js.map +1 -0
  292. package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +89 -0
  293. package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js.map +1 -0
  294. package/build/dist/Types/Monitor/SnmpMonitor/NetworkTopology.js +2 -0
  295. package/build/dist/Types/Monitor/SnmpMonitor/NetworkTopology.js.map +1 -0
  296. package/build/dist/Types/Monitor/SnmpMonitor/SnmpInterface.js +2 -0
  297. package/build/dist/Types/Monitor/SnmpMonitor/SnmpInterface.js.map +1 -0
  298. package/build/dist/Types/Monitor/SnmpMonitor/SnmpTrap.js +2 -0
  299. package/build/dist/Types/Monitor/SnmpMonitor/SnmpTrap.js.map +1 -0
  300. package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js +137 -0
  301. package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js.map +1 -0
  302. package/build/dist/Types/Permission.js +280 -0
  303. package/build/dist/Types/Permission.js.map +1 -1
  304. package/build/dist/UI/Components/Icon/Icon.js +8 -6
  305. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  306. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +2 -2
  307. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
  308. package/build/dist/UI/Components/Tabs/Tabs.js +3 -1
  309. package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
  310. package/build/dist/UI/Utils/Navigation.js +11 -1
  311. package/build/dist/UI/Utils/Navigation.js.map +1 -1
  312. package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js +17 -20
  313. package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js.map +1 -1
  314. package/build/dist/Utils/Monitor/LatencyMatrixUtil.js +89 -0
  315. package/build/dist/Utils/Monitor/LatencyMatrixUtil.js.map +1 -0
  316. package/build/dist/Utils/Monitor/MonitorMetricType.js +68 -1
  317. package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
  318. package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +112 -0
  319. package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -0
  320. package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
  321. package/package.json +1 -1
@@ -24,6 +24,16 @@ enum MonitorMetricType {
24
24
  TimeToFirstByte = "oneuptime.monitor.http.time.to.first.byte",
25
25
  DownloadTime = "oneuptime.monitor.http.download.time",
26
26
 
27
+ /*
28
+ * Per-interface SNMP metrics. Emitted when interface monitoring is enabled
29
+ * on an SNMP monitor; one series per interface (interfaceName attribute).
30
+ */
31
+ SnmpInterfaceOperStatus = "oneuptime.monitor.snmp.interface.oper.status",
32
+ SnmpInterfaceInBitsPerSecond = "oneuptime.monitor.snmp.interface.in.bits.per.second",
33
+ SnmpInterfaceOutBitsPerSecond = "oneuptime.monitor.snmp.interface.out.bits.per.second",
34
+ SnmpInterfaceUtilizationPercent = "oneuptime.monitor.snmp.interface.utilization.percent",
35
+ SnmpInterfaceErrorsPerSecond = "oneuptime.monitor.snmp.interface.errors.per.second",
36
+
27
37
  /*
28
38
  * Extended server/VM metrics. Emitted when the agent payload contains them;
29
39
  * absent for older agents, which keeps the pipeline backwards-compatible.
@@ -29,6 +29,9 @@ import MonitorStepExceptionMonitor, {
29
29
  import MonitorStepProfileMonitor, {
30
30
  MonitorStepProfileMonitorUtil,
31
31
  } from "./MonitorStepProfileMonitor";
32
+ import MonitorStepNetworkDeviceMonitor, {
33
+ MonitorStepNetworkDeviceMonitorUtil,
34
+ } from "./MonitorStepNetworkDeviceMonitor";
32
35
  import MonitorStepSnmpMonitor, {
33
36
  MonitorStepSnmpMonitorUtil,
34
37
  } from "./MonitorStepSnmpMonitor";
@@ -168,9 +171,16 @@ export interface MonitorStepType {
168
171
  // Profile monitor
169
172
  profileMonitor?: MonitorStepProfileMonitor | undefined;
170
173
 
171
- // SNMP monitor
174
+ /*
175
+ * SNMP config carrier. For Network Device monitors this is populated
176
+ * server-side (hydrated from the referenced NetworkDevice) when work is
177
+ * handed to probes — it is never set by users.
178
+ */
172
179
  snmpMonitor?: MonitorStepSnmpMonitor | undefined;
173
180
 
181
+ // Network Device monitor (references a NetworkDevice resource)
182
+ networkDeviceMonitor?: MonitorStepNetworkDeviceMonitor | undefined;
183
+
174
184
  // DNS monitor
175
185
  dnsMonitor?: MonitorStepDnsMonitor | undefined;
176
186
 
@@ -239,6 +249,7 @@ export default class MonitorStep extends DatabaseProperty {
239
249
  exceptionMonitor: undefined,
240
250
  profileMonitor: undefined,
241
251
  snmpMonitor: undefined,
252
+ networkDeviceMonitor: undefined,
242
253
  dnsMonitor: undefined,
243
254
  domainMonitor: undefined,
244
255
  dnssecMonitor: undefined,
@@ -289,6 +300,7 @@ export default class MonitorStep extends DatabaseProperty {
289
300
  exceptionMonitor: undefined,
290
301
  profileMonitor: undefined,
291
302
  snmpMonitor: undefined,
303
+ networkDeviceMonitor: undefined,
292
304
  dnsMonitor: undefined,
293
305
  domainMonitor: undefined,
294
306
  dnssecMonitor: undefined,
@@ -476,6 +488,13 @@ export default class MonitorStep extends DatabaseProperty {
476
488
  return this;
477
489
  }
478
490
 
491
+ public setNetworkDeviceMonitor(
492
+ networkDeviceMonitor: MonitorStepNetworkDeviceMonitor,
493
+ ): MonitorStep {
494
+ this.data!.networkDeviceMonitor = networkDeviceMonitor;
495
+ return this;
496
+ }
497
+
479
498
  public setSnmpMonitor(snmpMonitor: MonitorStepSnmpMonitor): MonitorStep {
480
499
  this.data!.snmpMonitor = snmpMonitor;
481
500
  return this;
@@ -681,20 +700,17 @@ export default class MonitorStep extends DatabaseProperty {
681
700
  return "Port is required";
682
701
  }
683
702
 
684
- if (monitorType === MonitorType.SNMP) {
685
- if (!value.data.snmpMonitor) {
686
- return "SNMP configuration is required";
687
- }
688
-
689
- if (!value.data.snmpMonitor.hostname) {
690
- return "SNMP hostname is required";
703
+ if (monitorType === MonitorType.NetworkDevice) {
704
+ if (!value.data.networkDeviceMonitor?.networkDeviceId) {
705
+ return "Network Device is required";
691
706
  }
692
707
 
693
708
  if (
694
- !value.data.snmpMonitor.oids ||
695
- value.data.snmpMonitor.oids.length === 0
709
+ !value.data.networkDeviceMonitor.monitorInterfaces &&
710
+ (!value.data.networkDeviceMonitor.oids ||
711
+ value.data.networkDeviceMonitor.oids.length === 0)
696
712
  ) {
697
- return "At least one OID is required";
713
+ return "Enable interface monitoring or configure at least one OID";
698
714
  }
699
715
  }
700
716
 
@@ -886,6 +902,11 @@ export default class MonitorStep extends DatabaseProperty {
886
902
  snmpMonitor: this.data.snmpMonitor
887
903
  ? MonitorStepSnmpMonitorUtil.toJSON(this.data.snmpMonitor)
888
904
  : undefined,
905
+ networkDeviceMonitor: this.data.networkDeviceMonitor
906
+ ? MonitorStepNetworkDeviceMonitorUtil.toJSON(
907
+ this.data.networkDeviceMonitor,
908
+ )
909
+ : undefined,
889
910
  dnsMonitor: this.data.dnsMonitor
890
911
  ? MonitorStepDnsMonitorUtil.toJSON(this.data.dnsMonitor)
891
912
  : undefined,
@@ -1048,6 +1069,9 @@ export default class MonitorStep extends DatabaseProperty {
1048
1069
  snmpMonitor: json["snmpMonitor"]
1049
1070
  ? (json["snmpMonitor"] as JSONObject)
1050
1071
  : undefined,
1072
+ networkDeviceMonitor: json["networkDeviceMonitor"]
1073
+ ? (json["networkDeviceMonitor"] as JSONObject)
1074
+ : undefined,
1051
1075
  dnsMonitor: json["dnsMonitor"]
1052
1076
  ? (json["dnsMonitor"] as JSONObject)
1053
1077
  : undefined,
@@ -1116,6 +1140,7 @@ export default class MonitorStep extends DatabaseProperty {
1116
1140
  metricMonitor: Zod.any().optional(),
1117
1141
  profileMonitor: Zod.any().optional(),
1118
1142
  snmpMonitor: Zod.any().optional(),
1143
+ networkDeviceMonitor: Zod.any().optional(),
1119
1144
  dnsMonitor: Zod.any().optional(),
1120
1145
  domainMonitor: Zod.any().optional(),
1121
1146
  dnssecMonitor: Zod.any().optional(),
@@ -0,0 +1,55 @@
1
+ import { JSONObject } from "../JSON";
2
+ import SnmpOid from "./SnmpMonitor/SnmpOid";
3
+
4
+ /*
5
+ * Step configuration for Network Device monitors. Unlike the retired SNMP
6
+ * monitor type, the step carries no connection details — it references a
7
+ * NetworkDevice resource which owns the hostname, credentials, and
8
+ * interface inventory. The server hydrates the device's SNMP config into
9
+ * the step (as `snmpMonitor`) when handing work to probes.
10
+ */
11
+ export default interface MonitorStepNetworkDeviceMonitor {
12
+ networkDeviceId: string | undefined;
13
+ monitorInterfaces: boolean;
14
+ oids: Array<SnmpOid>;
15
+ }
16
+
17
+ export class MonitorStepNetworkDeviceMonitorUtil {
18
+ public static getDefault(): MonitorStepNetworkDeviceMonitor {
19
+ return {
20
+ networkDeviceId: undefined,
21
+ monitorInterfaces: true,
22
+ oids: [],
23
+ };
24
+ }
25
+
26
+ public static fromJSON(json: JSONObject): MonitorStepNetworkDeviceMonitor {
27
+ return {
28
+ networkDeviceId: (json["networkDeviceId"] as string) || undefined,
29
+ monitorInterfaces: json["monitorInterfaces"] !== false,
30
+ oids: ((json["oids"] as Array<JSONObject>) || []).map(
31
+ (oid: JSONObject) => {
32
+ return {
33
+ oid: (oid["oid"] as string) || "",
34
+ name: (oid["name"] as string) || undefined,
35
+ description: (oid["description"] as string) || undefined,
36
+ };
37
+ },
38
+ ),
39
+ };
40
+ }
41
+
42
+ public static toJSON(monitor: MonitorStepNetworkDeviceMonitor): JSONObject {
43
+ return {
44
+ networkDeviceId: monitor.networkDeviceId,
45
+ monitorInterfaces: monitor.monitorInterfaces,
46
+ oids: monitor.oids.map((oid: SnmpOid) => {
47
+ return {
48
+ oid: oid.oid,
49
+ name: oid.name,
50
+ description: oid.description,
51
+ };
52
+ }),
53
+ };
54
+ }
55
+ }
@@ -15,6 +15,11 @@ export default interface MonitorStepSnmpMonitor {
15
15
  oids: Array<SnmpOid>;
16
16
  timeout: number;
17
17
  retries: number;
18
+ /*
19
+ * When true, the probe walks the IF-MIB interface tables on every check
20
+ * and reports per-interface status, bandwidth, and error metrics.
21
+ */
22
+ monitorInterfaces?: boolean | undefined;
18
23
  }
19
24
 
20
25
  export class MonitorStepSnmpMonitorUtil {
@@ -27,6 +32,7 @@ export class MonitorStepSnmpMonitorUtil {
27
32
  oids: [],
28
33
  timeout: 5000,
29
34
  retries: 3,
35
+ monitorInterfaces: false,
30
36
  };
31
37
  }
32
38
 
@@ -46,6 +52,7 @@ export class MonitorStepSnmpMonitorUtil {
46
52
  ),
47
53
  timeout: (json["timeout"] as number) || 5000,
48
54
  retries: (json["retries"] as number) || 3,
55
+ monitorInterfaces: Boolean(json["monitorInterfaces"]),
49
56
  };
50
57
  }
51
58
 
@@ -97,6 +104,7 @@ export class MonitorStepSnmpMonitorUtil {
97
104
  }),
98
105
  timeout: monitor.timeout,
99
106
  retries: monitor.retries,
107
+ monitorInterfaces: monitor.monitorInterfaces,
100
108
  };
101
109
  }
102
110
  }
@@ -32,8 +32,13 @@ enum MonitorType {
32
32
  Exceptions = "Exceptions",
33
33
  Profiles = "Profiles",
34
34
 
35
- // Network device monitoring
36
- SNMP = "SNMP",
35
+ /*
36
+ * Network device monitoring (SNMP-based). Replaced the retired SNMP
37
+ * monitor type: instead of inline SNMP config, the monitor references a
38
+ * NetworkDevice resource that owns the credentials and interface
39
+ * inventory.
40
+ */
41
+ NetworkDevice = "Network Device",
37
42
 
38
43
  // DNS monitoring
39
44
  DNS = "DNS",
@@ -95,7 +100,7 @@ export class MonitorTypeHelper {
95
100
  },
96
101
  {
97
102
  label: "Network",
98
- monitorTypes: [MonitorType.SNMP],
103
+ monitorTypes: [MonitorType.NetworkDevice],
99
104
  },
100
105
  {
101
106
  label: "Infrastructure",
@@ -332,10 +337,10 @@ export class MonitorTypeHelper {
332
337
  icon: IconProp.Fire,
333
338
  },
334
339
  {
335
- monitorType: MonitorType.SNMP,
336
- title: "SNMP",
340
+ monitorType: MonitorType.NetworkDevice,
341
+ title: "Network Device",
337
342
  description:
338
- "This monitor type lets you monitor network devices like switches, routers, and firewalls via SNMP.",
343
+ "This monitor type lets you monitor a registered Network Device (switch, router, firewall, or access point) via SNMP — availability, interface status, bandwidth, and traps.",
339
344
  icon: IconProp.Signal,
340
345
  },
341
346
  {
@@ -411,7 +416,7 @@ export class MonitorTypeHelper {
411
416
  monitorType === MonitorType.SSLCertificate ||
412
417
  monitorType === MonitorType.SyntheticMonitor ||
413
418
  monitorType === MonitorType.CustomJavaScriptCode ||
414
- monitorType === MonitorType.SNMP ||
419
+ monitorType === MonitorType.NetworkDevice ||
415
420
  monitorType === MonitorType.DNS ||
416
421
  monitorType === MonitorType.DNSSEC ||
417
422
  monitorType === MonitorType.Domain ||
@@ -437,7 +442,7 @@ export class MonitorTypeHelper {
437
442
  MonitorType.Traces,
438
443
  MonitorType.Exceptions,
439
444
  MonitorType.Profiles,
440
- MonitorType.SNMP,
445
+ MonitorType.NetworkDevice,
441
446
  MonitorType.DNS,
442
447
  MonitorType.DNSSEC,
443
448
  MonitorType.Domain,
@@ -482,7 +487,7 @@ export class MonitorTypeHelper {
482
487
  monitorType === MonitorType.SSLCertificate ||
483
488
  monitorType === MonitorType.SyntheticMonitor ||
484
489
  monitorType === MonitorType.CustomJavaScriptCode ||
485
- monitorType === MonitorType.SNMP ||
490
+ monitorType === MonitorType.NetworkDevice ||
486
491
  monitorType === MonitorType.DNS ||
487
492
  monitorType === MonitorType.DNSSEC ||
488
493
  monitorType === MonitorType.Domain ||
@@ -0,0 +1,12 @@
1
+ /*
2
+ * One neighbor entry from a device's LLDP remote table (LLDP-MIB
3
+ * lldpRemTable). Captured by the probe alongside the interface walk; the
4
+ * server matches remoteSysName / remoteChassisId against known
5
+ * NetworkDevices to build the topology graph.
6
+ */
7
+ export default interface LldpNeighbor {
8
+ localInterfaceIndex?: number | undefined;
9
+ remoteChassisId?: string | undefined;
10
+ remotePortId?: string | undefined;
11
+ remoteSysName?: string | undefined;
12
+ }
@@ -0,0 +1,116 @@
1
+ import ObjectID from "../../ObjectID";
2
+ import FilterCondition from "../../Filter/FilterCondition";
3
+ import { CheckOn, CriteriaFilter, FilterType } from "../CriteriaFilter";
4
+ import MonitorCriteriaInstance from "../MonitorCriteriaInstance";
5
+
6
+ /*
7
+ * Prebuilt criteria for Network Device monitors — the alerts most operators
8
+ * want and would otherwise hand-build every time. Applying a pack appends
9
+ * these criteria instances to the monitor; the user still picks severities
10
+ * and on-call policies afterwards.
11
+ */
12
+ export interface NetworkDeviceAlertPackItem {
13
+ name: string;
14
+ description: string;
15
+ filters: Array<CriteriaFilter>;
16
+ createIncidents: boolean;
17
+ createAlerts: boolean;
18
+ }
19
+
20
+ export interface NetworkDeviceAlertPackContext {
21
+ // Status to move the monitor to when a pack criteria matches (offline/degraded).
22
+ downMonitorStatusId?: ObjectID | undefined;
23
+ }
24
+
25
+ const PACK: Array<NetworkDeviceAlertPackItem> = [
26
+ {
27
+ name: "Device unreachable",
28
+ description:
29
+ "The device stopped answering SNMP — likely down or unreachable.",
30
+ filters: [
31
+ {
32
+ checkOn: CheckOn.SnmpIsOnline,
33
+ filterType: FilterType.False,
34
+ value: undefined,
35
+ },
36
+ ],
37
+ createIncidents: true,
38
+ createAlerts: false,
39
+ },
40
+ {
41
+ name: "Interface down",
42
+ description:
43
+ "An administratively-enabled interface went operationally down.",
44
+ filters: [
45
+ {
46
+ checkOn: CheckOn.SnmpInterfaceIsDown,
47
+ filterType: FilterType.True,
48
+ value: undefined,
49
+ },
50
+ ],
51
+ createIncidents: true,
52
+ createAlerts: false,
53
+ },
54
+ {
55
+ name: "Interface saturated",
56
+ description:
57
+ "An interface is running above 80% utilization — the link may need an upgrade.",
58
+ filters: [
59
+ {
60
+ checkOn: CheckOn.SnmpInterfaceUtilizationPercent,
61
+ filterType: FilterType.GreaterThan,
62
+ value: 80,
63
+ },
64
+ ],
65
+ createIncidents: false,
66
+ createAlerts: true,
67
+ },
68
+ {
69
+ name: "Interface errors",
70
+ description:
71
+ "An interface is logging errors — usually cabling, optics, or duplex problems.",
72
+ filters: [
73
+ {
74
+ checkOn: CheckOn.SnmpInterfaceErrorsPerSecond,
75
+ filterType: FilterType.GreaterThan,
76
+ value: 1,
77
+ },
78
+ ],
79
+ createIncidents: false,
80
+ createAlerts: true,
81
+ },
82
+ ];
83
+
84
+ export default class NetworkDeviceAlertPackUtil {
85
+ public static getPackItems(): Array<NetworkDeviceAlertPackItem> {
86
+ return PACK;
87
+ }
88
+
89
+ /*
90
+ * Builds ready-to-append MonitorCriteriaInstances from the pack. Each is
91
+ * enabled and set to change monitor status; severities and on-call
92
+ * policies are left for the user to fill in.
93
+ */
94
+ public static buildCriteriaInstances(
95
+ context?: NetworkDeviceAlertPackContext,
96
+ ): Array<MonitorCriteriaInstance> {
97
+ return PACK.map((item: NetworkDeviceAlertPackItem) => {
98
+ const instance: MonitorCriteriaInstance = new MonitorCriteriaInstance();
99
+ instance.data = {
100
+ id: ObjectID.generate().toString(),
101
+ monitorStatusId: context?.downMonitorStatusId,
102
+ filterCondition: FilterCondition.All,
103
+ filters: item.filters,
104
+ incidents: [],
105
+ alerts: [],
106
+ createAlerts: item.createAlerts,
107
+ createIncidents: item.createIncidents,
108
+ changeMonitorStatus: item.createIncidents,
109
+ isEnabled: true,
110
+ name: item.name,
111
+ description: item.description,
112
+ };
113
+ return instance;
114
+ });
115
+ }
116
+ }
@@ -0,0 +1,29 @@
1
+ /*
2
+ * A derived view of the network topology for one project, built server-side
3
+ * from the LLDP neighbor data each device reports. Nodes are devices;
4
+ * unmanaged neighbors (LLDP peers with no matching NetworkDevice) appear as
5
+ * lightweight nodes so the graph doesn't dead-end. Edges are LLDP links.
6
+ */
7
+ export type NetworkTopologyNodeStatus = "up" | "down" | "unknown";
8
+
9
+ export interface NetworkTopologyNode {
10
+ // Device id for managed nodes; a synthetic "unmanaged:<key>" id otherwise.
11
+ id: string;
12
+ name: string;
13
+ isManaged: boolean;
14
+ status: NetworkTopologyNodeStatus;
15
+ interfacesUp?: number | undefined;
16
+ interfacesDown?: number | undefined;
17
+ }
18
+
19
+ export interface NetworkTopologyEdge {
20
+ fromNodeId: string;
21
+ toNodeId: string;
22
+ fromPort?: string | undefined;
23
+ toPort?: string | undefined;
24
+ }
25
+
26
+ export default interface NetworkTopology {
27
+ nodes: Array<NetworkTopologyNode>;
28
+ edges: Array<NetworkTopologyEdge>;
29
+ }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * One row of the IF-MIB interface tables (ifTable + ifXTable), walked by the
3
+ * probe when interface monitoring is enabled on an SNMP monitor.
4
+ *
5
+ * Octet/error/discard counters are cumulative since device boot (64-bit HC
6
+ * counters preferred, 32-bit fallback). The `*PerSecond` and
7
+ * `utilizationPercent` fields are NOT collected from the device — the server
8
+ * computes them from the delta against the previous check before the
9
+ * response is persisted, so they are absent on the first check after a
10
+ * monitor is created and after a counter wrap or device reboot.
11
+ */
12
+ export default interface SnmpInterface {
13
+ interfaceIndex: number;
14
+ name: string;
15
+ alias?: string | undefined;
16
+ isOperationallyUp: boolean;
17
+ isAdministrativelyUp: boolean;
18
+ speedInBitsPerSecond?: number | undefined;
19
+ inOctets?: number | undefined;
20
+ outOctets?: number | undefined;
21
+ inErrors?: number | undefined;
22
+ outErrors?: number | undefined;
23
+ inDiscards?: number | undefined;
24
+ outDiscards?: number | undefined;
25
+
26
+ // Computed server-side from the previous check. See note above.
27
+ inBitsPerSecond?: number | undefined;
28
+ outBitsPerSecond?: number | undefined;
29
+ utilizationPercent?: number | undefined;
30
+ errorsPerSecond?: number | undefined;
31
+ }
@@ -1,5 +1,7 @@
1
1
  import ProbeAttempt from "../../Probe/ProbeAttempt";
2
2
  import SnmpDataType from "./SnmpDataType";
3
+ import SnmpInterface from "./SnmpInterface";
4
+ import LldpNeighbor from "./LldpNeighbor";
3
5
 
4
6
  export interface SnmpOidResponse {
5
7
  oid: string;
@@ -16,4 +18,26 @@ export default interface SnmpMonitorResponse {
16
18
  isTimeout?: boolean | undefined;
17
19
  probeAttempts?: Array<ProbeAttempt> | undefined;
18
20
  totalAttempts?: number | undefined;
21
+ /*
22
+ * Populated when interface monitoring is enabled on the monitor step.
23
+ * Undefined on older probes and when the interface walk failed (the
24
+ * failure is recorded in interfaceWalkFailure).
25
+ */
26
+ interfaces?: Array<SnmpInterface> | undefined;
27
+ interfaceWalkFailure?: string | undefined;
28
+ /*
29
+ * System-group identity (sysDescr / sysName), collected alongside the
30
+ * interface walk. Used to enrich the NetworkDevice resource.
31
+ */
32
+ systemInfo?:
33
+ | {
34
+ sysDescr?: string | undefined;
35
+ sysName?: string | undefined;
36
+ }
37
+ | undefined;
38
+ /*
39
+ * LLDP neighbors discovered during the walk (when interface monitoring is
40
+ * enabled). Used to build the network topology graph.
41
+ */
42
+ lldpNeighbors?: Array<LldpNeighbor> | undefined;
19
43
  }
@@ -0,0 +1,20 @@
1
+ export interface SnmpTrapVarbind {
2
+ oid: string;
3
+ value: string;
4
+ }
5
+
6
+ /*
7
+ * An SNMP trap (or inform) received by a probe's trap receiver and forwarded
8
+ * to the server. For v1 traps the trapOid is derived from the standard
9
+ * generic-trap mapping (e.g. linkDown → 1.3.6.1.6.3.1.1.5.3) or
10
+ * enterprise.0.specific for enterprise traps; for v2c/v3 it is the value of
11
+ * the snmpTrapOID.0 varbind.
12
+ */
13
+ export default interface SnmpTrap {
14
+ sourceIpAddress: string;
15
+ trapOid: string;
16
+ snmpVersion: string;
17
+ community?: string | undefined;
18
+ receivedAt: Date;
19
+ varbinds: Array<SnmpTrapVarbind>;
20
+ }