@oneuptime/common 11.4.1 → 11.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/AIRun.ts +50 -0
- package/Models/DatabaseModels/AlertSeverity.ts +6 -0
- package/Models/DatabaseModels/IncidentSeverity.ts +6 -0
- package/Models/DatabaseModels/Index.ts +16 -0
- package/Models/DatabaseModels/IoTDeviceCredential.ts +471 -0
- package/Models/DatabaseModels/LlmLog.ts +56 -0
- package/Models/DatabaseModels/LlmProvider.ts +33 -0
- package/Models/DatabaseModels/NetworkDevice.ts +1385 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +717 -0
- package/Models/DatabaseModels/NetworkDeviceLabelRule.ts +514 -0
- package/Models/DatabaseModels/NetworkDeviceOwnerRule.ts +596 -0
- package/Models/DatabaseModels/NetworkDeviceOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/NetworkDeviceOwnerUser.ts +486 -0
- package/Models/DatabaseModels/NetworkInterface.ts +563 -0
- package/Models/DatabaseModels/Project.ts +145 -0
- package/Models/DatabaseModels/TelemetryEntityRelationship.ts +54 -0
- package/Server/API/AIInvestigationAPI.ts +131 -63
- package/Server/API/AlertAPI.ts +5 -0
- package/Server/API/IncidentAPI.ts +10 -0
- package/Server/API/IncidentEpisodeAPI.ts +5 -0
- package/Server/API/LlmProviderAPI.ts +4 -0
- package/Server/API/ScheduledMaintenanceAPI.ts +5 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.ts +15 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.ts +192 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.ts +37 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.ts +79 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +24 -0
- package/Server/Services/AIRunService.ts +58 -0
- package/Server/Services/AIService.ts +101 -0
- package/Server/Services/IncidentService.ts +14 -41
- package/Server/Services/Index.ts +14 -0
- package/Server/Services/IoTDeviceCredentialService.ts +351 -0
- package/Server/Services/IoTDeviceService.ts +64 -21
- package/Server/Services/LlmLogService.ts +26 -0
- package/Server/Services/LlmProviderService.ts +3 -0
- package/Server/Services/MonitorService.ts +4 -1
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +10 -0
- package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +204 -0
- package/Server/Services/NetworkDeviceLabelRuleService.ts +14 -0
- package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +222 -0
- package/Server/Services/NetworkDeviceOwnerRuleService.ts +14 -0
- package/Server/Services/NetworkDeviceOwnerTeamService.ts +10 -0
- package/Server/Services/NetworkDeviceOwnerUserService.ts +10 -0
- package/Server/Services/NetworkDeviceService.ts +50 -0
- package/Server/Services/NetworkInterfaceService.ts +10 -0
- package/Server/Services/TelemetryEntityRelationshipService.ts +23 -0
- package/Server/Services/TelemetryEntityService.ts +72 -2
- package/Server/Utils/AI/Sentinel/AlertInvestigationRunner.ts +244 -12
- package/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.ts +92 -19
- package/Server/Utils/AI/Sentinel/InvestigationQueue.ts +493 -0
- package/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.ts +88 -68
- package/Server/Utils/AI/Toolbox/Index.ts +2 -1
- package/Server/Utils/AI/Toolbox/MetricTools.ts +391 -0
- package/Server/Utils/LLM/LLMService.ts +21 -0
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +170 -2
- package/Server/Utils/Monitor/IoTDeviceAbsenceSeries.ts +101 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +15 -3
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +1 -1
- package/Server/Utils/Monitor/MonitorIncident.ts +19 -3
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +87 -0
- package/Server/Utils/Monitor/MonitorResource.ts +77 -21
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +1 -1
- package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +201 -0
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +215 -0
- package/Server/Utils/Monitor/SnmpInterfaceRateUtil.ts +169 -0
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +173 -0
- package/Tests/Server/Services/IncidentInternalNoteAnnouncement.test.ts +97 -0
- package/Tests/Server/Services/IoTDeviceService.test.ts +54 -0
- package/Tests/Server/Utils/AI/BaselineAnomalyTool.test.ts +253 -0
- package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +44 -0
- package/Tests/Server/Utils/AI/SentinelAlertGating.test.ts +360 -0
- package/Tests/Server/Utils/AI/SentinelInvestigationQueue.test.ts +295 -0
- package/Tests/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.test.ts +59 -0
- package/Tests/Server/Utils/Monitor/IoTDeviceAbsenceSeries.test.ts +113 -0
- package/Tests/Server/Utils/Monitor/PerSeriesRecoveryResolution.test.ts +198 -0
- package/Tests/Types/Monitor/MonitorType.test.ts +1 -1
- package/Tests/Utils/Monitor/LatencyMatrixUtil.test.ts +111 -0
- package/Types/AI/AIRunStatus.ts +9 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +0 -1
- package/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.ts +8 -3
- package/Types/LlmLogStatus.ts +1 -0
- package/Types/Monitor/CriteriaFilter.ts +5 -0
- package/Types/Monitor/IotAlertTemplates.ts +22 -3
- package/Types/Monitor/LatencyMatrix.ts +27 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +2 -2
- package/Types/Monitor/MonitorMetricType.ts +10 -0
- package/Types/Monitor/MonitorStep.ts +36 -11
- package/Types/Monitor/MonitorStepNetworkDeviceMonitor.ts +55 -0
- package/Types/Monitor/MonitorStepSnmpMonitor.ts +8 -0
- package/Types/Monitor/MonitorType.ts +14 -9
- package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +12 -0
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.ts +116 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +29 -0
- package/Types/Monitor/SnmpMonitor/SnmpInterface.ts +31 -0
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.ts +24 -0
- package/Types/Monitor/SnmpMonitor/SnmpTrap.ts +20 -0
- package/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.ts +173 -0
- package/Types/Permission.ts +314 -0
- package/Types/Probe/ProbeMonitorResponse.ts +8 -0
- package/UI/Components/Icon/Icon.tsx +8 -6
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +2 -2
- package/UI/Components/Tabs/Tabs.tsx +10 -1
- package/UI/Utils/Navigation.ts +10 -1
- package/Utils/Dashboard/Components/DashboardLogChartComponent.ts +16 -21
- package/Utils/Monitor/LatencyMatrixUtil.ts +162 -0
- package/Utils/Monitor/MonitorMetricType.ts +71 -1
- package/Utils/Monitor/NetworkTopologyUtil.ts +159 -0
- package/Utils/Telemetry/EntityRelationship.ts +11 -0
- package/build/dist/Models/DatabaseModels/AIRun.js +52 -0
- package/build/dist/Models/DatabaseModels/AIRun.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +6 -0
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +6 -0
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +16 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IoTDeviceCredential.js +493 -0
- package/build/dist/Models/DatabaseModels/IoTDeviceCredential.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LlmLog.js +58 -0
- package/build/dist/Models/DatabaseModels/LlmLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmProvider.js +33 -0
- package/build/dist/Models/DatabaseModels/LlmProvider.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +1426 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +738 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkInterface.js +589 -0
- package/build/dist/Models/DatabaseModels/NetworkInterface.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Project.js +147 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js +57 -0
- package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js.map +1 -1
- package/build/dist/Server/API/AIInvestigationAPI.js +95 -55
- package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +5 -0
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +10 -0
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +5 -0
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/LlmProviderAPI.js +5 -7
- package/build/dist/Server/API/LlmProviderAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +5 -0
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.js +51 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.js +101 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AIRunService.js +33 -0
- package/build/dist/Server/Services/AIRunService.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +82 -9
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +14 -25
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +14 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/IoTDeviceCredentialService.js +321 -0
- package/build/dist/Server/Services/IoTDeviceCredentialService.js.map +1 -0
- package/build/dist/Server/Services/IoTDeviceService.js +49 -15
- package/build/dist/Server/Services/IoTDeviceService.js.map +1 -1
- package/build/dist/Server/Services/LlmLogService.js +29 -0
- package/build/dist/Server/Services/LlmLogService.js.map +1 -1
- package/build/dist/Server/Services/LlmProviderService.js +3 -0
- package/build/dist/Server/Services/LlmProviderService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +2 -1
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +9 -0
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleService.js +13 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js +9 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceService.js +52 -0
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js +9 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -0
- package/build/dist/Server/Services/TelemetryEntityRelationshipService.js +22 -0
- package/build/dist/Server/Services/TelemetryEntityRelationshipService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryEntityService.js +64 -2
- package/build/dist/Server/Services/TelemetryEntityService.js.map +1 -1
- package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js +189 -9
- package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js +84 -17
- package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Sentinel/InvestigationQueue.js +428 -0
- package/build/dist/Server/Utils/AI/Sentinel/InvestigationQueue.js.map +1 -0
- package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js +63 -47
- package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +2 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js +300 -0
- package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js.map +1 -1
- package/build/dist/Server/Utils/LLM/LLMService.js +16 -0
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +130 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/IoTDeviceAbsenceSeries.js +81 -0
- package/build/dist/Server/Utils/Monitor/IoTDeviceAbsenceSeries.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +18 -7
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +25 -10
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +69 -3
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +76 -30
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +147 -0
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +167 -0
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/SnmpInterfaceRateUtil.js +93 -0
- package/build/dist/Server/Utils/Monitor/SnmpInterfaceRateUtil.js.map +1 -0
- package/build/dist/Types/AI/AIRunStatus.js +9 -0
- package/build/dist/Types/AI/AIRunStatus.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +0 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/LlmLogStatus.js +1 -0
- package/build/dist/Types/LlmLogStatus.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +5 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/IotAlertTemplates.js +7 -7
- package/build/dist/Types/Monitor/IotAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/LatencyMatrix.js +2 -0
- package/build/dist/Types/Monitor/LatencyMatrix.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +2 -2
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorMetricType.js +9 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +22 -9
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepNetworkDeviceMonitor.js +36 -0
- package/build/dist/Types/Monitor/MonitorStepNetworkDeviceMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js +3 -0
- package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +14 -9
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/LldpNeighbor.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/LldpNeighbor.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +89 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkTopology.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkTopology.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpInterface.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpInterface.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpTrap.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpTrap.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js +137 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js.map +1 -0
- package/build/dist/Types/Permission.js +280 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +8 -6
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +2 -2
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Components/Tabs/Tabs.js +3 -1
- package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
- package/build/dist/UI/Utils/Navigation.js +11 -1
- package/build/dist/UI/Utils/Navigation.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js +17 -20
- package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js.map +1 -1
- package/build/dist/Utils/Monitor/LatencyMatrixUtil.js +89 -0
- package/build/dist/Utils/Monitor/LatencyMatrixUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js +68 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +112 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -0
- package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
- package/package.json +1 -1
|
@@ -2938,18 +2938,20 @@ const Icon: FunctionComponent<ComponentProps> = ({
|
|
|
2938
2938
|
);
|
|
2939
2939
|
} else if (icon === IconProp.Podman) {
|
|
2940
2940
|
/*
|
|
2941
|
-
* Podman mark — a
|
|
2942
|
-
*
|
|
2943
|
-
*
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2941
|
+
* Podman mark — a clean side-profile silhouette of Podman's seal mascot:
|
|
2942
|
+
* head raised with a visible eye, an arched back, and trailing tail
|
|
2943
|
+
* flippers. The official emblem (a finely detailed seal inside a hexagonal
|
|
2944
|
+
* frame) collapses into an illegible blob at small sizes, so this reads as
|
|
2945
|
+
* a recognizable little sea creature down to ~16px and sits well beside the
|
|
2946
|
+
* other resource brand logos (Docker / Proxmox / Ceph). The eye is punched
|
|
2947
|
+
* out via the even-odd fill rule.
|
|
2946
2948
|
*/
|
|
2947
2949
|
return getSvgWrapper(
|
|
2948
2950
|
<path
|
|
2949
2951
|
fill="currentColor"
|
|
2950
2952
|
stroke="none"
|
|
2951
2953
|
fillRule="evenodd"
|
|
2952
|
-
d="M6.
|
|
2954
|
+
d="M6.6 8.4C6.2 6.6 7.4 5 9.2 4.9c1.6-.1 2.9 1 3.5 2.2.7-.5 1.7-.7 2.5-.2.6.36.8 1.06.5 1.6 1.9 1.3 3.2 3.4 3.6 5.9.9-.15 1.9.15 2.3.95.35.75-.2 1.45-1.1 1.7-1.5.42-3.2-.15-4.1-1.5-.3.95-.9 1.75-1.7 2.25 1.2.5 2 1.2 1.6 2-.3.6-1.2.7-2.2.4-1.7-.5-3-1.9-3.4-3.6-.9.9-2.2 1.4-3.5 1.3-1-.1-1.5-.8-1.2-1.5.25-.6.9-.9 1.6-1-1-1.5-1.5-3.4-1.4-5.3-.6-.3-1.05-.85-1.1-1.55ZM8.4 8a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"
|
|
2953
2955
|
/>,
|
|
2954
2956
|
);
|
|
2955
2957
|
} else if (icon === IconProp.Proxmox) {
|
|
@@ -10,6 +10,11 @@ import React, {
|
|
|
10
10
|
export interface ComponentProps {
|
|
11
11
|
tabs: Array<Tab>;
|
|
12
12
|
onTabChange: (tab: Tab) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Tab selected on first render (e.g. restored from a URL param).
|
|
15
|
+
* Falls back to the first tab when absent or unknown.
|
|
16
|
+
*/
|
|
17
|
+
initialTabName?: string | undefined;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
const Tabs: FunctionComponent<ComponentProps> = (
|
|
@@ -88,7 +93,11 @@ const Tabs: FunctionComponent<ComponentProps> = (
|
|
|
88
93
|
|
|
89
94
|
if (!hasInitialized.current && props.tabs.length > 0) {
|
|
90
95
|
hasInitialized.current = true;
|
|
91
|
-
setCurrentTabName(
|
|
96
|
+
setCurrentTabName(
|
|
97
|
+
props.initialTabName && tabNames.includes(props.initialTabName)
|
|
98
|
+
? props.initialTabName
|
|
99
|
+
: props.tabs[0]!.name,
|
|
100
|
+
);
|
|
92
101
|
return;
|
|
93
102
|
}
|
|
94
103
|
|
package/UI/Utils/Navigation.ts
CHANGED
|
@@ -102,7 +102,16 @@ abstract class Navigation {
|
|
|
102
102
|
(queryString ? `?${queryString}` : "") +
|
|
103
103
|
window.location.hash;
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
try {
|
|
106
|
+
window.history.replaceState(window.history.state, "", newRelativeUrl);
|
|
107
|
+
} catch {
|
|
108
|
+
/*
|
|
109
|
+
* Safari throws SecurityError when replaceState is called >100
|
|
110
|
+
* times / 30s (e.g. fast typing into a URL-synced search box).
|
|
111
|
+
* React state stays authoritative; the URL re-syncs on the next
|
|
112
|
+
* successful write.
|
|
113
|
+
*/
|
|
114
|
+
}
|
|
106
115
|
}
|
|
107
116
|
|
|
108
117
|
public static getParamByName(
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
ComponentArgument,
|
|
8
8
|
ComponentArgumentSection,
|
|
9
9
|
ComponentInputType,
|
|
10
|
-
EntityFilterModelType,
|
|
11
10
|
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
12
11
|
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
12
|
+
import DashboardChartType from "../../../Types/Dashboard/Chart/ChartType";
|
|
13
13
|
|
|
14
14
|
const DisplaySection: ComponentArgumentSection = {
|
|
15
15
|
name: "Display Options",
|
|
16
|
-
description: "Configure the chart heading",
|
|
16
|
+
description: "Configure the chart heading and visualization",
|
|
17
17
|
order: 1,
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -35,7 +35,9 @@ export default class DashboardLogChartComponentUtil extends DashboardBaseCompone
|
|
|
35
35
|
componentId: ObjectID.generate(),
|
|
36
36
|
minHeightInDashboardUnits: 3,
|
|
37
37
|
minWidthInDashboardUnits: 6,
|
|
38
|
-
arguments: {
|
|
38
|
+
arguments: {
|
|
39
|
+
chartType: DashboardChartType.Bar,
|
|
40
|
+
},
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -53,14 +55,17 @@ export default class DashboardLogChartComponentUtil extends DashboardBaseCompone
|
|
|
53
55
|
section: DisplaySection,
|
|
54
56
|
},
|
|
55
57
|
{
|
|
56
|
-
name: "
|
|
57
|
-
description: "
|
|
58
|
-
required:
|
|
59
|
-
type: ComponentInputType.
|
|
60
|
-
id: "
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
name: "Chart Type",
|
|
59
|
+
description: "How log volume is visualized over time",
|
|
60
|
+
required: true,
|
|
61
|
+
type: ComponentInputType.Dropdown,
|
|
62
|
+
id: "chartType",
|
|
63
|
+
section: DisplaySection,
|
|
64
|
+
dropdownOptions: [
|
|
65
|
+
{ label: "Bar Chart", value: DashboardChartType.Bar },
|
|
66
|
+
{ label: "Line Chart", value: DashboardChartType.Line },
|
|
67
|
+
{ label: "Area Chart", value: DashboardChartType.Area },
|
|
68
|
+
],
|
|
64
69
|
},
|
|
65
70
|
{
|
|
66
71
|
name: "Severities",
|
|
@@ -89,16 +94,6 @@ export default class DashboardLogChartComponentUtil extends DashboardBaseCompone
|
|
|
89
94
|
placeholder: "Search text...",
|
|
90
95
|
section: FiltersSection,
|
|
91
96
|
},
|
|
92
|
-
{
|
|
93
|
-
name: "Attribute Filters",
|
|
94
|
-
description:
|
|
95
|
-
"Exact attribute matches, e.g. @service.name:checkout @deployment.environment:production",
|
|
96
|
-
required: false,
|
|
97
|
-
type: ComponentInputType.LongText,
|
|
98
|
-
id: "attributeFilterQuery",
|
|
99
|
-
placeholder: "@key:value @another.key:value",
|
|
100
|
-
section: FiltersSection,
|
|
101
|
-
},
|
|
102
97
|
];
|
|
103
98
|
}
|
|
104
99
|
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import LatencyMatrix, {
|
|
2
|
+
LatencyMatrixAxisItem,
|
|
3
|
+
LatencyMatrixCell,
|
|
4
|
+
} from "../../Types/Monitor/LatencyMatrix";
|
|
5
|
+
import { JSONObject } from "../../Types/JSON";
|
|
6
|
+
|
|
7
|
+
export interface LatencyMatrixMonitorInput {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface LatencyMatrixProbeInput {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface LatencyMatrixProbeResult {
|
|
18
|
+
monitorId: string;
|
|
19
|
+
probeId: string;
|
|
20
|
+
/*
|
|
21
|
+
* MonitorProbe.lastMonitoringLog: a map of monitorStepId -> the last
|
|
22
|
+
* ProbeMonitorResponse for that step. The matrix uses the most recently
|
|
23
|
+
* monitored step's response time and online state.
|
|
24
|
+
*/
|
|
25
|
+
lastMonitoringLog?: JSONObject | undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default class LatencyMatrixUtil {
|
|
29
|
+
/*
|
|
30
|
+
* Shapes probe/monitor axes plus each monitor-probe pair's last-check
|
|
31
|
+
* snapshot into a dense grid. Pure over its inputs so it's unit-testable
|
|
32
|
+
* without a database.
|
|
33
|
+
*/
|
|
34
|
+
public static buildMatrix(data: {
|
|
35
|
+
monitors: Array<LatencyMatrixMonitorInput>;
|
|
36
|
+
probes: Array<LatencyMatrixProbeInput>;
|
|
37
|
+
results: Array<LatencyMatrixProbeResult>;
|
|
38
|
+
now: Date;
|
|
39
|
+
}): LatencyMatrix {
|
|
40
|
+
const monitors: Array<LatencyMatrixAxisItem> = data.monitors.map(
|
|
41
|
+
(monitor: LatencyMatrixMonitorInput) => {
|
|
42
|
+
return { id: monitor.id, name: monitor.name };
|
|
43
|
+
},
|
|
44
|
+
);
|
|
45
|
+
const probes: Array<LatencyMatrixAxisItem> = data.probes.map(
|
|
46
|
+
(probe: LatencyMatrixProbeInput) => {
|
|
47
|
+
return { id: probe.id, name: probe.name };
|
|
48
|
+
},
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const cells: Record<string, Record<string, LatencyMatrixCell>> = {};
|
|
52
|
+
|
|
53
|
+
// Seed every cell as "no data" so the grid is dense.
|
|
54
|
+
for (const monitor of monitors) {
|
|
55
|
+
cells[monitor.id] = {};
|
|
56
|
+
for (const probe of probes) {
|
|
57
|
+
cells[monitor.id]![probe.id] = {
|
|
58
|
+
monitorId: monitor.id,
|
|
59
|
+
probeId: probe.id,
|
|
60
|
+
hasData: false,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
for (const result of data.results) {
|
|
66
|
+
const row: Record<string, LatencyMatrixCell> | undefined =
|
|
67
|
+
cells[result.monitorId];
|
|
68
|
+
if (!row || !row[result.probeId]) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const latest: {
|
|
73
|
+
latencyInMs?: number | undefined;
|
|
74
|
+
isOnline?: boolean | undefined;
|
|
75
|
+
monitoredAt?: Date | undefined;
|
|
76
|
+
} | null = LatencyMatrixUtil.extractLatest(result.lastMonitoringLog);
|
|
77
|
+
|
|
78
|
+
if (!latest) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const cell: LatencyMatrixCell = {
|
|
83
|
+
monitorId: result.monitorId,
|
|
84
|
+
probeId: result.probeId,
|
|
85
|
+
hasData: true,
|
|
86
|
+
latencyInMs: latest.latencyInMs,
|
|
87
|
+
isOnline: latest.isOnline,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
if (latest.monitoredAt) {
|
|
91
|
+
cell.ageInSeconds = Math.max(
|
|
92
|
+
0,
|
|
93
|
+
Math.round(
|
|
94
|
+
(data.now.getTime() - new Date(latest.monitoredAt).getTime()) /
|
|
95
|
+
1000,
|
|
96
|
+
),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
row[result.probeId] = cell;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return { monitors, probes, cells };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* Picks the most-recently-monitored step from a lastMonitoringLog and
|
|
108
|
+
* returns its latency / online / timestamp. Returns null when the log is
|
|
109
|
+
* empty or malformed.
|
|
110
|
+
*/
|
|
111
|
+
private static extractLatest(log: JSONObject | undefined): {
|
|
112
|
+
latencyInMs?: number | undefined;
|
|
113
|
+
isOnline?: boolean | undefined;
|
|
114
|
+
monitoredAt?: Date | undefined;
|
|
115
|
+
} | null {
|
|
116
|
+
if (!log || typeof log !== "object") {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
let best: {
|
|
121
|
+
latencyInMs?: number | undefined;
|
|
122
|
+
isOnline?: boolean | undefined;
|
|
123
|
+
monitoredAt?: Date | undefined;
|
|
124
|
+
} | null = null;
|
|
125
|
+
let bestTime: number = -Infinity;
|
|
126
|
+
|
|
127
|
+
for (const stepId of Object.keys(log)) {
|
|
128
|
+
const response: JSONObject | undefined = log[stepId] as
|
|
129
|
+
| JSONObject
|
|
130
|
+
| undefined;
|
|
131
|
+
if (!response || typeof response !== "object") {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const monitoredAtValue: unknown = response["monitoredAt"];
|
|
136
|
+
const monitoredAt: Date | undefined = monitoredAtValue
|
|
137
|
+
? new Date(monitoredAtValue as string)
|
|
138
|
+
: undefined;
|
|
139
|
+
const time: number =
|
|
140
|
+
monitoredAt && !isNaN(monitoredAt.getTime())
|
|
141
|
+
? monitoredAt.getTime()
|
|
142
|
+
: 0;
|
|
143
|
+
|
|
144
|
+
if (time >= bestTime) {
|
|
145
|
+
bestTime = time;
|
|
146
|
+
const latencyValue: unknown = response["responseTimeInMs"];
|
|
147
|
+
const onlineValue: unknown = response["isOnline"];
|
|
148
|
+
best = {
|
|
149
|
+
latencyInMs:
|
|
150
|
+
typeof latencyValue === "number" ? latencyValue : undefined,
|
|
151
|
+
isOnline: typeof onlineValue === "boolean" ? onlineValue : undefined,
|
|
152
|
+
monitoredAt:
|
|
153
|
+
monitoredAt && !isNaN(monitoredAt.getTime())
|
|
154
|
+
? monitoredAt
|
|
155
|
+
: undefined,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return best;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -43,6 +43,14 @@ class MonitorMetricTypeUtil {
|
|
|
43
43
|
case MonitorMetricType.TimeToFirstByte:
|
|
44
44
|
case MonitorMetricType.DownloadTime:
|
|
45
45
|
return AggregationType.Avg;
|
|
46
|
+
case MonitorMetricType.SnmpInterfaceOperStatus:
|
|
47
|
+
return AggregationType.Min;
|
|
48
|
+
case MonitorMetricType.SnmpInterfaceInBitsPerSecond:
|
|
49
|
+
case MonitorMetricType.SnmpInterfaceOutBitsPerSecond:
|
|
50
|
+
case MonitorMetricType.SnmpInterfaceErrorsPerSecond:
|
|
51
|
+
return AggregationType.Avg;
|
|
52
|
+
case MonitorMetricType.SnmpInterfaceUtilizationPercent:
|
|
53
|
+
return AggregationType.Max;
|
|
46
54
|
|
|
47
55
|
/*
|
|
48
56
|
* Extended server/VM metrics. Cumulative counters (bytes/packets/ops since
|
|
@@ -197,9 +205,20 @@ class MonitorMetricTypeUtil {
|
|
|
197
205
|
];
|
|
198
206
|
}
|
|
199
207
|
|
|
208
|
+
if (monitorType === MonitorType.NetworkDevice) {
|
|
209
|
+
return [
|
|
210
|
+
MonitorMetricType.IsOnline,
|
|
211
|
+
MonitorMetricType.ResponseTime,
|
|
212
|
+
MonitorMetricType.SnmpInterfaceOperStatus,
|
|
213
|
+
MonitorMetricType.SnmpInterfaceInBitsPerSecond,
|
|
214
|
+
MonitorMetricType.SnmpInterfaceOutBitsPerSecond,
|
|
215
|
+
MonitorMetricType.SnmpInterfaceUtilizationPercent,
|
|
216
|
+
MonitorMetricType.SnmpInterfaceErrorsPerSecond,
|
|
217
|
+
];
|
|
218
|
+
}
|
|
219
|
+
|
|
200
220
|
if (
|
|
201
221
|
monitorType === MonitorType.Port ||
|
|
202
|
-
monitorType === MonitorType.SNMP ||
|
|
203
222
|
monitorType === MonitorType.DNS ||
|
|
204
223
|
monitorType === MonitorType.DNSSEC ||
|
|
205
224
|
monitorType === MonitorType.Domain ||
|
|
@@ -285,6 +304,28 @@ class MonitorMetricTypeUtil {
|
|
|
285
304
|
];
|
|
286
305
|
}
|
|
287
306
|
|
|
307
|
+
if (monitorType === MonitorType.NetworkDevice) {
|
|
308
|
+
return [
|
|
309
|
+
{
|
|
310
|
+
title: "Availability",
|
|
311
|
+
description: "Device reachability and SNMP response time.",
|
|
312
|
+
metrics: [MonitorMetricType.IsOnline, MonitorMetricType.ResponseTime],
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
title: "Interfaces",
|
|
316
|
+
description:
|
|
317
|
+
"Per-interface status, bandwidth, utilization, and errors. One series per interface.",
|
|
318
|
+
metrics: [
|
|
319
|
+
MonitorMetricType.SnmpInterfaceOperStatus,
|
|
320
|
+
MonitorMetricType.SnmpInterfaceInBitsPerSecond,
|
|
321
|
+
MonitorMetricType.SnmpInterfaceOutBitsPerSecond,
|
|
322
|
+
MonitorMetricType.SnmpInterfaceUtilizationPercent,
|
|
323
|
+
MonitorMetricType.SnmpInterfaceErrorsPerSecond,
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
];
|
|
327
|
+
}
|
|
328
|
+
|
|
288
329
|
// Other monitor types keep the single-card layout.
|
|
289
330
|
const metrics: Array<MonitorMetricType> =
|
|
290
331
|
this.getMonitorMetricTypesByMonitorType(monitorType);
|
|
@@ -332,6 +373,16 @@ class MonitorMetricTypeUtil {
|
|
|
332
373
|
return "Time to First Byte";
|
|
333
374
|
case MonitorMetricType.DownloadTime:
|
|
334
375
|
return "Download Time";
|
|
376
|
+
case MonitorMetricType.SnmpInterfaceOperStatus:
|
|
377
|
+
return "Interface Status";
|
|
378
|
+
case MonitorMetricType.SnmpInterfaceInBitsPerSecond:
|
|
379
|
+
return "Interface Inbound Bandwidth";
|
|
380
|
+
case MonitorMetricType.SnmpInterfaceOutBitsPerSecond:
|
|
381
|
+
return "Interface Outbound Bandwidth";
|
|
382
|
+
case MonitorMetricType.SnmpInterfaceUtilizationPercent:
|
|
383
|
+
return "Interface Utilization";
|
|
384
|
+
case MonitorMetricType.SnmpInterfaceErrorsPerSecond:
|
|
385
|
+
return "Interface Errors";
|
|
335
386
|
case MonitorMetricType.LoadAverage1Min:
|
|
336
387
|
return "Load Average (1 minute)";
|
|
337
388
|
case MonitorMetricType.LoadAverage5Min:
|
|
@@ -424,6 +475,15 @@ class MonitorMetricTypeUtil {
|
|
|
424
475
|
case MonitorMetricType.TimeToFirstByte:
|
|
425
476
|
case MonitorMetricType.DownloadTime:
|
|
426
477
|
return "ms";
|
|
478
|
+
case MonitorMetricType.SnmpInterfaceOperStatus:
|
|
479
|
+
return "";
|
|
480
|
+
case MonitorMetricType.SnmpInterfaceInBitsPerSecond:
|
|
481
|
+
case MonitorMetricType.SnmpInterfaceOutBitsPerSecond:
|
|
482
|
+
return "bps";
|
|
483
|
+
case MonitorMetricType.SnmpInterfaceUtilizationPercent:
|
|
484
|
+
return "%";
|
|
485
|
+
case MonitorMetricType.SnmpInterfaceErrorsPerSecond:
|
|
486
|
+
return "errors/s";
|
|
427
487
|
case MonitorMetricType.LoadAverage1Min:
|
|
428
488
|
case MonitorMetricType.LoadAverage5Min:
|
|
429
489
|
case MonitorMetricType.LoadAverage15Min:
|
|
@@ -494,6 +554,16 @@ class MonitorMetricTypeUtil {
|
|
|
494
554
|
return "Time from the end of connection setup until the first byte of the response arrived — the server-side processing time.";
|
|
495
555
|
case MonitorMetricType.DownloadTime:
|
|
496
556
|
return "Time spent receiving the response body after the first byte arrived.";
|
|
557
|
+
case MonitorMetricType.SnmpInterfaceOperStatus:
|
|
558
|
+
return "Operational status of each interface: 1 when up, 0 when down. Interfaces that are administratively disabled also report 0.";
|
|
559
|
+
case MonitorMetricType.SnmpInterfaceInBitsPerSecond:
|
|
560
|
+
return "Inbound traffic per interface, computed from the delta of IF-MIB octet counters between checks.";
|
|
561
|
+
case MonitorMetricType.SnmpInterfaceOutBitsPerSecond:
|
|
562
|
+
return "Outbound traffic per interface, computed from the delta of IF-MIB octet counters between checks.";
|
|
563
|
+
case MonitorMetricType.SnmpInterfaceUtilizationPercent:
|
|
564
|
+
return "Traffic in the busiest direction as a percentage of the interface's reported speed. Sustained values above 80% typically mean the link needs an upgrade.";
|
|
565
|
+
case MonitorMetricType.SnmpInterfaceErrorsPerSecond:
|
|
566
|
+
return "Combined inbound and outbound errors per second per interface. A non-zero rate usually points to cabling, SFP, or duplex problems.";
|
|
497
567
|
case MonitorMetricType.LoadAverage1Min:
|
|
498
568
|
return "Average number of runnable or uninterruptible processes over the last 1 minute. Values persistently above the number of CPU cores indicate CPU saturation.";
|
|
499
569
|
case MonitorMetricType.LoadAverage5Min:
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import NetworkTopology, {
|
|
2
|
+
NetworkTopologyEdge,
|
|
3
|
+
NetworkTopologyNode,
|
|
4
|
+
NetworkTopologyNodeStatus,
|
|
5
|
+
} from "../../Types/Monitor/SnmpMonitor/NetworkTopology";
|
|
6
|
+
import LldpNeighbor from "../../Types/Monitor/SnmpMonitor/LldpNeighbor";
|
|
7
|
+
|
|
8
|
+
export interface TopologyDeviceInput {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
hostname?: string | undefined;
|
|
12
|
+
sysName?: string | undefined;
|
|
13
|
+
lastSeenAt?: Date | undefined;
|
|
14
|
+
interfacesUp?: number | undefined;
|
|
15
|
+
interfacesDown?: number | undefined;
|
|
16
|
+
lldpNeighbors?: Array<LldpNeighbor> | undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// A device not seen within this window is treated as not currently up.
|
|
20
|
+
const FRESH_WINDOW_MS: number = 15 * 60 * 1000;
|
|
21
|
+
|
|
22
|
+
export default class NetworkTopologyUtil {
|
|
23
|
+
/*
|
|
24
|
+
* Builds the topology graph from every device in a project. Nodes are the
|
|
25
|
+
* devices; LLDP neighbors that match another device (by sysName or
|
|
26
|
+
* hostname) become edges, and neighbors that match nothing become
|
|
27
|
+
* lightweight "unmanaged" nodes so links don't dead-end. Edges are
|
|
28
|
+
* undirected and deduplicated, so a link reported from both ends appears
|
|
29
|
+
* once.
|
|
30
|
+
*/
|
|
31
|
+
public static buildTopology(
|
|
32
|
+
devices: Array<TopologyDeviceInput>,
|
|
33
|
+
now: Date,
|
|
34
|
+
): NetworkTopology {
|
|
35
|
+
const nodes: Array<NetworkTopologyNode> = [];
|
|
36
|
+
const edges: Array<NetworkTopologyEdge> = [];
|
|
37
|
+
|
|
38
|
+
// Index managed devices by the identifiers LLDP neighbors reference.
|
|
39
|
+
const deviceByMatchKey: Map<string, TopologyDeviceInput> = new Map();
|
|
40
|
+
for (const device of devices) {
|
|
41
|
+
for (const key of NetworkTopologyUtil.matchKeysForDevice(device)) {
|
|
42
|
+
deviceByMatchKey.set(key, device);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (const device of devices) {
|
|
47
|
+
nodes.push({
|
|
48
|
+
id: device.id,
|
|
49
|
+
name: device.name,
|
|
50
|
+
isManaged: true,
|
|
51
|
+
status: NetworkTopologyUtil.deviceStatus(device, now),
|
|
52
|
+
interfacesUp: device.interfacesUp,
|
|
53
|
+
interfacesDown: device.interfacesDown,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const unmanagedNodeIds: Set<string> = new Set();
|
|
58
|
+
const seenEdgeKeys: Set<string> = new Set();
|
|
59
|
+
|
|
60
|
+
for (const device of devices) {
|
|
61
|
+
for (const neighbor of device.lldpNeighbors || []) {
|
|
62
|
+
const matchKey: string | undefined =
|
|
63
|
+
NetworkTopologyUtil.normalizeKey(neighbor.remoteSysName) ||
|
|
64
|
+
NetworkTopologyUtil.normalizeKey(neighbor.remoteChassisId);
|
|
65
|
+
|
|
66
|
+
if (!matchKey) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const matched: TopologyDeviceInput | undefined =
|
|
71
|
+
deviceByMatchKey.get(matchKey);
|
|
72
|
+
|
|
73
|
+
let toNodeId: string;
|
|
74
|
+
|
|
75
|
+
if (matched) {
|
|
76
|
+
if (matched.id === device.id) {
|
|
77
|
+
// Self-referential neighbor entry; skip.
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
toNodeId = matched.id;
|
|
81
|
+
} else {
|
|
82
|
+
toNodeId = `unmanaged:${matchKey}`;
|
|
83
|
+
if (!unmanagedNodeIds.has(toNodeId)) {
|
|
84
|
+
unmanagedNodeIds.add(toNodeId);
|
|
85
|
+
nodes.push({
|
|
86
|
+
id: toNodeId,
|
|
87
|
+
name:
|
|
88
|
+
neighbor.remoteSysName ||
|
|
89
|
+
neighbor.remoteChassisId ||
|
|
90
|
+
"Unknown device",
|
|
91
|
+
isManaged: false,
|
|
92
|
+
status: "unknown",
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Undirected dedupe: canonicalize the endpoint pair.
|
|
98
|
+
const edgeKey: string = [device.id, toNodeId].sort().join("::");
|
|
99
|
+
if (seenEdgeKeys.has(edgeKey)) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
seenEdgeKeys.add(edgeKey);
|
|
103
|
+
|
|
104
|
+
edges.push({
|
|
105
|
+
fromNodeId: device.id,
|
|
106
|
+
toNodeId: toNodeId,
|
|
107
|
+
fromPort:
|
|
108
|
+
neighbor.localInterfaceIndex !== undefined
|
|
109
|
+
? `if${neighbor.localInterfaceIndex}`
|
|
110
|
+
: undefined,
|
|
111
|
+
toPort: neighbor.remotePortId,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return { nodes, edges };
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
private static matchKeysForDevice(
|
|
120
|
+
device: TopologyDeviceInput,
|
|
121
|
+
): Array<string> {
|
|
122
|
+
const keys: Array<string> = [];
|
|
123
|
+
const sysNameKey: string | undefined = NetworkTopologyUtil.normalizeKey(
|
|
124
|
+
device.sysName,
|
|
125
|
+
);
|
|
126
|
+
const hostnameKey: string | undefined = NetworkTopologyUtil.normalizeKey(
|
|
127
|
+
device.hostname,
|
|
128
|
+
);
|
|
129
|
+
if (sysNameKey) {
|
|
130
|
+
keys.push(sysNameKey);
|
|
131
|
+
}
|
|
132
|
+
if (hostnameKey) {
|
|
133
|
+
keys.push(hostnameKey);
|
|
134
|
+
}
|
|
135
|
+
return keys;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
private static normalizeKey(value: string | undefined): string | undefined {
|
|
139
|
+
if (!value) {
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
const trimmed: string = value.trim().toLowerCase();
|
|
143
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
private static deviceStatus(
|
|
147
|
+
device: TopologyDeviceInput,
|
|
148
|
+
now: Date,
|
|
149
|
+
): NetworkTopologyNodeStatus {
|
|
150
|
+
if (!device.lastSeenAt) {
|
|
151
|
+
return "unknown";
|
|
152
|
+
}
|
|
153
|
+
const ageMs: number = now.getTime() - new Date(device.lastSeenAt).getTime();
|
|
154
|
+
if (ageMs > FRESH_WINDOW_MS) {
|
|
155
|
+
return "down";
|
|
156
|
+
}
|
|
157
|
+
return "up";
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -11,11 +11,22 @@ import EntityType from "../../Types/Telemetry/EntityType";
|
|
|
11
11
|
* synchronous: operates on already-computed entity keys, no DB round trip.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Traffic observed over a `depends-on` edge in one computation window.
|
|
16
|
+
* Co-occurrence edges carry no call semantics and never have these.
|
|
17
|
+
*/
|
|
18
|
+
export interface EntityRelationshipMetrics {
|
|
19
|
+
callCount: number;
|
|
20
|
+
errorCount: number;
|
|
21
|
+
avgDurationMs: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
14
24
|
/** A single directed relationship edge between two entities. */
|
|
15
25
|
export interface EntityRelationshipEdge {
|
|
16
26
|
fromEntityKey: string;
|
|
17
27
|
toEntityKey: string;
|
|
18
28
|
relationshipType: EntityRelationshipType;
|
|
29
|
+
metrics?: EntityRelationshipMetrics | undefined;
|
|
19
30
|
}
|
|
20
31
|
|
|
21
32
|
/*
|
|
@@ -49,6 +49,8 @@ let AIRun = class AIRun extends BaseModel {
|
|
|
49
49
|
this.conversationId = undefined;
|
|
50
50
|
this.triggeredByIncidentId = undefined;
|
|
51
51
|
this.triggeredByAlertId = undefined;
|
|
52
|
+
this.monitorId = undefined;
|
|
53
|
+
this.attemptCount = undefined;
|
|
52
54
|
this.startedAt = undefined;
|
|
53
55
|
this.completedAt = undefined;
|
|
54
56
|
this.lastHeartbeatAt = undefined;
|
|
@@ -338,6 +340,56 @@ __decorate([
|
|
|
338
340
|
}),
|
|
339
341
|
__metadata("design:type", ObjectID)
|
|
340
342
|
], AIRun.prototype, "triggeredByAlertId", void 0);
|
|
343
|
+
__decorate([
|
|
344
|
+
ColumnAccessControl({
|
|
345
|
+
create: [],
|
|
346
|
+
read: [
|
|
347
|
+
Permission.ProjectOwner,
|
|
348
|
+
Permission.ProjectAdmin,
|
|
349
|
+
Permission.ProjectMember,
|
|
350
|
+
],
|
|
351
|
+
update: [],
|
|
352
|
+
}),
|
|
353
|
+
Index(),
|
|
354
|
+
TableColumn({
|
|
355
|
+
type: TableColumnType.ObjectID,
|
|
356
|
+
required: false,
|
|
357
|
+
canReadOnRelationQuery: true,
|
|
358
|
+
title: "Monitor ID",
|
|
359
|
+
description: "The monitor behind the alert that triggered this run — the dedupe key for per-monitor investigation windows.",
|
|
360
|
+
}),
|
|
361
|
+
Column({
|
|
362
|
+
type: ColumnType.ObjectID,
|
|
363
|
+
nullable: true,
|
|
364
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
365
|
+
}),
|
|
366
|
+
__metadata("design:type", ObjectID)
|
|
367
|
+
], AIRun.prototype, "monitorId", void 0);
|
|
368
|
+
__decorate([
|
|
369
|
+
ColumnAccessControl({
|
|
370
|
+
create: [],
|
|
371
|
+
read: [
|
|
372
|
+
Permission.ProjectOwner,
|
|
373
|
+
Permission.ProjectAdmin,
|
|
374
|
+
Permission.ProjectMember,
|
|
375
|
+
],
|
|
376
|
+
update: [],
|
|
377
|
+
}),
|
|
378
|
+
TableColumn({
|
|
379
|
+
required: true,
|
|
380
|
+
type: TableColumnType.Number,
|
|
381
|
+
title: "Attempt Count",
|
|
382
|
+
description: "How many times a worker has claimed this run for execution. Incremented on each claim; the queue stops retrying after the maximum.",
|
|
383
|
+
isDefaultValueColumn: true,
|
|
384
|
+
defaultValue: 0,
|
|
385
|
+
}),
|
|
386
|
+
Column({
|
|
387
|
+
nullable: false,
|
|
388
|
+
default: 0,
|
|
389
|
+
type: ColumnType.Number,
|
|
390
|
+
}),
|
|
391
|
+
__metadata("design:type", Number)
|
|
392
|
+
], AIRun.prototype, "attemptCount", void 0);
|
|
341
393
|
__decorate([
|
|
342
394
|
ColumnAccessControl({
|
|
343
395
|
create: [],
|