@oneuptime/common 11.5.9 → 11.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/Index.ts +13 -0
- package/Models/AnalyticsModels/MetricItemAggMV1mByContainer.ts +178 -0
- package/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.ts +179 -0
- package/Models/AnalyticsModels/MetricItemAggMV1mByService.ts +179 -0
- package/Models/AnalyticsModels/NetworkFlow.ts +397 -0
- package/Models/DatabaseModels/EnterpriseLicenseInstance.ts +18 -0
- package/Models/DatabaseModels/GlobalConfig.ts +36 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/MarketingConversion.ts +198 -0
- package/Models/DatabaseModels/MetricSavedView.ts +34 -0
- package/Models/DatabaseModels/MetricType.ts +74 -0
- package/Models/DatabaseModels/NetworkDevice.ts +332 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +113 -0
- package/Models/DatabaseModels/NetworkInterface.ts +58 -0
- package/Models/DatabaseModels/Project.ts +37 -0
- package/Models/DatabaseModels/User.ts +37 -0
- package/Server/API/BaseAnalyticsAPI.ts +23 -0
- package/Server/API/EnterpriseLicenseAPI.ts +14 -0
- package/Server/EnvironmentConfig.ts +84 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.ts +38 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.ts +28 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.ts +108 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +12 -0
- package/Server/Services/AnalyticsDatabaseService.ts +70 -1
- package/Server/Services/IncidentService.ts +13 -0
- package/Server/Services/Index.ts +10 -0
- package/Server/Services/MarketingConversionService.ts +10 -0
- package/Server/Services/MetricItemAggMV1mByContainerService.ts +31 -0
- package/Server/Services/MetricItemAggMV1mByK8sClusterService.ts +31 -0
- package/Server/Services/MetricItemAggMV1mByServiceService.ts +31 -0
- package/Server/Services/MetricService.ts +970 -122
- package/Server/Services/MonitorService.ts +14 -0
- package/Server/Services/NetworkDeviceOwnerTeamService.ts +42 -0
- package/Server/Services/NetworkDeviceOwnerUserService.ts +106 -0
- package/Server/Services/NetworkFlowService.ts +11 -0
- package/Server/Services/OnCallDutyPolicyService.ts +11 -1
- package/Server/Services/ProjectService.ts +136 -0
- package/Server/Services/SpanService.ts +13 -9
- package/Server/Services/StatusPageService.ts +10 -0
- package/Server/Services/TeamMemberService.ts +11 -0
- package/Server/Services/UserService.ts +59 -0
- package/Server/Types/AnalyticsDatabase/AggregateBy.ts +37 -7
- package/Server/Utils/Attribution.ts +99 -0
- package/Server/Utils/Marketing/ConversionUploadProvider.ts +103 -0
- package/Server/Utils/Marketing/ConversionUploadProviders.ts +22 -0
- package/Server/Utils/Marketing/Providers/GoogleAds.ts +270 -0
- package/Server/Utils/Marketing/Providers/LinkedIn.ts +147 -0
- package/Server/Utils/Marketing/Providers/Meta.ts +148 -0
- package/Server/Utils/Marketing/Providers/MicrosoftAds.ts +196 -0
- package/Server/Utils/Marketing/Providers/Reddit.ts +178 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +71 -7
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +31 -19
- package/Server/Utils/Monitor/MonitorIncident.ts +71 -7
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +57 -0
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +94 -0
- package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +15 -0
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +125 -14
- package/Server/Utils/ProductAnalytics.ts +133 -0
- package/Server/Utils/Telemetry/Telemetry.ts +39 -0
- package/Server/Utils/Telemetry/TelemetryEntity.ts +21 -0
- package/Tests/Server/API/BaseAnalyticsAPI.test.ts +72 -0
- package/Tests/Server/Infrastructure/SemaphorePermit.test.ts +9 -1
- package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +21 -2
- package/Tests/Server/Services/MetricEntityMVKeyParity.test.ts +173 -0
- package/Tests/Server/Services/MetricServiceAggregate.test.ts +1391 -0
- package/Tests/Server/Services/NetworkDeviceOwnerServices.test.ts +260 -0
- package/Tests/Server/Utils/Monitor/MonitorTemplateUtilNetworkDevice.test.ts +389 -0
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +764 -0
- package/Tests/Types/BaseDatabase/AggregationIntervalUtil.test.ts +111 -2
- package/Tests/Types/Database/EndsWith.test.ts +64 -0
- package/Tests/Types/Database/GreaterThan.test.ts +62 -0
- package/Tests/Types/Database/GreaterThanOrEqual.test.ts +65 -0
- package/Tests/Types/Database/GreaterThanOrNull.test.ts +63 -0
- package/Tests/Types/Database/Includes.test.ts +65 -0
- package/Tests/Types/Database/IncludesAll.test.ts +65 -0
- package/Tests/Types/Database/IncludesNone.test.ts +65 -0
- package/Tests/Types/Database/IsNull.test.ts +44 -0
- package/Tests/Types/Database/LessThan.test.ts +62 -0
- package/Tests/Types/Database/LessThanOrEqual.test.ts +62 -0
- package/Tests/Types/Database/LessThanOrNull.test.ts +62 -0
- package/Tests/Types/Database/MultiSearch.test.ts +81 -0
- package/Tests/Types/Database/NotContains.test.ts +64 -0
- package/Tests/Types/Database/NotNull.test.ts +44 -0
- package/Tests/Types/Database/StartsWith.test.ts +64 -0
- package/Tests/Types/Monitor/MonitorStepSqlMonitor.test.ts +83 -1
- package/Tests/Types/Monitor/SnmpV3EnumParsing.test.ts +247 -0
- package/Tests/Types/Monitor/SnmpVendorTemplate.test.ts +263 -0
- package/Tests/UI/Components/XAxis.test.ts +5 -3
- package/Tests/Utils/EnterpriseLicenseUsage.test.ts +76 -0
- package/Tests/Utils/Metrics/MetricExplorerUrl.test.ts +622 -0
- package/Tests/Utils/Metrics/MetricFormulaEvaluator.test.ts +474 -0
- package/Tests/Utils/Telemetry/HeartbeatAvailability.test.ts +52 -4
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +11 -0
- package/Types/BaseDatabase/AggregateBy.ts +31 -2
- package/Types/BaseDatabase/AggregatedResult.ts +22 -0
- package/Types/BaseDatabase/AggregationInterval.ts +11 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.ts +30 -5
- package/Types/Dashboard/DashboardComponents/DashboardTraceChartComponent.ts +16 -0
- package/Types/Email/EmailTemplateType.ts +3 -0
- package/Types/Marketing/MarketingConversion.ts +11 -0
- package/Types/Metrics/MetricQueryConfigData.ts +21 -0
- package/Types/Metrics/MetricQueryData.ts +8 -0
- package/Types/Metrics/MetricViewData.ts +8 -0
- package/Types/Monitor/MonitorMetricType.ts +8 -0
- package/Types/Monitor/MonitorStep.ts +9 -0
- package/Types/Monitor/MonitorStepSqlMonitor.ts +12 -0
- package/Types/Monitor/MonitorType.ts +2 -1
- package/Types/Monitor/SSLMonitor/SslMonitorResponse.ts +17 -12
- package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +13 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +37 -3
- package/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.ts +46 -0
- package/Types/Monitor/SnmpMonitor/SnmpEntityInfo.ts +15 -0
- package/Types/Monitor/SnmpMonitor/SnmpInterface.ts +8 -0
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.ts +17 -8
- package/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.ts +53 -0
- package/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.ts +43 -0
- package/Types/Monitor/SnmpMonitor/SnmpSystemInfo.ts +16 -0
- package/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.ts +119 -3
- package/Types/NetFlow/NetworkFlowRecord.ts +25 -0
- package/Types/Syslog/SyslogMessage.ts +18 -0
- package/Types/Telemetry/TelemetrySavedViewState.ts +9 -0
- package/Types/Telemetry/TelemetrySavedViewType.ts +12 -0
- package/UI/Components/Charts/Area/AreaChart.tsx +51 -0
- package/UI/Components/Charts/Bar/BarChart.tsx +51 -1
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +97 -26
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +328 -1
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +115 -0
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +328 -1
- package/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.ts +7 -0
- package/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.ts +15 -0
- package/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.ts +13 -0
- package/UI/Components/Charts/Line/LineChart.tsx +51 -0
- package/UI/Components/Charts/Types/ReferenceRegionProps.ts +12 -0
- package/UI/Components/Charts/Types/TimeReferenceLineProps.ts +12 -0
- package/UI/Components/Charts/Types/XAxis/XAxisPrecision.ts +1 -0
- package/UI/Components/Charts/Utils/DataPoint.ts +0 -0
- package/UI/Components/Charts/Utils/TimeAnnotation.ts +169 -0
- package/UI/Components/Charts/Utils/XAxis.ts +28 -4
- package/UI/Components/Icon/Icon.tsx +33 -13
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +9 -0
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +67 -0
- package/UI/Components/Page/ModelPage.tsx +6 -1
- package/UI/Components/TelemetryViewer/components/SavedViewsDropdown.tsx +33 -4
- package/UI/Styles/Theme.css +10 -0
- package/UI/Utils/User.ts +41 -2
- package/Utils/Analytics.ts +8 -6
- package/Utils/EnterpriseLicense/EnterpriseLicenseUsage.ts +74 -0
- package/Utils/Metrics/MetricExplorerUrl.ts +771 -0
- package/Utils/Metrics/MetricFormulaEvaluator.ts +410 -46
- package/Utils/Monitor/NetworkTopologyUtil.ts +261 -49
- package/Utils/ValueFormatter.ts +22 -1
- package/build/dist/Models/AnalyticsModels/Index.js +13 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByContainer.js +159 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByContainer.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.js +158 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByService.js +160 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByService.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/NetworkFlow.js +351 -0
- package/build/dist/Models/AnalyticsModels/NetworkFlow.js.map +1 -0
- package/build/dist/Models/DatabaseModels/EnterpriseLicenseInstance.js +19 -0
- package/build/dist/Models/DatabaseModels/EnterpriseLicenseInstance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +38 -0
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MarketingConversion.js +219 -0
- package/build/dist/Models/DatabaseModels/MarketingConversion.js.map +1 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js +35 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricType.js +76 -0
- package/build/dist/Models/DatabaseModels/MetricType.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +341 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +116 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkInterface.js +60 -0
- package/build/dist/Models/DatabaseModels/NetworkInterface.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +38 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/User.js +38 -0
- package/build/dist/Models/DatabaseModels/User.js.map +1 -1
- package/build/dist/Server/API/BaseAnalyticsAPI.js +19 -0
- package/build/dist/Server/API/BaseAnalyticsAPI.js.map +1 -1
- package/build/dist/Server/API/EnterpriseLicenseAPI.js +8 -0
- package/build/dist/Server/API/EnterpriseLicenseAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +51 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.js +27 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.js +21 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.js +47 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +58 -4
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +12 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +10 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/MarketingConversionService.js +9 -0
- package/build/dist/Server/Services/MarketingConversionService.js.map +1 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByContainerService.js +29 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByContainerService.js.map +1 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByK8sClusterService.js +29 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByK8sClusterService.js.map +1 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByServiceService.js +29 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByServiceService.js.map +1 -0
- package/build/dist/Server/Services/MetricService.js +761 -125
- package/build/dist/Server/Services/MetricService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +18 -5
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js +44 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js +88 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/NetworkFlowService.js +9 -0
- package/build/dist/Server/Services/NetworkFlowService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyService.js +15 -6
- package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +107 -6
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/SpanService.js +8 -6
- package/build/dist/Server/Services/SpanService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +10 -0
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +11 -0
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +52 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +33 -7
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
- package/build/dist/Server/Utils/Attribution.js +74 -0
- package/build/dist/Server/Utils/Attribution.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js +40 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProviders.js +20 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProviders.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js +177 -0
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js +113 -0
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js +109 -0
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js +130 -0
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js +126 -0
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +53 -9
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +21 -10
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +54 -11
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +43 -3
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +68 -0
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +15 -0
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +100 -15
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/ProductAnalytics.js +111 -0
- package/build/dist/Server/Utils/ProductAnalytics.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/Telemetry.js +32 -5
- package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +17 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +11 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/BaseDatabase/AggregationInterval.js +11 -0
- package/build/dist/Types/BaseDatabase/AggregationInterval.js.map +1 -1
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +33 -5
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +2 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/Marketing/MarketingConversion.js +13 -0
- package/build/dist/Types/Marketing/MarketingConversion.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js +7 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +6 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js +3 -0
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +2 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/CdpNeighbor.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/CdpNeighbor.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.js +41 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpEntityInfo.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpEntityInfo.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.js +48 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.js +38 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSystemInfo.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSystemInfo.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js +96 -3
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js.map +1 -1
- package/build/dist/Types/NetFlow/NetworkFlowRecord.js +2 -0
- package/build/dist/Types/NetFlow/NetworkFlowRecord.js.map +1 -0
- package/build/dist/Types/Syslog/SyslogMessage.js +2 -0
- package/build/dist/Types/Syslog/SyslogMessage.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetrySavedViewState.js +0 -7
- package/build/dist/Types/Telemetry/TelemetrySavedViewState.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetrySavedViewType.js +13 -0
- package/build/dist/Types/Telemetry/TelemetrySavedViewType.js.map +1 -0
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +25 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +26 -2
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +36 -12
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +208 -6
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +52 -3
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +208 -6
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js +6 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.js +2 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.js +2 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +25 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ReferenceRegionProps.js +2 -0
- package/build/dist/UI/Components/Charts/Types/ReferenceRegionProps.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/TimeReferenceLineProps.js +2 -0
- package/build/dist/UI/Components/Charts/Types/TimeReferenceLineProps.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js +0 -0
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js +121 -0
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js.map +1 -0
- package/build/dist/UI/Components/Charts/Utils/XAxis.js +27 -4
- package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +15 -8
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +58 -0
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Components/Page/ModelPage.js +7 -1
- package/build/dist/UI/Components/Page/ModelPage.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js +10 -4
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Utils/User.js +35 -2
- package/build/dist/UI/Utils/User.js.map +1 -1
- package/build/dist/Utils/Analytics.js +8 -5
- package/build/dist/Utils/Analytics.js.map +1 -1
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js +57 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js.map +1 -1
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js +418 -0
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -0
- package/build/dist/Utils/Metrics/MetricFormulaEvaluator.js +296 -37
- package/build/dist/Utils/Metrics/MetricFormulaEvaluator.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +176 -40
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/ValueFormatter.js +20 -1
- package/build/dist/Utils/ValueFormatter.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import NetworkTopology, {
|
|
2
2
|
NetworkTopologyEdge,
|
|
3
|
+
NetworkTopologyEdgeEndpoint,
|
|
4
|
+
NetworkTopologyLinkProtocol,
|
|
3
5
|
NetworkTopologyNode,
|
|
4
6
|
NetworkTopologyNodeStatus,
|
|
5
7
|
} from "../../Types/Monitor/SnmpMonitor/NetworkTopology";
|
|
6
8
|
import LldpNeighbor from "../../Types/Monitor/SnmpMonitor/LldpNeighbor";
|
|
9
|
+
import CdpNeighbor from "../../Types/Monitor/SnmpMonitor/CdpNeighbor";
|
|
7
10
|
|
|
8
11
|
export interface TopologyDeviceInput {
|
|
9
12
|
id: string;
|
|
@@ -13,7 +16,41 @@ export interface TopologyDeviceInput {
|
|
|
13
16
|
lastSeenAt?: Date | undefined;
|
|
14
17
|
interfacesUp?: number | undefined;
|
|
15
18
|
interfacesDown?: number | undefined;
|
|
19
|
+
vendor?: string | undefined;
|
|
20
|
+
deviceModel?: string | undefined;
|
|
16
21
|
lldpNeighbors?: Array<LldpNeighbor> | undefined;
|
|
22
|
+
cdpNeighbors?: Array<CdpNeighbor> | undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* One NetworkInterface row, reduced to what edge enrichment needs. The
|
|
27
|
+
* caller queries interfaces for all devices in the graph in one go and
|
|
28
|
+
* passes them here; matching happens in memory.
|
|
29
|
+
*/
|
|
30
|
+
export interface TopologyInterfaceInput {
|
|
31
|
+
networkDeviceId: string;
|
|
32
|
+
interfaceIndex: number;
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
isOperationallyUp?: boolean | undefined;
|
|
35
|
+
isAdministrativelyUp?: boolean | undefined;
|
|
36
|
+
utilizationPercent?: number | undefined;
|
|
37
|
+
inRateMbps?: number | undefined;
|
|
38
|
+
outRateMbps?: number | undefined;
|
|
39
|
+
errorsPerSecond?: number | undefined;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/*
|
|
43
|
+
* A neighbor claim from either discovery protocol, normalized so LLDP and
|
|
44
|
+
* CDP entries flow through the same match/dedupe/enrich pipeline.
|
|
45
|
+
*/
|
|
46
|
+
interface NeighborClaim {
|
|
47
|
+
protocol: NetworkTopologyLinkProtocol;
|
|
48
|
+
matchKey: string | undefined;
|
|
49
|
+
displayName: string | undefined;
|
|
50
|
+
localInterfaceIndex: number | undefined;
|
|
51
|
+
remotePortId: string | undefined;
|
|
52
|
+
// CDP-only: the platform string the neighbor advertises about itself.
|
|
53
|
+
remotePlatform: string | undefined;
|
|
17
54
|
}
|
|
18
55
|
|
|
19
56
|
// A device not seen within this window is treated as not currently up.
|
|
@@ -22,20 +59,23 @@ const FRESH_WINDOW_MS: number = 15 * 60 * 1000;
|
|
|
22
59
|
export default class NetworkTopologyUtil {
|
|
23
60
|
/*
|
|
24
61
|
* Builds the topology graph from every device in a project. Nodes are the
|
|
25
|
-
* devices; LLDP neighbors that match another device (by sysName
|
|
26
|
-
* hostname) become edges, and neighbors that match nothing become
|
|
62
|
+
* devices; LLDP and CDP neighbors that match another device (by sysName,
|
|
63
|
+
* hostname or name) become edges, and neighbors that match nothing become
|
|
27
64
|
* lightweight "unmanaged" nodes so links don't dead-end. Edges are
|
|
28
|
-
* undirected and deduplicated
|
|
29
|
-
* once
|
|
65
|
+
* undirected and deduplicated — a link reported from both ends, or by
|
|
66
|
+
* both protocols, appears once with the union of what each report knew
|
|
67
|
+
* (ports, protocols, per-end interface state). When `interfaces` rows are
|
|
68
|
+
* provided, each edge end whose interface is identifiable carries its
|
|
69
|
+
* operational state (up/down, utilization, rates).
|
|
30
70
|
*/
|
|
31
71
|
public static buildTopology(
|
|
32
72
|
devices: Array<TopologyDeviceInput>,
|
|
33
73
|
now: Date,
|
|
74
|
+
interfaces: Array<TopologyInterfaceInput> = [],
|
|
34
75
|
): NetworkTopology {
|
|
35
76
|
const nodes: Array<NetworkTopologyNode> = [];
|
|
36
|
-
const edges: Array<NetworkTopologyEdge> = [];
|
|
37
77
|
|
|
38
|
-
// Index managed devices by the identifiers
|
|
78
|
+
// Index managed devices by the identifiers neighbor entries reference.
|
|
39
79
|
const deviceByMatchKey: Map<string, TopologyDeviceInput> = new Map();
|
|
40
80
|
for (const device of devices) {
|
|
41
81
|
for (const key of NetworkTopologyUtil.matchKeysForDevice(device)) {
|
|
@@ -43,6 +83,24 @@ export default class NetworkTopologyUtil {
|
|
|
43
83
|
}
|
|
44
84
|
}
|
|
45
85
|
|
|
86
|
+
// Index interface rows by (device, index) and by (device, name).
|
|
87
|
+
const interfaceByDeviceAndIndex: Map<string, TopologyInterfaceInput> =
|
|
88
|
+
new Map();
|
|
89
|
+
const interfaceByDeviceAndName: Map<string, TopologyInterfaceInput> =
|
|
90
|
+
new Map();
|
|
91
|
+
for (const row of interfaces) {
|
|
92
|
+
interfaceByDeviceAndIndex.set(
|
|
93
|
+
`${row.networkDeviceId}::${row.interfaceIndex}`,
|
|
94
|
+
row,
|
|
95
|
+
);
|
|
96
|
+
const nameKey: string | undefined = NetworkTopologyUtil.normalizeKey(
|
|
97
|
+
row.name,
|
|
98
|
+
);
|
|
99
|
+
if (nameKey) {
|
|
100
|
+
interfaceByDeviceAndName.set(`${row.networkDeviceId}::${nameKey}`, row);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
46
104
|
for (const device of devices) {
|
|
47
105
|
nodes.push({
|
|
48
106
|
id: device.id,
|
|
@@ -51,24 +109,24 @@ export default class NetworkTopologyUtil {
|
|
|
51
109
|
status: NetworkTopologyUtil.deviceStatus(device, now),
|
|
52
110
|
interfacesUp: device.interfacesUp,
|
|
53
111
|
interfacesDown: device.interfacesDown,
|
|
112
|
+
sysName: device.sysName,
|
|
113
|
+
vendor: device.vendor,
|
|
114
|
+
deviceModel: device.deviceModel,
|
|
54
115
|
});
|
|
55
116
|
}
|
|
56
117
|
|
|
57
|
-
const
|
|
58
|
-
const
|
|
118
|
+
const unmanagedNodeById: Map<string, NetworkTopologyNode> = new Map();
|
|
119
|
+
const edgeByKey: Map<string, NetworkTopologyEdge> = new Map();
|
|
59
120
|
|
|
60
121
|
for (const device of devices) {
|
|
61
|
-
for (const
|
|
62
|
-
|
|
63
|
-
NetworkTopologyUtil.normalizeKey(neighbor.remoteSysName) ||
|
|
64
|
-
NetworkTopologyUtil.normalizeKey(neighbor.remoteChassisId);
|
|
65
|
-
|
|
66
|
-
if (!matchKey) {
|
|
122
|
+
for (const claim of NetworkTopologyUtil.neighborClaimsForDevice(device)) {
|
|
123
|
+
if (!claim.matchKey) {
|
|
67
124
|
continue;
|
|
68
125
|
}
|
|
69
126
|
|
|
70
|
-
const matched: TopologyDeviceInput | undefined =
|
|
71
|
-
|
|
127
|
+
const matched: TopologyDeviceInput | undefined = deviceByMatchKey.get(
|
|
128
|
+
claim.matchKey,
|
|
129
|
+
);
|
|
72
130
|
|
|
73
131
|
let toNodeId: string;
|
|
74
132
|
|
|
@@ -79,58 +137,212 @@ export default class NetworkTopologyUtil {
|
|
|
79
137
|
}
|
|
80
138
|
toNodeId = matched.id;
|
|
81
139
|
} else {
|
|
82
|
-
toNodeId = `unmanaged:${matchKey}`;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
140
|
+
toNodeId = `unmanaged:${claim.matchKey}`;
|
|
141
|
+
const existingUnmanaged: NetworkTopologyNode | undefined =
|
|
142
|
+
unmanagedNodeById.get(toNodeId);
|
|
143
|
+
if (!existingUnmanaged) {
|
|
144
|
+
const unmanagedNode: NetworkTopologyNode = {
|
|
86
145
|
id: toNodeId,
|
|
87
|
-
name:
|
|
88
|
-
neighbor.remoteSysName ||
|
|
89
|
-
neighbor.remoteChassisId ||
|
|
90
|
-
"Unknown device",
|
|
146
|
+
name: claim.displayName || "Unknown device",
|
|
91
147
|
isManaged: false,
|
|
92
148
|
status: "unknown",
|
|
93
|
-
|
|
149
|
+
deviceModel: claim.remotePlatform,
|
|
150
|
+
};
|
|
151
|
+
unmanagedNodeById.set(toNodeId, unmanagedNode);
|
|
152
|
+
nodes.push(unmanagedNode);
|
|
153
|
+
} else if (!existingUnmanaged.deviceModel && claim.remotePlatform) {
|
|
154
|
+
// A later CDP claim may know the platform the first one didn't.
|
|
155
|
+
existingUnmanaged.deviceModel = claim.remotePlatform;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// The reporting device's own end, enriched from its interface row.
|
|
160
|
+
let localEndpoint: NetworkTopologyEdgeEndpoint | undefined = undefined;
|
|
161
|
+
let localPortLabel: string | undefined = undefined;
|
|
162
|
+
if (claim.localInterfaceIndex !== undefined) {
|
|
163
|
+
const localInterface: TopologyInterfaceInput | undefined =
|
|
164
|
+
interfaceByDeviceAndIndex.get(
|
|
165
|
+
`${device.id}::${claim.localInterfaceIndex}`,
|
|
166
|
+
);
|
|
167
|
+
localEndpoint = {
|
|
168
|
+
interfaceIndex: claim.localInterfaceIndex,
|
|
169
|
+
interfaceName: localInterface?.name,
|
|
170
|
+
isOperationallyUp: localInterface?.isOperationallyUp,
|
|
171
|
+
isAdministrativelyUp: localInterface?.isAdministrativelyUp,
|
|
172
|
+
utilizationPercent: localInterface?.utilizationPercent,
|
|
173
|
+
inRateMbps: localInterface?.inRateMbps,
|
|
174
|
+
outRateMbps: localInterface?.outRateMbps,
|
|
175
|
+
errorsPerSecond: localInterface?.errorsPerSecond,
|
|
176
|
+
};
|
|
177
|
+
localPortLabel =
|
|
178
|
+
localInterface?.name || `if${claim.localInterfaceIndex}`;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/*
|
|
182
|
+
* The far end: best-effort — the advertised remote port id often
|
|
183
|
+
* matches the remote device's interface name (e.g. "GigabitEthernet
|
|
184
|
+
* 0/1"). Only attach data when it does; a bare port id string stays
|
|
185
|
+
* in toPort.
|
|
186
|
+
*/
|
|
187
|
+
let remoteEndpoint: NetworkTopologyEdgeEndpoint | undefined = undefined;
|
|
188
|
+
if (matched && claim.remotePortId) {
|
|
189
|
+
const remotePortKey: string | undefined =
|
|
190
|
+
NetworkTopologyUtil.normalizeKey(claim.remotePortId);
|
|
191
|
+
const remoteInterface: TopologyInterfaceInput | undefined =
|
|
192
|
+
remotePortKey
|
|
193
|
+
? interfaceByDeviceAndName.get(`${matched.id}::${remotePortKey}`)
|
|
194
|
+
: undefined;
|
|
195
|
+
if (remoteInterface) {
|
|
196
|
+
remoteEndpoint = {
|
|
197
|
+
interfaceIndex: remoteInterface.interfaceIndex,
|
|
198
|
+
interfaceName: remoteInterface.name,
|
|
199
|
+
isOperationallyUp: remoteInterface.isOperationallyUp,
|
|
200
|
+
isAdministrativelyUp: remoteInterface.isAdministrativelyUp,
|
|
201
|
+
utilizationPercent: remoteInterface.utilizationPercent,
|
|
202
|
+
inRateMbps: remoteInterface.inRateMbps,
|
|
203
|
+
outRateMbps: remoteInterface.outRateMbps,
|
|
204
|
+
errorsPerSecond: remoteInterface.errorsPerSecond,
|
|
205
|
+
};
|
|
94
206
|
}
|
|
95
207
|
}
|
|
96
208
|
|
|
97
209
|
// Undirected dedupe: canonicalize the endpoint pair.
|
|
98
210
|
const edgeKey: string = [device.id, toNodeId].sort().join("::");
|
|
99
|
-
|
|
211
|
+
const existing: NetworkTopologyEdge | undefined =
|
|
212
|
+
edgeByKey.get(edgeKey);
|
|
213
|
+
|
|
214
|
+
if (!existing) {
|
|
215
|
+
edgeByKey.set(edgeKey, {
|
|
216
|
+
fromNodeId: device.id,
|
|
217
|
+
toNodeId: toNodeId,
|
|
218
|
+
fromPort: localPortLabel,
|
|
219
|
+
toPort: claim.remotePortId,
|
|
220
|
+
protocols: [claim.protocol],
|
|
221
|
+
fromInterface: localEndpoint,
|
|
222
|
+
toInterface: remoteEndpoint,
|
|
223
|
+
});
|
|
100
224
|
continue;
|
|
101
225
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
226
|
+
|
|
227
|
+
/*
|
|
228
|
+
* Same link reported again — from the other end, or by the other
|
|
229
|
+
* protocol. Merge instead of dropping so both ends keep the best
|
|
230
|
+
* data anyone reported about them.
|
|
231
|
+
*/
|
|
232
|
+
if (
|
|
233
|
+
existing.protocols &&
|
|
234
|
+
!existing.protocols.includes(claim.protocol)
|
|
235
|
+
) {
|
|
236
|
+
existing.protocols.push(claim.protocol);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (existing.fromNodeId === device.id) {
|
|
240
|
+
existing.fromPort = existing.fromPort || localPortLabel;
|
|
241
|
+
existing.toPort = existing.toPort || claim.remotePortId;
|
|
242
|
+
existing.fromInterface = NetworkTopologyUtil.mergeEndpoints(
|
|
243
|
+
existing.fromInterface,
|
|
244
|
+
localEndpoint,
|
|
245
|
+
);
|
|
246
|
+
existing.toInterface = NetworkTopologyUtil.mergeEndpoints(
|
|
247
|
+
existing.toInterface,
|
|
248
|
+
remoteEndpoint,
|
|
249
|
+
);
|
|
250
|
+
} else {
|
|
251
|
+
existing.toPort = existing.toPort || localPortLabel;
|
|
252
|
+
existing.fromPort = existing.fromPort || claim.remotePortId;
|
|
253
|
+
existing.toInterface = NetworkTopologyUtil.mergeEndpoints(
|
|
254
|
+
existing.toInterface,
|
|
255
|
+
localEndpoint,
|
|
256
|
+
);
|
|
257
|
+
existing.fromInterface = NetworkTopologyUtil.mergeEndpoints(
|
|
258
|
+
existing.fromInterface,
|
|
259
|
+
remoteEndpoint,
|
|
260
|
+
);
|
|
261
|
+
}
|
|
113
262
|
}
|
|
114
263
|
}
|
|
115
264
|
|
|
116
|
-
return { nodes, edges };
|
|
265
|
+
return { nodes, edges: Array.from(edgeByKey.values()) };
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/*
|
|
269
|
+
* Both protocols' neighbor entries, normalized. LLDP first so its
|
|
270
|
+
* (usually richer) identifiers win the first-report slots; CDP then
|
|
271
|
+
* fills gaps or dedupes into the same edge.
|
|
272
|
+
*/
|
|
273
|
+
private static neighborClaimsForDevice(
|
|
274
|
+
device: TopologyDeviceInput,
|
|
275
|
+
): Array<NeighborClaim> {
|
|
276
|
+
const claims: Array<NeighborClaim> = [];
|
|
277
|
+
|
|
278
|
+
for (const neighbor of device.lldpNeighbors || []) {
|
|
279
|
+
claims.push({
|
|
280
|
+
protocol: "lldp",
|
|
281
|
+
matchKey:
|
|
282
|
+
NetworkTopologyUtil.normalizeKey(neighbor.remoteSysName) ||
|
|
283
|
+
NetworkTopologyUtil.normalizeKey(neighbor.remoteChassisId),
|
|
284
|
+
displayName: neighbor.remoteSysName || neighbor.remoteChassisId,
|
|
285
|
+
localInterfaceIndex: neighbor.localInterfaceIndex,
|
|
286
|
+
remotePortId: neighbor.remotePortId,
|
|
287
|
+
remotePlatform: undefined,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
for (const neighbor of device.cdpNeighbors || []) {
|
|
292
|
+
claims.push({
|
|
293
|
+
protocol: "cdp",
|
|
294
|
+
matchKey: NetworkTopologyUtil.normalizeKey(neighbor.remoteDeviceId),
|
|
295
|
+
displayName: neighbor.remoteDeviceId,
|
|
296
|
+
localInterfaceIndex: neighbor.localInterfaceIndex,
|
|
297
|
+
remotePortId: neighbor.remotePortId,
|
|
298
|
+
remotePlatform: neighbor.remotePlatform,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return claims;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Existing fields win; the incoming report only fills what's missing.
|
|
306
|
+
private static mergeEndpoints(
|
|
307
|
+
existing: NetworkTopologyEdgeEndpoint | undefined,
|
|
308
|
+
incoming: NetworkTopologyEdgeEndpoint | undefined,
|
|
309
|
+
): NetworkTopologyEdgeEndpoint | undefined {
|
|
310
|
+
if (!existing) {
|
|
311
|
+
return incoming;
|
|
312
|
+
}
|
|
313
|
+
if (!incoming) {
|
|
314
|
+
return existing;
|
|
315
|
+
}
|
|
316
|
+
return {
|
|
317
|
+
interfaceIndex: existing.interfaceIndex ?? incoming.interfaceIndex,
|
|
318
|
+
interfaceName: existing.interfaceName ?? incoming.interfaceName,
|
|
319
|
+
isOperationallyUp:
|
|
320
|
+
existing.isOperationallyUp ?? incoming.isOperationallyUp,
|
|
321
|
+
isAdministrativelyUp:
|
|
322
|
+
existing.isAdministrativelyUp ?? incoming.isAdministrativelyUp,
|
|
323
|
+
utilizationPercent:
|
|
324
|
+
existing.utilizationPercent ?? incoming.utilizationPercent,
|
|
325
|
+
inRateMbps: existing.inRateMbps ?? incoming.inRateMbps,
|
|
326
|
+
outRateMbps: existing.outRateMbps ?? incoming.outRateMbps,
|
|
327
|
+
errorsPerSecond: existing.errorsPerSecond ?? incoming.errorsPerSecond,
|
|
328
|
+
};
|
|
117
329
|
}
|
|
118
330
|
|
|
119
331
|
private static matchKeysForDevice(
|
|
120
332
|
device: TopologyDeviceInput,
|
|
121
333
|
): Array<string> {
|
|
334
|
+
/*
|
|
335
|
+
* sysName / hostname / name — the identifiers LLDP remoteSysName and
|
|
336
|
+
* CDP remoteDeviceId advertise. Order matters only across devices
|
|
337
|
+
* (last writer wins on a collision), not within one device.
|
|
338
|
+
*/
|
|
122
339
|
const keys: Array<string> = [];
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (sysNameKey) {
|
|
130
|
-
keys.push(sysNameKey);
|
|
131
|
-
}
|
|
132
|
-
if (hostnameKey) {
|
|
133
|
-
keys.push(hostnameKey);
|
|
340
|
+
for (const candidate of [device.sysName, device.hostname, device.name]) {
|
|
341
|
+
const key: string | undefined =
|
|
342
|
+
NetworkTopologyUtil.normalizeKey(candidate);
|
|
343
|
+
if (key && !keys.includes(key)) {
|
|
344
|
+
keys.push(key);
|
|
345
|
+
}
|
|
134
346
|
}
|
|
135
347
|
return keys;
|
|
136
348
|
}
|
package/Utils/ValueFormatter.ts
CHANGED
|
@@ -292,7 +292,28 @@ function formatNumber(value: number): string {
|
|
|
292
292
|
return (Math.round(value * 10) / 10).toString();
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
if (absValue >= 1) {
|
|
296
|
+
return (Math.round(value * 100) / 100).toString();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/*
|
|
300
|
+
* Below 1, fixed two-decimal rounding collapses distinct values onto the
|
|
301
|
+
* same label (0.004 and 0.006 both become "0.01"), which renders chart
|
|
302
|
+
* axes with runs of duplicate ticks. Two significant digits keeps
|
|
303
|
+
* neighbouring ticks distinct at any magnitude.
|
|
304
|
+
*/
|
|
305
|
+
const rounded: number = parseFloat(value.toPrecision(2));
|
|
306
|
+
const asString: string = rounded.toString();
|
|
307
|
+
if (!asString.includes("e") && !asString.includes("E")) {
|
|
308
|
+
return asString;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/*
|
|
312
|
+
* Number.prototype.toString switches to exponential notation below 1e-6
|
|
313
|
+
* ("1.2e-7"), which is unreadable on an axis label — expand it back to
|
|
314
|
+
* plain decimals and trim the trailing zeros toFixed pads with.
|
|
315
|
+
*/
|
|
316
|
+
return rounded.toFixed(20).replace(/0+$/, "").replace(/\.$/, "");
|
|
296
317
|
}
|
|
297
318
|
|
|
298
319
|
/*
|
|
@@ -2,10 +2,14 @@ import Log from "./Log";
|
|
|
2
2
|
import Metric from "./Metric";
|
|
3
3
|
import MetricItemAggMV1m from "./MetricItemAggMV1m";
|
|
4
4
|
import MetricItemAggMV1mByHostV2 from "./MetricItemAggMV1mByHostV2";
|
|
5
|
+
import MetricItemAggMV1mByService from "./MetricItemAggMV1mByService";
|
|
6
|
+
import MetricItemAggMV1mByK8sCluster from "./MetricItemAggMV1mByK8sCluster";
|
|
7
|
+
import MetricItemAggMV1mByContainer from "./MetricItemAggMV1mByContainer";
|
|
5
8
|
import MetricBaselineHourly from "./MetricBaselineHourly";
|
|
6
9
|
import Span from "./Span";
|
|
7
10
|
import ExceptionInstance from "./ExceptionInstance";
|
|
8
11
|
import MonitorLog from "./MonitorLog";
|
|
12
|
+
import NetworkFlow from "./NetworkFlow";
|
|
9
13
|
import Profile from "./Profile";
|
|
10
14
|
import ProfileSample from "./ProfileSample";
|
|
11
15
|
import AuditLog from "./AuditLog";
|
|
@@ -24,9 +28,18 @@ const AnalyticsModels = [
|
|
|
24
28
|
* boot-time schema sync doesn't resurrect the dropped V1 table.
|
|
25
29
|
*/
|
|
26
30
|
MetricItemAggMV1mByHostV2,
|
|
31
|
+
/*
|
|
32
|
+
* Entity-keyed siblings of the host rollup (serviceEntityKey /
|
|
33
|
+
* k8sClusterEntityKey / containerEntityKey), serving the other
|
|
34
|
+
* entity-scoped chart paths in MetricService.
|
|
35
|
+
*/
|
|
36
|
+
MetricItemAggMV1mByService,
|
|
37
|
+
MetricItemAggMV1mByK8sCluster,
|
|
38
|
+
MetricItemAggMV1mByContainer,
|
|
27
39
|
MetricBaselineHourly,
|
|
28
40
|
ExceptionInstance,
|
|
29
41
|
MonitorLog,
|
|
42
|
+
NetworkFlow,
|
|
30
43
|
Profile,
|
|
31
44
|
ProfileSample,
|
|
32
45
|
AuditLog,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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C,SAAyC,EAAE,EAAE;QACjE,OAAO,IAAI,SAAS,EAAE,CAAC,SAAS,KAAK,SAAS,CAAC;IACjD,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAEpC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import AnalyticsBaseModel from "./AnalyticsBaseModel/AnalyticsBaseModel";
|
|
2
|
+
import AnalyticsTableEngine from "../../Types/AnalyticsDatabase/AnalyticsTableEngine";
|
|
3
|
+
import AnalyticsTableName from "../../Types/AnalyticsDatabase/AnalyticsTableName";
|
|
4
|
+
import AnalyticsTableColumn from "../../Types/AnalyticsDatabase/TableColumn";
|
|
5
|
+
import TableColumnType from "../../Types/AnalyticsDatabase/TableColumnType";
|
|
6
|
+
/**
|
|
7
|
+
* Per-(container, minute) pre-aggregated rollup of `MetricItemV3` value
|
|
8
|
+
* samples — sibling of `MetricItemAggMV1mByHostV2`, keyed by the stable
|
|
9
|
+
* 16-hex `containerEntityKey` the ingest pipeline stamps on every row
|
|
10
|
+
* whose resource carries a container identity. Container identity is
|
|
11
|
+
* `container.id` ONLY (see the container resolver in
|
|
12
|
+
* Common/Server/Utils/Telemetry/TelemetryEntity), so the read side can
|
|
13
|
+
* derive the key directly from the incoming `resource.container.id`
|
|
14
|
+
* filter via `keyForContainer` — no registry lookup needed (containers
|
|
15
|
+
* are a membership-only entity type that never mints registry rows).
|
|
16
|
+
*
|
|
17
|
+
* Populated by `MetricItemAggMV1mByContainer_mv` (declared below;
|
|
18
|
+
* created idempotently by boot schema-sync — the service is registered
|
|
19
|
+
* in AnalyticsServices — and backfilled from `MetricItemV3` by the
|
|
20
|
+
* AddMetricEntityMinuteAggregateMaterializedViews migration). Rows whose
|
|
21
|
+
* resource carries no container entity (`containerEntityKey = ''`) are
|
|
22
|
+
* filtered out so the rollup stays small.
|
|
23
|
+
*
|
|
24
|
+
* Read access goes through
|
|
25
|
+
* `MetricService.tryBuildEntityAggregateMVStatement` for single
|
|
26
|
+
* `resource.container.id` equality filters.
|
|
27
|
+
*
|
|
28
|
+
* No CRUD API; read-only infrastructure populated entirely by the MV.
|
|
29
|
+
*/
|
|
30
|
+
export default class MetricItemAggMV1mByContainer extends AnalyticsBaseModel {
|
|
31
|
+
constructor() {
|
|
32
|
+
const projectIdColumn = new AnalyticsTableColumn({
|
|
33
|
+
key: "projectId",
|
|
34
|
+
title: "Project ID",
|
|
35
|
+
description: "ID of project (tenant key, replicated from MetricItemV3)",
|
|
36
|
+
required: true,
|
|
37
|
+
type: TableColumnType.Text,
|
|
38
|
+
isTenantId: true,
|
|
39
|
+
});
|
|
40
|
+
const nameColumn = new AnalyticsTableColumn({
|
|
41
|
+
key: "name",
|
|
42
|
+
title: "Metric Name",
|
|
43
|
+
description: "Metric name (replicated from MetricItemV3)",
|
|
44
|
+
required: true,
|
|
45
|
+
type: TableColumnType.Text,
|
|
46
|
+
});
|
|
47
|
+
const containerEntityKeyColumn = new AnalyticsTableColumn({
|
|
48
|
+
key: "containerEntityKey",
|
|
49
|
+
title: "Container Entity Key",
|
|
50
|
+
description: "Stable 16-hex container entity key (keyForContainer — container.id only) replicated from MetricItemV3.containerEntityKey at insert time. Rows without one are filtered out by the MV's WHERE clause so this column is always populated for rows that exist.",
|
|
51
|
+
required: true,
|
|
52
|
+
type: TableColumnType.Text,
|
|
53
|
+
});
|
|
54
|
+
const bucketTimeColumn = new AnalyticsTableColumn({
|
|
55
|
+
key: "bucketTime",
|
|
56
|
+
title: "Bucket Time",
|
|
57
|
+
description: "Start of the 1-minute bucket this row aggregates. Computed by the MV as toStartOfMinute(time).",
|
|
58
|
+
required: true,
|
|
59
|
+
type: TableColumnType.Date,
|
|
60
|
+
});
|
|
61
|
+
const valueSumStateColumn = new AnalyticsTableColumn({
|
|
62
|
+
key: "valueSumState",
|
|
63
|
+
title: "Sum (state)",
|
|
64
|
+
description: "AggregateFunction(sum, Float64) state for valueSum. Read via sumMerge(valueSumState).",
|
|
65
|
+
required: true,
|
|
66
|
+
type: TableColumnType.AggregateFunction,
|
|
67
|
+
aggregateFunctionDefinition: "sum, Float64",
|
|
68
|
+
});
|
|
69
|
+
const valueCountStateColumn = new AnalyticsTableColumn({
|
|
70
|
+
key: "valueCountState",
|
|
71
|
+
title: "Count (state)",
|
|
72
|
+
description: "AggregateFunction(count, Float64) state for valueCount. Read via countMerge(valueCountState).",
|
|
73
|
+
required: true,
|
|
74
|
+
type: TableColumnType.AggregateFunction,
|
|
75
|
+
aggregateFunctionDefinition: "count, Float64",
|
|
76
|
+
});
|
|
77
|
+
const valueMinStateColumn = new AnalyticsTableColumn({
|
|
78
|
+
key: "valueMinState",
|
|
79
|
+
title: "Min (state)",
|
|
80
|
+
description: "AggregateFunction(min, Float64) state. Read via minMerge(valueMinState).",
|
|
81
|
+
required: true,
|
|
82
|
+
type: TableColumnType.AggregateFunction,
|
|
83
|
+
aggregateFunctionDefinition: "min, Float64",
|
|
84
|
+
});
|
|
85
|
+
const valueMaxStateColumn = new AnalyticsTableColumn({
|
|
86
|
+
key: "valueMaxState",
|
|
87
|
+
title: "Max (state)",
|
|
88
|
+
description: "AggregateFunction(max, Float64) state. Read via maxMerge(valueMaxState).",
|
|
89
|
+
required: true,
|
|
90
|
+
type: TableColumnType.AggregateFunction,
|
|
91
|
+
aggregateFunctionDefinition: "max, Float64",
|
|
92
|
+
});
|
|
93
|
+
const retentionDateColumn = new AnalyticsTableColumn({
|
|
94
|
+
key: "retentionDate",
|
|
95
|
+
title: "Retention Date",
|
|
96
|
+
description: "Date after which this row is eligible for TTL deletion. Computed by the MV as max(retentionDate) per bucket — inherits from the source MetricItemV3 rows.",
|
|
97
|
+
required: true,
|
|
98
|
+
type: TableColumnType.Date,
|
|
99
|
+
});
|
|
100
|
+
super({
|
|
101
|
+
tableName: AnalyticsTableName.MetricItemAggMV1mByContainer,
|
|
102
|
+
tableEngine: AnalyticsTableEngine.AggregatingMergeTree,
|
|
103
|
+
singularName: "Metric 1-Minute Aggregate (By Container Entity Key)",
|
|
104
|
+
pluralName: "Metric 1-Minute Aggregates (By Container Entity Key)",
|
|
105
|
+
tableColumns: [
|
|
106
|
+
projectIdColumn,
|
|
107
|
+
nameColumn,
|
|
108
|
+
containerEntityKeyColumn,
|
|
109
|
+
bucketTimeColumn,
|
|
110
|
+
valueSumStateColumn,
|
|
111
|
+
valueCountStateColumn,
|
|
112
|
+
valueMinStateColumn,
|
|
113
|
+
valueMaxStateColumn,
|
|
114
|
+
retentionDateColumn,
|
|
115
|
+
],
|
|
116
|
+
projections: [],
|
|
117
|
+
/*
|
|
118
|
+
* Per-container materialized view, reading the ingest-stamped
|
|
119
|
+
* `containerEntityKey` scalar column (contract C3) rather than the
|
|
120
|
+
* raw attributes map. Canonical definition; created idempotently by
|
|
121
|
+
* the analytics schema-sync on boot
|
|
122
|
+
* (MetricItemAggMV1mByContainerService is registered in
|
|
123
|
+
* AnalyticsServices, so a wiped ClickHouse volume self-heals) and
|
|
124
|
+
* backfilled by the AddMetricEntityMinuteAggregateMaterializedViews
|
|
125
|
+
* migration. Rows without a container entity are filtered out so
|
|
126
|
+
* the per-container MV stays small.
|
|
127
|
+
*/
|
|
128
|
+
materializedViews: [
|
|
129
|
+
{
|
|
130
|
+
name: "MetricItemAggMV1mByContainer_mv",
|
|
131
|
+
query: `CREATE MATERIALIZED VIEW IF NOT EXISTS MetricItemAggMV1mByContainer_mv
|
|
132
|
+
TO MetricItemAggMV1mByContainer
|
|
133
|
+
AS
|
|
134
|
+
SELECT
|
|
135
|
+
projectId,
|
|
136
|
+
name,
|
|
137
|
+
containerEntityKey,
|
|
138
|
+
toStartOfMinute(time) AS bucketTime,
|
|
139
|
+
sumState(toFloat64(coalesce(value, sum, 0))) AS valueSumState,
|
|
140
|
+
countState(toFloat64(coalesce(value, sum, 0))) AS valueCountState,
|
|
141
|
+
minState(toFloat64(coalesce(value, sum, 0))) AS valueMinState,
|
|
142
|
+
maxState(toFloat64(coalesce(value, sum, 0))) AS valueMaxState,
|
|
143
|
+
max(retentionDate) AS retentionDate
|
|
144
|
+
FROM MetricItemV3
|
|
145
|
+
WHERE containerEntityKey != ''
|
|
146
|
+
GROUP BY projectId, name, containerEntityKey, bucketTime`,
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
sortKeys: ["projectId", "name", "containerEntityKey", "bucketTime"],
|
|
150
|
+
primaryKeys: ["projectId", "name", "containerEntityKey", "bucketTime"],
|
|
151
|
+
partitionKey: "toYYYYMM(bucketTime)",
|
|
152
|
+
// Align with this MV's GROUP BY (projectId, name, containerEntityKey).
|
|
153
|
+
shardingKey: "cityHash64(projectId, name, containerEntityKey)",
|
|
154
|
+
tableSettings: "ttl_only_drop_parts = 1, non_replicated_deduplication_window = 10000",
|
|
155
|
+
ttlExpression: "retentionDate DELETE",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=MetricItemAggMV1mByContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricItemAggMV1mByContainer.js","sourceRoot":"","sources":["../../../../Models/AnalyticsModels/MetricItemAggMV1mByContainer.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,yCAAyC,CAAC;AACzE,OAAO,oBAAoB,MAAM,oDAAoD,CAAC;AACtF,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAClF,OAAO,oBAAoB,MAAM,2CAA2C,CAAC;AAC7E,OAAO,eAAe,MAAM,+CAA+C,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,kBAAkB;IAC1E;QACE,MAAM,eAAe,GAAyB,IAAI,oBAAoB,CAAC;YACrE,GAAG,EAAE,WAAW;YAChB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