@oneuptime/common 11.5.9 → 11.5.11

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 (379) hide show
  1. package/Models/AnalyticsModels/Index.ts +13 -0
  2. package/Models/AnalyticsModels/MetricItemAggMV1mByContainer.ts +178 -0
  3. package/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.ts +179 -0
  4. package/Models/AnalyticsModels/MetricItemAggMV1mByService.ts +179 -0
  5. package/Models/AnalyticsModels/NetworkFlow.ts +397 -0
  6. package/Models/DatabaseModels/EnterpriseLicenseInstance.ts +18 -0
  7. package/Models/DatabaseModels/GlobalConfig.ts +36 -0
  8. package/Models/DatabaseModels/Index.ts +2 -0
  9. package/Models/DatabaseModels/MarketingConversion.ts +198 -0
  10. package/Models/DatabaseModels/MetricSavedView.ts +34 -0
  11. package/Models/DatabaseModels/MetricType.ts +74 -0
  12. package/Models/DatabaseModels/NetworkDevice.ts +332 -0
  13. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +113 -0
  14. package/Models/DatabaseModels/NetworkInterface.ts +58 -0
  15. package/Models/DatabaseModels/Project.ts +37 -0
  16. package/Models/DatabaseModels/User.ts +37 -0
  17. package/Server/API/BaseAnalyticsAPI.ts +23 -0
  18. package/Server/API/EnterpriseLicenseAPI.ts +14 -0
  19. package/Server/EnvironmentConfig.ts +84 -0
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.ts +38 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.ts +28 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.ts +108 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.ts +31 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.ts +29 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.ts +35 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1784401962564-MigrationName.ts +101 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +14 -0
  28. package/Server/Services/AnalyticsDatabaseService.ts +70 -1
  29. package/Server/Services/IncidentService.ts +13 -0
  30. package/Server/Services/Index.ts +10 -0
  31. package/Server/Services/MarketingConversionService.ts +10 -0
  32. package/Server/Services/MetricItemAggMV1mByContainerService.ts +31 -0
  33. package/Server/Services/MetricItemAggMV1mByK8sClusterService.ts +31 -0
  34. package/Server/Services/MetricItemAggMV1mByServiceService.ts +31 -0
  35. package/Server/Services/MetricService.ts +970 -122
  36. package/Server/Services/MonitorService.ts +14 -0
  37. package/Server/Services/NetworkDeviceOwnerTeamService.ts +42 -0
  38. package/Server/Services/NetworkDeviceOwnerUserService.ts +106 -0
  39. package/Server/Services/NetworkFlowService.ts +11 -0
  40. package/Server/Services/OnCallDutyPolicyService.ts +11 -1
  41. package/Server/Services/ProjectService.ts +136 -0
  42. package/Server/Services/SpanService.ts +13 -9
  43. package/Server/Services/StatusPageService.ts +10 -0
  44. package/Server/Services/TeamMemberService.ts +11 -0
  45. package/Server/Services/UserService.ts +59 -0
  46. package/Server/Types/AnalyticsDatabase/AggregateBy.ts +37 -7
  47. package/Server/Utils/Attribution.ts +99 -0
  48. package/Server/Utils/Marketing/ConversionUploadProvider.ts +103 -0
  49. package/Server/Utils/Marketing/ConversionUploadProviders.ts +22 -0
  50. package/Server/Utils/Marketing/Providers/GoogleAds.ts +270 -0
  51. package/Server/Utils/Marketing/Providers/LinkedIn.ts +147 -0
  52. package/Server/Utils/Marketing/Providers/Meta.ts +148 -0
  53. package/Server/Utils/Marketing/Providers/MicrosoftAds.ts +196 -0
  54. package/Server/Utils/Marketing/Providers/Reddit.ts +178 -0
  55. package/Server/Utils/Monitor/MonitorAlert.ts +71 -7
  56. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +31 -19
  57. package/Server/Utils/Monitor/MonitorIncident.ts +71 -7
  58. package/Server/Utils/Monitor/MonitorMetricUtil.ts +57 -0
  59. package/Server/Utils/Monitor/MonitorTemplateUtil.ts +94 -0
  60. package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +15 -0
  61. package/Server/Utils/Monitor/NetworkInventoryUtil.ts +125 -14
  62. package/Server/Utils/ProductAnalytics.ts +133 -0
  63. package/Server/Utils/Telemetry/Telemetry.ts +39 -0
  64. package/Server/Utils/Telemetry/TelemetryEntity.ts +21 -0
  65. package/Tests/Server/API/BaseAnalyticsAPI.test.ts +72 -0
  66. package/Tests/Server/Infrastructure/SemaphorePermit.test.ts +9 -1
  67. package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +21 -2
  68. package/Tests/Server/Services/MetricEntityMVKeyParity.test.ts +173 -0
  69. package/Tests/Server/Services/MetricServiceAggregate.test.ts +1391 -0
  70. package/Tests/Server/Services/NetworkDeviceOwnerServices.test.ts +260 -0
  71. package/Tests/Server/Utils/Monitor/MonitorTemplateUtilNetworkDevice.test.ts +389 -0
  72. package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +764 -0
  73. package/Tests/Types/BaseDatabase/AggregationIntervalUtil.test.ts +111 -2
  74. package/Tests/Types/Database/EndsWith.test.ts +64 -0
  75. package/Tests/Types/Database/GreaterThan.test.ts +62 -0
  76. package/Tests/Types/Database/GreaterThanOrEqual.test.ts +65 -0
  77. package/Tests/Types/Database/GreaterThanOrNull.test.ts +63 -0
  78. package/Tests/Types/Database/Includes.test.ts +65 -0
  79. package/Tests/Types/Database/IncludesAll.test.ts +65 -0
  80. package/Tests/Types/Database/IncludesNone.test.ts +65 -0
  81. package/Tests/Types/Database/IsNull.test.ts +44 -0
  82. package/Tests/Types/Database/LessThan.test.ts +62 -0
  83. package/Tests/Types/Database/LessThanOrEqual.test.ts +62 -0
  84. package/Tests/Types/Database/LessThanOrNull.test.ts +62 -0
  85. package/Tests/Types/Database/MultiSearch.test.ts +81 -0
  86. package/Tests/Types/Database/NotContains.test.ts +64 -0
  87. package/Tests/Types/Database/NotNull.test.ts +44 -0
  88. package/Tests/Types/Database/StartsWith.test.ts +64 -0
  89. package/Tests/Types/Monitor/MonitorStepSqlMonitor.test.ts +83 -1
  90. package/Tests/Types/Monitor/SnmpV3EnumParsing.test.ts +247 -0
  91. package/Tests/Types/Monitor/SnmpVendorTemplate.test.ts +263 -0
  92. package/Tests/UI/Components/XAxis.test.ts +5 -3
  93. package/Tests/Utils/EnterpriseLicenseUsage.test.ts +76 -0
  94. package/Tests/Utils/Metrics/MetricExplorerUrl.test.ts +622 -0
  95. package/Tests/Utils/Metrics/MetricFormulaEvaluator.test.ts +474 -0
  96. package/Tests/Utils/Telemetry/HeartbeatAvailability.test.ts +52 -4
  97. package/Types/AnalyticsDatabase/AnalyticsTableName.ts +11 -0
  98. package/Types/BaseDatabase/AggregateBy.ts +31 -2
  99. package/Types/BaseDatabase/AggregatedResult.ts +22 -0
  100. package/Types/BaseDatabase/AggregationInterval.ts +11 -0
  101. package/Types/BaseDatabase/AggregationIntervalUtil.ts +30 -5
  102. package/Types/Dashboard/DashboardComponents/DashboardTraceChartComponent.ts +16 -0
  103. package/Types/Email/EmailTemplateType.ts +3 -0
  104. package/Types/Marketing/MarketingConversion.ts +11 -0
  105. package/Types/Metrics/MetricQueryConfigData.ts +21 -0
  106. package/Types/Metrics/MetricQueryData.ts +8 -0
  107. package/Types/Metrics/MetricViewData.ts +8 -0
  108. package/Types/Monitor/MonitorMetricType.ts +8 -0
  109. package/Types/Monitor/MonitorStep.ts +9 -0
  110. package/Types/Monitor/MonitorStepSqlMonitor.ts +12 -0
  111. package/Types/Monitor/MonitorType.ts +2 -1
  112. package/Types/Monitor/SSLMonitor/SslMonitorResponse.ts +17 -12
  113. package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +13 -0
  114. package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +37 -3
  115. package/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.ts +46 -0
  116. package/Types/Monitor/SnmpMonitor/SnmpEntityInfo.ts +15 -0
  117. package/Types/Monitor/SnmpMonitor/SnmpInterface.ts +8 -0
  118. package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.ts +17 -8
  119. package/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.ts +53 -0
  120. package/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.ts +43 -0
  121. package/Types/Monitor/SnmpMonitor/SnmpSystemInfo.ts +16 -0
  122. package/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.ts +119 -3
  123. package/Types/NetFlow/NetworkFlowRecord.ts +25 -0
  124. package/Types/Syslog/SyslogMessage.ts +18 -0
  125. package/Types/Telemetry/TelemetrySavedViewState.ts +9 -0
  126. package/Types/Telemetry/TelemetrySavedViewType.ts +12 -0
  127. package/UI/Components/Charts/Area/AreaChart.tsx +51 -0
  128. package/UI/Components/Charts/Bar/BarChart.tsx +51 -1
  129. package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +97 -26
  130. package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +328 -1
  131. package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +115 -0
  132. package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +328 -1
  133. package/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.ts +7 -0
  134. package/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.ts +15 -0
  135. package/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.ts +13 -0
  136. package/UI/Components/Charts/Line/LineChart.tsx +51 -0
  137. package/UI/Components/Charts/Types/ReferenceRegionProps.ts +12 -0
  138. package/UI/Components/Charts/Types/TimeReferenceLineProps.ts +12 -0
  139. package/UI/Components/Charts/Types/XAxis/XAxisPrecision.ts +1 -0
  140. package/UI/Components/Charts/Utils/DataPoint.ts +0 -0
  141. package/UI/Components/Charts/Utils/TimeAnnotation.ts +169 -0
  142. package/UI/Components/Charts/Utils/XAxis.ts +28 -4
  143. package/UI/Components/Icon/Icon.tsx +33 -13
  144. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +9 -0
  145. package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +67 -0
  146. package/UI/Components/Page/ModelPage.tsx +6 -1
  147. package/UI/Components/TelemetryViewer/components/SavedViewsDropdown.tsx +33 -4
  148. package/UI/Styles/Theme.css +10 -0
  149. package/UI/Utils/User.ts +41 -2
  150. package/Utils/Analytics.ts +8 -6
  151. package/Utils/EnterpriseLicense/EnterpriseLicenseUsage.ts +74 -0
  152. package/Utils/Metrics/MetricExplorerUrl.ts +771 -0
  153. package/Utils/Metrics/MetricFormulaEvaluator.ts +410 -46
  154. package/Utils/Monitor/NetworkTopologyUtil.ts +261 -49
  155. package/Utils/ValueFormatter.ts +22 -1
  156. package/build/dist/Models/AnalyticsModels/Index.js +13 -0
  157. package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
  158. package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByContainer.js +159 -0
  159. package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByContainer.js.map +1 -0
  160. package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.js +158 -0
  161. package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.js.map +1 -0
  162. package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByService.js +160 -0
  163. package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByService.js.map +1 -0
  164. package/build/dist/Models/AnalyticsModels/NetworkFlow.js +351 -0
  165. package/build/dist/Models/AnalyticsModels/NetworkFlow.js.map +1 -0
  166. package/build/dist/Models/DatabaseModels/EnterpriseLicenseInstance.js +19 -0
  167. package/build/dist/Models/DatabaseModels/EnterpriseLicenseInstance.js.map +1 -1
  168. package/build/dist/Models/DatabaseModels/GlobalConfig.js +38 -0
  169. package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
  170. package/build/dist/Models/DatabaseModels/Index.js +2 -0
  171. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  172. package/build/dist/Models/DatabaseModels/MarketingConversion.js +219 -0
  173. package/build/dist/Models/DatabaseModels/MarketingConversion.js.map +1 -0
  174. package/build/dist/Models/DatabaseModels/MetricSavedView.js +35 -0
  175. package/build/dist/Models/DatabaseModels/MetricSavedView.js.map +1 -1
  176. package/build/dist/Models/DatabaseModels/MetricType.js +76 -0
  177. package/build/dist/Models/DatabaseModels/MetricType.js.map +1 -1
  178. package/build/dist/Models/DatabaseModels/NetworkDevice.js +341 -0
  179. package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
  180. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +116 -0
  181. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
  182. package/build/dist/Models/DatabaseModels/NetworkInterface.js +60 -0
  183. package/build/dist/Models/DatabaseModels/NetworkInterface.js.map +1 -1
  184. package/build/dist/Models/DatabaseModels/Project.js +38 -0
  185. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  186. package/build/dist/Models/DatabaseModels/User.js +38 -0
  187. package/build/dist/Models/DatabaseModels/User.js.map +1 -1
  188. package/build/dist/Server/API/BaseAnalyticsAPI.js +19 -0
  189. package/build/dist/Server/API/BaseAnalyticsAPI.js.map +1 -1
  190. package/build/dist/Server/API/EnterpriseLicenseAPI.js +8 -0
  191. package/build/dist/Server/API/EnterpriseLicenseAPI.js.map +1 -1
  192. package/build/dist/Server/EnvironmentConfig.js +51 -0
  193. package/build/dist/Server/EnvironmentConfig.js.map +1 -1
  194. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.js +27 -0
  195. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.js.map +1 -0
  196. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.js +21 -0
  197. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.js.map +1 -0
  198. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.js +47 -0
  199. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.js.map +1 -0
  200. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.js +16 -0
  201. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.js.map +1 -0
  202. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.js +18 -0
  203. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.js.map +1 -0
  204. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.js +20 -0
  205. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.js.map +1 -0
  206. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784401962564-MigrationName.js +40 -0
  207. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784401962564-MigrationName.js.map +1 -0
  208. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +14 -0
  209. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  210. package/build/dist/Server/Services/AnalyticsDatabaseService.js +58 -4
  211. package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
  212. package/build/dist/Server/Services/IncidentService.js +12 -0
  213. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  214. package/build/dist/Server/Services/Index.js +10 -0
  215. package/build/dist/Server/Services/Index.js.map +1 -1
  216. package/build/dist/Server/Services/MarketingConversionService.js +9 -0
  217. package/build/dist/Server/Services/MarketingConversionService.js.map +1 -0
  218. package/build/dist/Server/Services/MetricItemAggMV1mByContainerService.js +29 -0
  219. package/build/dist/Server/Services/MetricItemAggMV1mByContainerService.js.map +1 -0
  220. package/build/dist/Server/Services/MetricItemAggMV1mByK8sClusterService.js +29 -0
  221. package/build/dist/Server/Services/MetricItemAggMV1mByK8sClusterService.js.map +1 -0
  222. package/build/dist/Server/Services/MetricItemAggMV1mByServiceService.js +29 -0
  223. package/build/dist/Server/Services/MetricItemAggMV1mByServiceService.js.map +1 -0
  224. package/build/dist/Server/Services/MetricService.js +761 -125
  225. package/build/dist/Server/Services/MetricService.js.map +1 -1
  226. package/build/dist/Server/Services/MonitorService.js +18 -5
  227. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  228. package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js +44 -0
  229. package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js.map +1 -1
  230. package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js +88 -0
  231. package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js.map +1 -1
  232. package/build/dist/Server/Services/NetworkFlowService.js +9 -0
  233. package/build/dist/Server/Services/NetworkFlowService.js.map +1 -0
  234. package/build/dist/Server/Services/OnCallDutyPolicyService.js +15 -6
  235. package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
  236. package/build/dist/Server/Services/ProjectService.js +107 -6
  237. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  238. package/build/dist/Server/Services/SpanService.js +8 -6
  239. package/build/dist/Server/Services/SpanService.js.map +1 -1
  240. package/build/dist/Server/Services/StatusPageService.js +10 -0
  241. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  242. package/build/dist/Server/Services/TeamMemberService.js +11 -0
  243. package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
  244. package/build/dist/Server/Services/UserService.js +52 -0
  245. package/build/dist/Server/Services/UserService.js.map +1 -1
  246. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +33 -7
  247. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
  248. package/build/dist/Server/Utils/Attribution.js +74 -0
  249. package/build/dist/Server/Utils/Attribution.js.map +1 -0
  250. package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js +40 -0
  251. package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js.map +1 -0
  252. package/build/dist/Server/Utils/Marketing/ConversionUploadProviders.js +20 -0
  253. package/build/dist/Server/Utils/Marketing/ConversionUploadProviders.js.map +1 -0
  254. package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js +177 -0
  255. package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js.map +1 -0
  256. package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js +113 -0
  257. package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js.map +1 -0
  258. package/build/dist/Server/Utils/Marketing/Providers/Meta.js +109 -0
  259. package/build/dist/Server/Utils/Marketing/Providers/Meta.js.map +1 -0
  260. package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js +130 -0
  261. package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js.map +1 -0
  262. package/build/dist/Server/Utils/Marketing/Providers/Reddit.js +126 -0
  263. package/build/dist/Server/Utils/Marketing/Providers/Reddit.js.map +1 -0
  264. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +53 -9
  265. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  266. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +21 -10
  267. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  268. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +54 -11
  269. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  270. package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +43 -3
  271. package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
  272. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +68 -0
  273. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
  274. package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +15 -0
  275. package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -1
  276. package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +100 -15
  277. package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
  278. package/build/dist/Server/Utils/ProductAnalytics.js +111 -0
  279. package/build/dist/Server/Utils/ProductAnalytics.js.map +1 -0
  280. package/build/dist/Server/Utils/Telemetry/Telemetry.js +32 -5
  281. package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
  282. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +17 -0
  283. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
  284. package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +11 -0
  285. package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
  286. package/build/dist/Types/BaseDatabase/AggregationInterval.js +11 -0
  287. package/build/dist/Types/BaseDatabase/AggregationInterval.js.map +1 -1
  288. package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +33 -5
  289. package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -1
  290. package/build/dist/Types/Email/EmailTemplateType.js +2 -0
  291. package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
  292. package/build/dist/Types/Marketing/MarketingConversion.js +13 -0
  293. package/build/dist/Types/Marketing/MarketingConversion.js.map +1 -0
  294. package/build/dist/Types/Monitor/MonitorMetricType.js +7 -0
  295. package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
  296. package/build/dist/Types/Monitor/MonitorStep.js +6 -0
  297. package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
  298. package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js +3 -0
  299. package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js.map +1 -1
  300. package/build/dist/Types/Monitor/MonitorType.js +2 -1
  301. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  302. package/build/dist/Types/Monitor/SnmpMonitor/CdpNeighbor.js +2 -0
  303. package/build/dist/Types/Monitor/SnmpMonitor/CdpNeighbor.js.map +1 -0
  304. package/build/dist/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.js +41 -0
  305. package/build/dist/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.js.map +1 -1
  306. package/build/dist/Types/Monitor/SnmpMonitor/SnmpEntityInfo.js +2 -0
  307. package/build/dist/Types/Monitor/SnmpMonitor/SnmpEntityInfo.js.map +1 -0
  308. package/build/dist/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.js +48 -0
  309. package/build/dist/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.js.map +1 -1
  310. package/build/dist/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.js +38 -0
  311. package/build/dist/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.js.map +1 -1
  312. package/build/dist/Types/Monitor/SnmpMonitor/SnmpSystemInfo.js +2 -0
  313. package/build/dist/Types/Monitor/SnmpMonitor/SnmpSystemInfo.js.map +1 -0
  314. package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js +96 -3
  315. package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js.map +1 -1
  316. package/build/dist/Types/NetFlow/NetworkFlowRecord.js +2 -0
  317. package/build/dist/Types/NetFlow/NetworkFlowRecord.js.map +1 -0
  318. package/build/dist/Types/Syslog/SyslogMessage.js +2 -0
  319. package/build/dist/Types/Syslog/SyslogMessage.js.map +1 -0
  320. package/build/dist/Types/Telemetry/TelemetrySavedViewState.js +0 -7
  321. package/build/dist/Types/Telemetry/TelemetrySavedViewState.js.map +1 -1
  322. package/build/dist/Types/Telemetry/TelemetrySavedViewType.js +13 -0
  323. package/build/dist/Types/Telemetry/TelemetrySavedViewType.js.map +1 -0
  324. package/build/dist/UI/Components/Charts/Area/AreaChart.js +25 -1
  325. package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
  326. package/build/dist/UI/Components/Charts/Bar/BarChart.js +26 -2
  327. package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
  328. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +36 -12
  329. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
  330. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +208 -6
  331. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
  332. package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +52 -3
  333. package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
  334. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +208 -6
  335. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
  336. package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js +6 -1
  337. package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js.map +1 -1
  338. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.js +2 -0
  339. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.js.map +1 -0
  340. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.js +2 -0
  341. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.js.map +1 -0
  342. package/build/dist/UI/Components/Charts/Line/LineChart.js +25 -1
  343. package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
  344. package/build/dist/UI/Components/Charts/Types/ReferenceRegionProps.js +2 -0
  345. package/build/dist/UI/Components/Charts/Types/ReferenceRegionProps.js.map +1 -0
  346. package/build/dist/UI/Components/Charts/Types/TimeReferenceLineProps.js +2 -0
  347. package/build/dist/UI/Components/Charts/Types/TimeReferenceLineProps.js.map +1 -0
  348. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js +1 -0
  349. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js.map +1 -1
  350. package/build/dist/UI/Components/Charts/Utils/DataPoint.js +0 -0
  351. package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
  352. package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js +121 -0
  353. package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js.map +1 -0
  354. package/build/dist/UI/Components/Charts/Utils/XAxis.js +27 -4
  355. package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -1
  356. package/build/dist/UI/Components/Icon/Icon.js +15 -8
  357. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  358. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
  359. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +58 -0
  360. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
  361. package/build/dist/UI/Components/Page/ModelPage.js +7 -1
  362. package/build/dist/UI/Components/Page/ModelPage.js.map +1 -1
  363. package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js +10 -4
  364. package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js.map +1 -1
  365. package/build/dist/UI/Utils/User.js +35 -2
  366. package/build/dist/UI/Utils/User.js.map +1 -1
  367. package/build/dist/Utils/Analytics.js +8 -5
  368. package/build/dist/Utils/Analytics.js.map +1 -1
  369. package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js +57 -0
  370. package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js.map +1 -1
  371. package/build/dist/Utils/Metrics/MetricExplorerUrl.js +418 -0
  372. package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -0
  373. package/build/dist/Utils/Metrics/MetricFormulaEvaluator.js +296 -37
  374. package/build/dist/Utils/Metrics/MetricFormulaEvaluator.js.map +1 -1
  375. package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +176 -40
  376. package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
  377. package/build/dist/Utils/ValueFormatter.js +20 -1
  378. package/build/dist/Utils/ValueFormatter.js.map +1 -1
  379. package/package.json +4 -3
@@ -36,9 +36,23 @@ export class AggregationIntervalUtil {
36
36
 
37
37
  const diff: number = endDate.getTime() - startDate.getTime();
38
38
 
39
+ /*
40
+ * ~180-point budget per chart: each tier keeps the rendered point
41
+ * count in the tens-to-hundreds instead of collapsing a 4h window
42
+ * to ~4 hourly points or exploding a 12h window into 720 minutes.
43
+ */
39
44
  if (diff <= 1000 * 60 * 60 * 3) {
40
45
  // if less than 3 hours, then get minute precision
41
46
  return AggregationInterval.Minute;
47
+ } else if (diff <= 1000 * 60 * 60 * 12) {
48
+ // 12 hours
49
+ return AggregationInterval.FiveMinutes;
50
+ } else if (diff <= 1000 * 60 * 60 * 24) {
51
+ // 24 hours
52
+ return AggregationInterval.FifteenMinutes;
53
+ } else if (diff <= 1000 * 60 * 60 * 24 * 3) {
54
+ // 3 days
55
+ return AggregationInterval.ThirtyMinutes;
42
56
  } else if (diff <= 1000 * 60 * 60 * 24 * 7) {
43
57
  // 7 days
44
58
  return AggregationInterval.Hour;
@@ -69,6 +83,12 @@ export class AggregationIntervalUtil {
69
83
  switch (interval) {
70
84
  case AggregationInterval.Minute:
71
85
  return 1000 * 60;
86
+ case AggregationInterval.FiveMinutes:
87
+ return 1000 * 60 * 5;
88
+ case AggregationInterval.FifteenMinutes:
89
+ return 1000 * 60 * 15;
90
+ case AggregationInterval.ThirtyMinutes:
91
+ return 1000 * 60 * 30;
72
92
  case AggregationInterval.Hour:
73
93
  return 1000 * 60 * 60;
74
94
  case AggregationInterval.Day:
@@ -102,11 +122,13 @@ export class AggregationIntervalUtil {
102
122
  * (the first bucket is partial and its timestamp falls before the axis
103
123
  * origin).
104
124
  *
105
- * Only Minute/Hour/Day are aligned: for those the fixed-ms epoch grid is
106
- * an EXACT match for ClickHouse's UTC bucketing (epoch-day == UTC
107
- * midnight), and these are the windows where the leading gap is actually
108
- * visible. Week/Month/Year snap to calendar boundaries (Monday / 1st /
109
- * Jan-1) server-side, which a fixed-ms grid can't reproduce, so those (and
125
+ * Only the sub-day intervals (Minute through Hour, plus Day) are aligned:
126
+ * for those the fixed-ms epoch grid is an EXACT match for ClickHouse's
127
+ * UTC bucketing (5/15/30-minute `toStartOfInterval` grids are counted in
128
+ * whole intervals since the epoch, and epoch-day == UTC midnight), and
129
+ * these are the windows where the leading gap is actually visible.
130
+ * Week/Month/Year snap to calendar boundaries (Monday / 1st / Jan-1)
131
+ * server-side, which a fixed-ms grid can't reproduce, so those (and
110
132
  * `Total`) are returned UNCHANGED rather than risk shifting the gap for
111
133
  * long windows — their pre-existing behavior is preserved.
112
134
  */
@@ -117,6 +139,9 @@ export class AggregationIntervalUtil {
117
139
  const ms: number = OneUptimeDate.fromString(date).getTime();
118
140
  const alignableIntervals: Array<AggregationInterval> = [
119
141
  AggregationInterval.Minute,
142
+ AggregationInterval.FiveMinutes,
143
+ AggregationInterval.FifteenMinutes,
144
+ AggregationInterval.ThirtyMinutes,
120
145
  AggregationInterval.Hour,
121
146
  AggregationInterval.Day,
122
147
  ];
@@ -33,6 +33,22 @@ export default interface DashboardTraceChartComponent extends BaseComponent {
33
33
  groupByAttribute?: string | undefined;
34
34
  // Cap on the number of series when split (default 10).
35
35
  topLimit?: number | undefined;
36
+ /*
37
+ * Optional user-chosen lead color for the chart, stored as a hex string
38
+ * (e.g. "#6366f1"). Single-series → the series color; split charts → the
39
+ * first unpinned series, with the rest following the default palette.
40
+ * Same semantics as MetricQueryConfigData.color on the metric Chart
41
+ * widget. Unset = Auto (default palette).
42
+ */
43
+ color?: string | undefined;
44
+ /*
45
+ * Per-series color pins for split charts, keyed by "key=value" segment
46
+ * (e.g. { "url.host=api.example.com": "#10b981" }) — the same storage
47
+ * shape as MetricQueryConfigData.colorsByGroup, so the shared
48
+ * SeriesGroupColorSelector editor works unchanged. Unpinned series fall
49
+ * back to `color` (lead) then the default palette.
50
+ */
51
+ colorsByGroup?: Record<string, string> | undefined;
36
52
  /*
37
53
  * Include non-root spans. Off by default so "Request Count" matches the
38
54
  * traces explorer, which is root-spans-only.
@@ -86,6 +86,9 @@ enum EmailTemplateType {
86
86
  Invoice = "Invoice.hbs",
87
87
 
88
88
  ClickhouseCapacityWarning = "ClickhouseCapacityWarning.hbs",
89
+
90
+ EnterpriseLicenseUserLimitBreach = "EnterpriseLicenseUserLimitBreach.hbs",
91
+ EnterpriseLicenseExpiryReminder = "EnterpriseLicenseExpiryReminder.hbs",
89
92
  }
90
93
 
91
94
  export default EmailTemplateType;
@@ -0,0 +1,11 @@
1
+ export enum MarketingConversionType {
2
+ SignUp = "SignUp",
3
+ PaidSubscription = "PaidSubscription",
4
+ }
5
+
6
+ export enum MarketingConversionUploadStatus {
7
+ Uploaded = "Uploaded",
8
+ Failed = "Failed",
9
+ // No click id relevant to this ad platform — nothing to upload.
10
+ Skipped = "Skipped",
11
+ }
@@ -13,6 +13,16 @@ export interface ChartSeries {
13
13
  }
14
14
 
15
15
  export default interface MetricQueryConfigData {
16
+ /*
17
+ * Stable identity for this query, independent of its position in the
18
+ * queryConfigs array. Chart layers key per-chart UI state (hidden
19
+ * series, search, Top-N, sort) on this id so removing/reordering
20
+ * queries doesn't transfer one chart's state to another. Assigned at
21
+ * query-creation sites (ObjectID-based); older persisted configs won't
22
+ * have it, so consumers must tolerate its absence. Intentionally NOT
23
+ * part of the explorer URL serialization.
24
+ */
25
+ id?: string | undefined;
16
26
  metricAliasData?: MetricAliasData | undefined;
17
27
  metricQueryData: MetricQueryData;
18
28
  getSeries?: ((data: AggregatedModel) => ChartSeries) | undefined;
@@ -59,4 +69,15 @@ export default interface MetricQueryConfigData {
59
69
  * on agent restart) are clamped to 0.
60
70
  */
61
71
  transformAsRate?: boolean | undefined;
72
+ /*
73
+ * When true, this query is drawn on the PREVIOUS query's chart panel,
74
+ * sharing its axes, instead of getting a panel of its own. Consecutive
75
+ * flagged queries chain onto the same panel. Has no effect on the
76
+ * first query, or when the previous query produced no result (the
77
+ * query then falls back to its own panel). Both queries are evaluated
78
+ * over the SAME time window — this is a same-window visual overlay,
79
+ * not a period-over-period time shift. Plain persisted data like the
80
+ * fields above (dashboards, saved views, explorer URLs).
81
+ */
82
+ overlayWithPreviousQuery?: boolean | undefined;
62
83
  }
@@ -17,4 +17,12 @@ export default interface MetricQueryData {
17
17
  * whatever) incident creation from a single metric monitor.
18
18
  */
19
19
  groupByAttributeKeys?: Array<string> | undefined;
20
+ /**
21
+ * How many series (groups) to plot for a grouped query. Passed to the
22
+ * server as `AggregateBy.topK.count` so only the top-N groups (ranked
23
+ * by max over the window) are fetched, and used as the client-side
24
+ * display cap. Unset = the default cap (10). Plain persisted data —
25
+ * saved views and dashboards carry it like any other query field.
26
+ */
27
+ topN?: number | undefined;
20
28
  }
@@ -3,4 +3,12 @@ import MetricsViewConfig from "./MetricsViewConfig";
3
3
 
4
4
  export default interface MetricViewData extends MetricsViewConfig {
5
5
  startAndEndDate: InBetween<Date> | null;
6
+ /*
7
+ * Optional relative-time token (a Range enum value from
8
+ * Common/Types/Time/TimeRange, e.g. "Past 1 Hour"). When set, the
9
+ * resolved startAndEndDate re-anchors to "now" on fetch/refresh instead
10
+ * of staying pinned to the instant it was first resolved. Custom /
11
+ * pinned absolute windows carry no token.
12
+ */
13
+ rangeToken?: string | undefined;
6
14
  }
@@ -34,6 +34,14 @@ enum MonitorMetricType {
34
34
  SnmpInterfaceUtilizationPercent = "oneuptime.monitor.snmp.interface.utilization.percent",
35
35
  SnmpInterfaceErrorsPerSecond = "oneuptime.monitor.snmp.interface.errors.per.second",
36
36
 
37
+ /*
38
+ * One series per polled OID that returned a numeric value (oid / oidName
39
+ * attributes) — CPU, memory, temperature from vendor templates and any
40
+ * custom OID a user adds. This is what makes polled OIDs chartable and
41
+ * evaluable over time.
42
+ */
43
+ SnmpOidValue = "oneuptime.monitor.snmp.oid.value",
44
+
37
45
  /*
38
46
  * Extended server/VM metrics. Emitted when the agent payload contains them;
39
47
  * absent for older agents, which keeps the pipeline backwards-compatible.
@@ -47,6 +47,7 @@ import MonitorStepDnssecMonitor, {
47
47
  import MonitorStepSqlMonitor, {
48
48
  MonitorStepSqlMonitorUtil,
49
49
  } from "./MonitorStepSqlMonitor";
50
+ import SqlDatabaseType from "./SqlDatabaseType";
50
51
  import MonitorStepExternalStatusPageMonitor, {
51
52
  MonitorStepExternalStatusPageMonitorUtil,
52
53
  } from "./MonitorStepExternalStatusPageMonitor";
@@ -780,6 +781,14 @@ export default class MonitorStep extends DatabaseProperty {
780
781
  if (!value.data.sqlMonitor.query || !value.data.sqlMonitor.query.trim()) {
781
782
  return "SQL query is required";
782
783
  }
784
+
785
+ if (
786
+ value.data.sqlMonitor.useWindowsIntegratedAuthentication &&
787
+ value.data.sqlMonitor.databaseType !==
788
+ SqlDatabaseType.MicrosoftSqlServer
789
+ ) {
790
+ return "Windows Integrated Authentication is only supported for Microsoft SQL Server";
791
+ }
783
792
  }
784
793
 
785
794
  if (monitorType === MonitorType.ExternalStatusPage) {
@@ -64,6 +64,12 @@ export default interface MonitorStepSqlMonitor {
64
64
  username: string;
65
65
  // Raw password OR a {{monitorSecrets.name}} reference resolved server-side.
66
66
  password: string;
67
+ /*
68
+ * Microsoft SQL Server only: authenticate with the identity under which the
69
+ * probe is running (SSPI on Windows, Kerberos on Linux/macOS). Username and
70
+ * password are ignored when this is enabled.
71
+ */
72
+ useWindowsIntegratedAuthentication: boolean;
67
73
  useSsl: boolean;
68
74
  /*
69
75
  * When SSL is on, whether the server certificate chain must validate. Users
@@ -87,6 +93,7 @@ export class MonitorStepSqlMonitorUtil {
87
93
  databaseName: "",
88
94
  username: "",
89
95
  password: "",
96
+ useWindowsIntegratedAuthentication: false,
90
97
  useSsl: false,
91
98
  rejectUnauthorizedSsl: true,
92
99
  query: "",
@@ -105,6 +112,9 @@ export class MonitorStepSqlMonitorUtil {
105
112
  databaseName: (json["databaseName"] as string) || "",
106
113
  username: (json["username"] as string) || "",
107
114
  password: (json["password"] as string) || "",
115
+ useWindowsIntegratedAuthentication: Boolean(
116
+ json["useWindowsIntegratedAuthentication"],
117
+ ),
108
118
  useSsl: Boolean(json["useSsl"]),
109
119
  rejectUnauthorizedSsl:
110
120
  json["rejectUnauthorizedSsl"] === undefined ||
@@ -130,6 +140,8 @@ export class MonitorStepSqlMonitorUtil {
130
140
  databaseName: monitor.databaseName,
131
141
  username: monitor.username,
132
142
  password: monitor.password,
143
+ useWindowsIntegratedAuthentication:
144
+ monitor.useWindowsIntegratedAuthentication,
133
145
  useSsl: monitor.useSsl,
134
146
  rejectUnauthorizedSsl: monitor.rejectUnauthorizedSsl,
135
147
  query: monitor.query,
@@ -480,7 +480,8 @@ export class MonitorTypeHelper {
480
480
  return (
481
481
  monitorType === MonitorType.IncomingRequest ||
482
482
  monitorType === MonitorType.IncomingEmail ||
483
- monitorType === MonitorType.Server
483
+ monitorType === MonitorType.Server ||
484
+ monitorType === MonitorType.NetworkDevice
484
485
  );
485
486
  }
486
487
 
@@ -1,14 +1,19 @@
1
+ /*
2
+ * Every field is optional AND explicitly undefined-able: a certificate need
3
+ * not carry any given subject field, and under exactOptionalPropertyTypes the
4
+ * probe cannot assign a "may be absent" value into a bare optional property.
5
+ */
1
6
  export default interface SslMonitorResponse {
2
- isSelfSigned?: boolean;
3
- createdAt?: Date;
4
- expiresAt?: Date;
5
- commonName?: string;
6
- organizationalUnit?: string;
7
- organization?: string;
8
- locality?: string;
9
- state?: string;
10
- country?: string;
11
- serialNumber?: string;
12
- fingerprint?: string;
13
- fingerprint256?: string;
7
+ isSelfSigned?: boolean | undefined;
8
+ createdAt?: Date | undefined;
9
+ expiresAt?: Date | undefined;
10
+ commonName?: string | undefined;
11
+ organizationalUnit?: string | undefined;
12
+ organization?: string | undefined;
13
+ locality?: string | undefined;
14
+ state?: string | undefined;
15
+ country?: string | undefined;
16
+ serialNumber?: string | undefined;
17
+ fingerprint?: string | undefined;
18
+ fingerprint256?: string | undefined;
14
19
  }
@@ -0,0 +1,13 @@
1
+ /*
2
+ * One neighbor entry from a Cisco device's CDP cache (CISCO-CDP-MIB
3
+ * cdpCacheTable). Collected as a fallback/complement to LLDP — plenty of
4
+ * Cisco estates run CDP only, and without it their topology is empty. The
5
+ * server matches remoteDeviceId against known NetworkDevices the same way it
6
+ * matches LLDP remoteSysName.
7
+ */
8
+ export default interface CdpNeighbor {
9
+ localInterfaceIndex?: number | undefined;
10
+ remoteDeviceId?: string | undefined;
11
+ remotePortId?: string | undefined;
12
+ remotePlatform?: string | undefined;
13
+ }
@@ -1,11 +1,17 @@
1
1
  /*
2
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.
3
+ * from the LLDP and CDP neighbor data each device reports. Nodes are devices;
4
+ * unmanaged neighbors (discovery-protocol peers with no matching
5
+ * NetworkDevice) appear as lightweight nodes so the graph doesn't dead-end.
6
+ * Edges are physical links — one per device pair even when both ends (or
7
+ * both protocols) report it — annotated with the operational state of the
8
+ * interface at each end when the neighbor entry identifies it.
6
9
  */
7
10
  export type NetworkTopologyNodeStatus = "up" | "down" | "unknown";
8
11
 
12
+ // Which discovery protocol(s) reported a link.
13
+ export type NetworkTopologyLinkProtocol = "lldp" | "cdp";
14
+
9
15
  export interface NetworkTopologyNode {
10
16
  // Device id for managed nodes; a synthetic "unmanaged:<key>" id otherwise.
11
17
  id: string;
@@ -14,6 +20,27 @@ export interface NetworkTopologyNode {
14
20
  status: NetworkTopologyNodeStatus;
15
21
  interfacesUp?: number | undefined;
16
22
  interfacesDown?: number | undefined;
23
+ // Extra device identity for search and the detail panel (managed nodes).
24
+ sysName?: string | undefined;
25
+ vendor?: string | undefined;
26
+ // For unmanaged CDP peers this carries the reported platform string.
27
+ deviceModel?: string | undefined;
28
+ }
29
+
30
+ /*
31
+ * Operational state of one end of a link, resolved from the NetworkInterface
32
+ * row for that (device, interfaceIndex) pair when the neighbor entry carries
33
+ * enough to identify it. All fields optional — enrichment is best-effort.
34
+ */
35
+ export interface NetworkTopologyEdgeEndpoint {
36
+ interfaceIndex?: number | undefined;
37
+ interfaceName?: string | undefined;
38
+ isOperationallyUp?: boolean | undefined;
39
+ isAdministrativelyUp?: boolean | undefined;
40
+ utilizationPercent?: number | undefined;
41
+ inRateMbps?: number | undefined;
42
+ outRateMbps?: number | undefined;
43
+ errorsPerSecond?: number | undefined;
17
44
  }
18
45
 
19
46
  export interface NetworkTopologyEdge {
@@ -21,9 +48,16 @@ export interface NetworkTopologyEdge {
21
48
  toNodeId: string;
22
49
  fromPort?: string | undefined;
23
50
  toPort?: string | undefined;
51
+ // Discovery protocols that reported this link (deduped union).
52
+ protocols?: Array<NetworkTopologyLinkProtocol> | undefined;
53
+ // Operational data at each end, when the endpoint interface is known.
54
+ fromInterface?: NetworkTopologyEdgeEndpoint | undefined;
55
+ toInterface?: NetworkTopologyEdgeEndpoint | undefined;
24
56
  }
25
57
 
26
58
  export default interface NetworkTopology {
27
59
  nodes: Array<NetworkTopologyNode>;
28
60
  edges: Array<NetworkTopologyEdge>;
61
+ // True when the device query hit its per-project cap — graph may be partial.
62
+ isTruncated?: boolean | undefined;
29
63
  }
@@ -5,4 +5,50 @@ enum SnmpAuthProtocol {
5
5
  SHA512 = "SHA512",
6
6
  }
7
7
 
8
+ /*
9
+ * Same free-text column problem as SnmpPrivProtocol: snmpV3AuthProtocol has no
10
+ * check constraint, and reading it by casting the raw string to this enum
11
+ * silently drops to the probe's default of MD5 — the weakest digest — when the
12
+ * spelling does not match exactly. "SHA-256" is what the form labels that
13
+ * option, so it is a realistic thing to find in a hand-written row.
14
+ *
15
+ * This protocol also selects the hash used to localize the *privacy* key
16
+ * (RFC 3414 section 2.6), so getting it wrong corrupts the DES/AES key as well
17
+ * as the authentication digest. Both ends then disagree and the device simply
18
+ * stops answering.
19
+ *
20
+ * See SnmpPrivProtocol for why parse() returns undefined instead of a default.
21
+ * SHA here is SHA-1, the original RFC 3414 algorithm.
22
+ */
23
+ export class SnmpAuthProtocolUtil {
24
+ public static parse(
25
+ value: string | undefined | null,
26
+ ): SnmpAuthProtocol | undefined {
27
+ switch ((value || "").trim().toLowerCase()) {
28
+ case "md5":
29
+ return SnmpAuthProtocol.MD5;
30
+ case "sha":
31
+ case "sha1":
32
+ case "sha-1":
33
+ return SnmpAuthProtocol.SHA;
34
+ case "sha256":
35
+ case "sha-256":
36
+ return SnmpAuthProtocol.SHA256;
37
+ case "sha512":
38
+ case "sha-512":
39
+ return SnmpAuthProtocol.SHA512;
40
+ default:
41
+ return undefined;
42
+ }
43
+ }
44
+
45
+ public static isUnrecognized(value: string | undefined | null): boolean {
46
+ if (!(value || "").trim()) {
47
+ return false;
48
+ }
49
+
50
+ return SnmpAuthProtocolUtil.parse(value) === undefined;
51
+ }
52
+ }
53
+
8
54
  export default SnmpAuthProtocol;
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Hardware identity from ENTITY-MIB entPhysicalTable (1.3.6.1.2.1.47.1.1.1).
3
+ * The probe picks the chassis row (entPhysicalClass == 3), falling back to
4
+ * the lowest-indexed row that carries a serial number, since stacked or
5
+ * modular devices expose one row per component. All fields are best-effort —
6
+ * many low-end devices do not implement ENTITY-MIB at all.
7
+ */
8
+ export default interface SnmpEntityInfo {
9
+ manufacturer?: string | undefined;
10
+ model?: string | undefined;
11
+ serialNumber?: string | undefined;
12
+ hardwareRevision?: string | undefined;
13
+ firmwareVersion?: string | undefined;
14
+ softwareVersion?: string | undefined;
15
+ }
@@ -15,6 +15,14 @@ export default interface SnmpInterface {
15
15
  alias?: string | undefined;
16
16
  isOperationallyUp: boolean;
17
17
  isAdministrativelyUp: boolean;
18
+ /*
19
+ * ifPhysAddress formatted as lowercase colon-separated hex
20
+ * ("aa:bb:cc:dd:ee:ff"); undefined for interfaces with no MAC (loopbacks,
21
+ * tunnels) or when the device returns an empty octet string.
22
+ */
23
+ macAddress?: string | undefined;
24
+ // IANAifType number (ifType column) — 6 = ethernetCsmacd, 24 = loopback...
25
+ interfaceType?: number | undefined;
18
26
  speedInBitsPerSecond?: number | undefined;
19
27
  inOctets?: number | undefined;
20
28
  outOctets?: number | undefined;
@@ -2,6 +2,9 @@ import ProbeAttempt from "../../Probe/ProbeAttempt";
2
2
  import SnmpDataType from "./SnmpDataType";
3
3
  import SnmpInterface from "./SnmpInterface";
4
4
  import LldpNeighbor from "./LldpNeighbor";
5
+ import CdpNeighbor from "./CdpNeighbor";
6
+ import SnmpSystemInfo from "./SnmpSystemInfo";
7
+ import SnmpEntityInfo from "./SnmpEntityInfo";
5
8
 
6
9
  export interface SnmpOidResponse {
7
10
  oid: string;
@@ -26,18 +29,24 @@ export default interface SnmpMonitorResponse {
26
29
  interfaces?: Array<SnmpInterface> | undefined;
27
30
  interfaceWalkFailure?: string | undefined;
28
31
  /*
29
- * System-group identity (sysDescr / sysName), collected alongside the
30
- * interface walk. Used to enrich the NetworkDevice resource.
32
+ * System-group identity, collected alongside the interface walk. Used to
33
+ * enrich the NetworkDevice resource. Older probes send only
34
+ * sysDescr/sysName.
31
35
  */
32
- systemInfo?:
33
- | {
34
- sysDescr?: string | undefined;
35
- sysName?: string | undefined;
36
- }
37
- | undefined;
36
+ systemInfo?: SnmpSystemInfo | undefined;
37
+ /*
38
+ * ENTITY-MIB hardware identity (manufacturer/model/serial/firmware),
39
+ * collected alongside the interface walk on devices that implement it.
40
+ */
41
+ entityInfo?: SnmpEntityInfo | undefined;
38
42
  /*
39
43
  * LLDP neighbors discovered during the walk (when interface monitoring is
40
44
  * enabled). Used to build the network topology graph.
41
45
  */
42
46
  lldpNeighbors?: Array<LldpNeighbor> | undefined;
47
+ /*
48
+ * CDP neighbors, walked as a complement to LLDP for Cisco estates.
49
+ * Undefined on older probes and non-CDP devices.
50
+ */
51
+ cdpNeighbors?: Array<CdpNeighbor> | undefined;
43
52
  }
@@ -4,4 +4,57 @@ enum SnmpPrivProtocol {
4
4
  AES256 = "AES256",
5
5
  }
6
6
 
7
+ /*
8
+ * The snmpV3PrivProtocol column is free text (character varying, no check
9
+ * constraint), so what lands in it is only as good as whoever wrote it. The
10
+ * forms write these enum values, but a direct API call, a hand-edited row or
11
+ * a restored backup can put anything there.
12
+ *
13
+ * parse() is the only correct way to read that column. Reading it by casting
14
+ * the raw string to this enum type compiles fine and then silently misses:
15
+ * an "AES-256" (the label the form shows) or "aes" is not === any member, so
16
+ * the probe's protocol switch falls to its default and encrypts with DES —
17
+ * the weakest option — against a device that expects AES. The poll then fails
18
+ * in a way that looks like a timeout rather than a config error.
19
+ *
20
+ * Returning undefined rather than a default member is deliberate: "unset" and
21
+ * "unreadable" are different problems, and only the caller knows whether it is
22
+ * safe to fall back. isUnrecognized() names the second case so the probe can
23
+ * refuse to poll rather than guess a cipher.
24
+ *
25
+ * The accepted spellings cover case, surrounding whitespace, and the hyphen
26
+ * the UI labels use. AES here is AES-128, per RFC 3826.
27
+ */
28
+ export class SnmpPrivProtocolUtil {
29
+ public static parse(
30
+ value: string | undefined | null,
31
+ ): SnmpPrivProtocol | undefined {
32
+ switch ((value || "").trim().toLowerCase()) {
33
+ case "des":
34
+ return SnmpPrivProtocol.DES;
35
+ case "aes":
36
+ case "aes128":
37
+ case "aes-128":
38
+ return SnmpPrivProtocol.AES;
39
+ case "aes256":
40
+ case "aes-256":
41
+ return SnmpPrivProtocol.AES256;
42
+ default:
43
+ return undefined;
44
+ }
45
+ }
46
+
47
+ /*
48
+ * True only when something is stored and none of the spellings match — an
49
+ * empty or absent column is "unset", not "unrecognized".
50
+ */
51
+ public static isUnrecognized(value: string | undefined | null): boolean {
52
+ if (!(value || "").trim()) {
53
+ return false;
54
+ }
55
+
56
+ return SnmpPrivProtocolUtil.parse(value) === undefined;
57
+ }
58
+ }
59
+
7
60
  export default SnmpPrivProtocol;
@@ -4,4 +4,47 @@ enum SnmpSecurityLevel {
4
4
  AuthPriv = "authPriv",
5
5
  }
6
6
 
7
+ /*
8
+ * This is the most consequential of the v3 enums to misread, because the
9
+ * fallback is not merely a weaker algorithm — it is no security at all.
10
+ *
11
+ * The snmpV3SecurityLevel column is free text. Casting it straight to this
12
+ * enum and letting an unmatched value fall through to NoAuthNoPriv means a
13
+ * device configured for authPriv gets polled with its authentication and
14
+ * privacy material dropped: the username goes out in cleartext and nothing is
15
+ * encrypted. The device rejects it, so the visible symptom is a dead monitor
16
+ * rather than a config error, and the downgrade itself is invisible.
17
+ *
18
+ * The keys ("AuthPriv") and values ("authPriv") differ only by the case of the
19
+ * first letter, which is exactly the kind of drift a hand-written row or an
20
+ * API caller reading the docs will produce. Lowercasing collapses the two
21
+ * spellings onto each other, so parse() accepts both by construction.
22
+ *
23
+ * See SnmpPrivProtocol for why parse() returns undefined rather than a default.
24
+ */
25
+ export class SnmpSecurityLevelUtil {
26
+ public static parse(
27
+ value: string | undefined | null,
28
+ ): SnmpSecurityLevel | undefined {
29
+ switch ((value || "").trim().toLowerCase()) {
30
+ case "noauthnopriv":
31
+ return SnmpSecurityLevel.NoAuthNoPriv;
32
+ case "authnopriv":
33
+ return SnmpSecurityLevel.AuthNoPriv;
34
+ case "authpriv":
35
+ return SnmpSecurityLevel.AuthPriv;
36
+ default:
37
+ return undefined;
38
+ }
39
+ }
40
+
41
+ public static isUnrecognized(value: string | undefined | null): boolean {
42
+ if (!(value || "").trim()) {
43
+ return false;
44
+ }
45
+
46
+ return SnmpSecurityLevelUtil.parse(value) === undefined;
47
+ }
48
+ }
49
+
7
50
  export default SnmpSecurityLevel;
@@ -0,0 +1,16 @@
1
+ /*
2
+ * The SNMPv2 system group (1.3.6.1.2.1.1), read by the probe alongside the
3
+ * interface walk and by subnet discovery. sysObjectId is the vendor's
4
+ * registered enterprise OID — the canonical device fingerprint used to
5
+ * suggest a vendor OID template and derive the vendor name without MIBs.
6
+ * sysUpTimeSeconds is converted from TimeTicks (hundredths of a second) on
7
+ * the probe.
8
+ */
9
+ export default interface SnmpSystemInfo {
10
+ sysDescr?: string | undefined;
11
+ sysName?: string | undefined;
12
+ sysObjectId?: string | undefined;
13
+ sysLocation?: string | undefined;
14
+ sysContact?: string | undefined;
15
+ sysUpTimeSeconds?: number | undefined;
16
+ }