@oneuptime/common 11.4.1 → 11.5.1
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 +26 -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/MoreMenu/MoreMenu.tsx +61 -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 +26 -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/MoreMenu/MoreMenu.js +44 -4
- package/build/dist/UI/Components/MoreMenu/MoreMenu.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) {
|
|
@@ -15,6 +15,12 @@ import Button, { ButtonStyleType } from "../Button/Button";
|
|
|
15
15
|
export interface ComponentProps {
|
|
16
16
|
children: Array<ReactElement>;
|
|
17
17
|
elementToBeShownInsteadOfButton?: ReactElement | undefined;
|
|
18
|
+
/*
|
|
19
|
+
* Classes applied to the custom-trigger wrapper (the focusable element that
|
|
20
|
+
* opens the menu). Lets callers style a custom trigger — e.g. to match a
|
|
21
|
+
* button group — while keeping the menu's keyboard/ARIA behavior.
|
|
22
|
+
*/
|
|
23
|
+
triggerClassName?: string | undefined;
|
|
18
24
|
menuIcon?: IconProp | undefined;
|
|
19
25
|
text?: string | undefined;
|
|
20
26
|
}
|
|
@@ -63,6 +69,23 @@ const MoreMenu: React.ForwardRefExoticComponent<
|
|
|
63
69
|
}
|
|
64
70
|
}, [focusedIndex]);
|
|
65
71
|
|
|
72
|
+
const restoreFocusToTrigger: () => void = useCallback((): void => {
|
|
73
|
+
/*
|
|
74
|
+
* Return focus to the trigger after the menu closes via Escape or item
|
|
75
|
+
* selection (WAI-ARIA menu-button pattern). Deferred to the next frame so
|
|
76
|
+
* the menu has unmounted, and only reclaimed if focus fell back to
|
|
77
|
+
* <body> — so we never steal focus that the activated item intentionally
|
|
78
|
+
* moved elsewhere (e.g. into a dialog it opened). Not called on
|
|
79
|
+
* outside-click dismissal, which should leave focus where the user clicked.
|
|
80
|
+
*/
|
|
81
|
+
requestAnimationFrame(() => {
|
|
82
|
+
const activeElement: Element | null = document.activeElement;
|
|
83
|
+
if (!activeElement || activeElement === document.body) {
|
|
84
|
+
document.getElementById(buttonId)?.focus();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}, [buttonId]);
|
|
88
|
+
|
|
66
89
|
const handleKeyDown: (event: React.KeyboardEvent) => void = useCallback(
|
|
67
90
|
(event: React.KeyboardEvent): void => {
|
|
68
91
|
if (!isComponentVisible) {
|
|
@@ -75,6 +98,7 @@ const MoreMenu: React.ForwardRefExoticComponent<
|
|
|
75
98
|
case "Escape":
|
|
76
99
|
event.preventDefault();
|
|
77
100
|
setIsComponentVisible(false);
|
|
101
|
+
restoreFocusToTrigger();
|
|
78
102
|
break;
|
|
79
103
|
case "ArrowDown":
|
|
80
104
|
event.preventDefault();
|
|
@@ -98,7 +122,12 @@ const MoreMenu: React.ForwardRefExoticComponent<
|
|
|
98
122
|
break;
|
|
99
123
|
}
|
|
100
124
|
},
|
|
101
|
-
[
|
|
125
|
+
[
|
|
126
|
+
isComponentVisible,
|
|
127
|
+
props.children.length,
|
|
128
|
+
setIsComponentVisible,
|
|
129
|
+
restoreFocusToTrigger,
|
|
130
|
+
],
|
|
102
131
|
);
|
|
103
132
|
|
|
104
133
|
return (
|
|
@@ -124,13 +153,42 @@ const MoreMenu: React.ForwardRefExoticComponent<
|
|
|
124
153
|
|
|
125
154
|
{props.elementToBeShownInsteadOfButton && (
|
|
126
155
|
<div
|
|
156
|
+
/*
|
|
157
|
+
* The id lets the menu's aria-labelledby resolve and lets focus
|
|
158
|
+
* return here on close. But the menu-button ARIA (haspopup/expanded/
|
|
159
|
+
* label) is only applied when a caller opts in with triggerClassName
|
|
160
|
+
* — callers that pass their own element (some already a real
|
|
161
|
+
* <button>) keep a bare wrapper to avoid layering redundant button
|
|
162
|
+
* semantics on top.
|
|
163
|
+
*/
|
|
164
|
+
id={buttonId}
|
|
165
|
+
className={props.triggerClassName}
|
|
127
166
|
onClick={() => {
|
|
128
167
|
setIsComponentVisible(!isDropdownVisible);
|
|
129
168
|
}}
|
|
130
169
|
role="button"
|
|
131
170
|
tabIndex={0}
|
|
171
|
+
aria-label={
|
|
172
|
+
props.triggerClassName ? props.text || "More options" : undefined
|
|
173
|
+
}
|
|
174
|
+
aria-haspopup={props.triggerClassName ? "menu" : undefined}
|
|
175
|
+
aria-expanded={
|
|
176
|
+
props.triggerClassName ? isComponentVisible : undefined
|
|
177
|
+
}
|
|
178
|
+
aria-controls={
|
|
179
|
+
props.triggerClassName && isComponentVisible ? menuId : undefined
|
|
180
|
+
}
|
|
132
181
|
onKeyDown={(e: React.KeyboardEvent) => {
|
|
133
|
-
|
|
182
|
+
/*
|
|
183
|
+
* Only respond to the wrapper's own keys, never a focusable
|
|
184
|
+
* child's (e.g. an input inside a custom trigger), so typing
|
|
185
|
+
* isn't hijacked.
|
|
186
|
+
*/
|
|
187
|
+
if (
|
|
188
|
+
(e.key === "Enter" || e.key === " ") &&
|
|
189
|
+
e.target === e.currentTarget
|
|
190
|
+
) {
|
|
191
|
+
e.preventDefault();
|
|
134
192
|
setIsComponentVisible(!isDropdownVisible);
|
|
135
193
|
}
|
|
136
194
|
}}
|
|
@@ -160,6 +218,7 @@ const MoreMenu: React.ForwardRefExoticComponent<
|
|
|
160
218
|
onClick={() => {
|
|
161
219
|
if (isComponentVisible) {
|
|
162
220
|
setIsComponentVisible(false);
|
|
221
|
+
restoreFocusToTrigger();
|
|
163
222
|
}
|
|
164
223
|
}}
|
|
165
224
|
onKeyDown={(e: React.KeyboardEvent) => {
|
|
@@ -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:
|