@oneuptime/common 12.0.2 → 12.0.4
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/CephCluster.ts +14 -0
- package/Models/DatabaseModels/CodeRepository.ts +14 -6
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.ts +14 -0
- package/Models/DatabaseModels/DockerHost.ts +14 -0
- package/Models/DatabaseModels/GlobalOidcProject.ts +18 -0
- package/Models/DatabaseModels/GlobalSsoProject.ts +18 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/IoTFleet.ts +14 -0
- package/Models/DatabaseModels/KubernetesCluster.ts +14 -0
- package/Models/DatabaseModels/LogDropFilter.ts +9 -20
- package/Models/DatabaseModels/NetworkDevice.ts +14 -0
- package/Models/DatabaseModels/NetworkInterface.ts +18 -0
- package/Models/DatabaseModels/Project.ts +16 -2
- package/Models/DatabaseModels/ProxmoxCluster.ts +14 -0
- package/Models/DatabaseModels/Service.ts +30 -0
- package/Models/DatabaseModels/StatusPageMonitorRule.ts +911 -0
- package/Models/DatabaseModels/StatusPagePrivateUser.ts +30 -0
- package/Models/DatabaseModels/StatusPageResource.ts +73 -0
- package/Models/DatabaseModels/TraceDropFilter.ts +9 -20
- package/Models/DatabaseModels/User.ts +30 -0
- package/Server/API/AIAgentDataAPI.ts +31 -0
- package/Server/API/BaseAPI.ts +13 -2
- package/Server/API/DashboardAPI.ts +458 -12
- package/Server/API/GitHubAPI.ts +119 -283
- package/Server/API/UserAPI.ts +263 -1
- package/Server/EnvironmentConfig.ts +38 -4
- package/Server/Infrastructure/GlobalCache.ts +152 -0
- package/Server/Infrastructure/Postgres/DataSourceOptions.ts +16 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786005052769-AddStatusPageMonitorRule.ts +123 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786018109307-AddPerUserPasswordSalt.ts +21 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786023262402-WidenHashedStringColumnsForScrypt.ts +68 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786100000000-RestoreServiceLowerNameIndex.ts +100 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786200000000-RestoreDroppedUniqueIndexes.ts +214 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786300000000-QuarantineUnboundGitHubInstallations.ts +69 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +12 -0
- package/Server/Services/AlertStateTimelineService.ts +20 -0
- package/Server/Services/AnalyticsDatabaseService.ts +72 -1
- package/Server/Services/CephClusterService.ts +26 -86
- package/Server/Services/CloudResourceService.ts +23 -83
- package/Server/Services/CodeRepositoryService.ts +105 -2
- package/Server/Services/DatabaseService.ts +296 -2
- package/Server/Services/DockerHostService.ts +19 -79
- package/Server/Services/DockerSwarmClusterService.ts +27 -88
- package/Server/Services/HostService.ts +46 -99
- package/Server/Services/IncidentStateTimelineService.ts +20 -0
- package/Server/Services/Index.ts +2 -0
- package/Server/Services/IoTFleetService.ts +19 -79
- package/Server/Services/KubernetesClusterService.ts +17 -78
- package/Server/Services/LabelService.ts +57 -10
- package/Server/Services/MetricTypeService.ts +84 -0
- package/Server/Services/MonitorService.ts +89 -14
- package/Server/Services/MonitorStatusTimelineService.ts +29 -0
- package/Server/Services/MonitorTemplateService.ts +65 -0
- package/Server/Services/OpenTelemetryIngestService.ts +230 -26
- package/Server/Services/PodmanHostService.ts +19 -79
- package/Server/Services/ProxmoxClusterService.ts +23 -83
- package/Server/Services/RumApplicationService.ts +19 -80
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +21 -0
- package/Server/Services/ServerlessFunctionService.ts +24 -85
- package/Server/Services/ServiceService.ts +299 -73
- package/Server/Services/StatusPageMonitorRuleEngineService.ts +752 -0
- package/Server/Services/StatusPageMonitorRuleService.ts +471 -0
- package/Server/Services/TelemetryEntityRelationshipService.ts +1 -0
- package/Server/Services/TelemetryEntityService.ts +1 -0
- package/Server/Services/UserService.ts +184 -0
- package/Server/Utils/AI/Toolbox/CodeTools.ts +45 -4
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +13 -0
- package/Server/Utils/CodeRepository/GitHub/GitHub.ts +157 -4
- package/Server/Utils/CodeRepository/GitHub/GitHubInstallationBinding.ts +130 -0
- package/Server/Utils/Database/ProjectScopedReferenceValidator.ts +170 -39
- package/Server/Utils/Monitor/MonitorResource.ts +63 -36
- package/Server/Utils/Monitor/MonitorStatusTimeline.ts +36 -0
- package/Server/Utils/Monitor/MonitorStepsProjectValidator.ts +148 -127
- package/Server/Utils/Monitor/MonitorStepsReferenceExtractor.ts +434 -0
- package/Server/Utils/PasswordHash.ts +306 -0
- package/Server/Utils/SingleFlight.ts +83 -0
- package/Server/Utils/StatusPage/MonitorRulePatternValidator.ts +46 -0
- package/Server/Utils/Telemetry/EntityRegistry.ts +107 -26
- package/Server/Utils/Telemetry/ResourceHeartbeat.ts +314 -0
- package/Server/Utils/Telemetry/Telemetry.ts +351 -122
- package/Tests/App/Dashboard/OverviewCustomFields.test.tsx +333 -0
- package/Tests/App/Dashboard/UserCustomFields.test.tsx +392 -0
- package/Tests/App/Dashboard/WidgetCatalog.test.ts +2 -0
- package/Tests/Models/DatabaseModels/ColumnTransformerInvariants.test.ts +306 -0
- package/Tests/Models/DatabaseModels/NumberColumnDeserialization.test.ts +333 -0
- package/Tests/Models/DatabaseModels/StatusPageMonitorRuleModel.test.ts +190 -0
- package/Tests/Server/API/AIAgentDataRepositoryToken.test.ts +381 -0
- package/Tests/Server/API/DashboardPublicAttributeValuesAPI.test.ts +943 -0
- package/Tests/Server/API/DashboardPublicMetricsAggregateAPI.test.ts +1296 -0
- package/Tests/Server/API/DashboardPublicResourceListAPI.test.ts +26 -0
- package/Tests/Server/API/DashboardPublicTemplatePayloads.test.ts +598 -0
- package/Tests/Server/API/GitHubAppInstallationBindingAPI.test.ts +539 -0
- package/Tests/Server/API/Helpers.ts +6 -1
- package/Tests/Server/API/UserProjectsAPI.test.ts +852 -0
- package/Tests/Server/Infrastructure/GlobalCache.test.ts +354 -0
- package/Tests/Server/Infrastructure/PostgresLockTimeoutOptions.test.ts +181 -0
- package/Tests/Server/Infrastructure/SemaphoreMutex.test.ts +215 -0
- package/Tests/Server/Services/AddPerUserPasswordSaltMigration.test.ts +178 -0
- package/Tests/Server/Services/AnalyticsDatabasePaginationStability.test.ts +582 -0
- package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +5 -0
- package/Tests/Server/Services/CodeRepositoryInstallationBinding.test.ts +305 -0
- package/Tests/Server/Services/CodeRepositoryResolutionBinding.test.ts +147 -0
- package/Tests/Server/Services/DatabaseServicePerUserPasswordSalt.test.ts +870 -0
- package/Tests/Server/Services/DatabaseServiceUpdateColumnsIfUnlocked.test.ts +342 -0
- package/Tests/Server/Services/DropFilterSaveValidation.test.ts +245 -0
- package/Tests/Server/Services/HostServiceUpdateLastSeen.test.ts +163 -15
- package/Tests/Server/Services/MetricTypeAttachServices.test.ts +222 -0
- package/Tests/Server/Services/MissingReferenceWriteGuard.test.ts +614 -0
- package/Tests/Server/Services/MonitorStatusTimelineFastPath.test.ts +23 -0
- package/Tests/Server/Services/OpenTelemetryServiceResolutionCache.test.ts +568 -0
- package/Tests/Server/Services/ResourceUpdateLastSeenLivenessFallback.test.ts +305 -56
- package/Tests/Server/Services/RestoreDroppedUniqueIndexesMigration.test.ts +386 -0
- package/Tests/Server/Services/RestoreServiceLowerNameIndexMigration.test.ts +240 -0
- package/Tests/Server/Services/ServiceUpdateLastSeenSplitGates.test.ts +705 -0
- package/Tests/Server/Services/StatusPageMonitorRuleEngineService.test.ts +1719 -0
- package/Tests/Server/Services/StatusPageMonitorRuleHooks.test.ts +1212 -0
- package/Tests/Server/Services/StatusPageMonitorRuleMonitorCreateHook.test.ts +228 -0
- package/Tests/Server/Services/UserServiceFirstMasterAdminElection.test.ts +885 -0
- package/Tests/Server/Services/WidenHashedStringColumnsForScryptMigration.test.ts +220 -0
- package/Tests/Server/Utils/AI/CodeTools.test.ts +47 -1
- package/Tests/Server/Utils/AI/CodeWriteTools.test.ts +10 -0
- package/Tests/Server/Utils/APIKey/AccessPermission.test.ts +267 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +120 -0
- package/Tests/Server/Utils/CodeRepository/GitHubInstallationBinding.test.ts +292 -0
- package/Tests/Server/Utils/Database/ProjectScopedReferenceValidator.test.ts +260 -13
- package/Tests/Server/Utils/EntityRegistryRowFence.test.ts +302 -0
- package/Tests/Server/Utils/GitHubInstallationOwnershipVerification.test.ts +340 -0
- package/Tests/Server/Utils/GitHubWebhookAndTreeCacheIsolation.test.ts +250 -0
- package/Tests/Server/Utils/MetricTypeIndexConvergence.test.ts +598 -0
- package/Tests/Server/Utils/Monitor/MonitorStatusTimelineUnusableStatus.test.ts +154 -0
- package/Tests/Server/Utils/Monitor/MonitorStepsProjectValidator.test.ts +638 -92
- package/Tests/Server/Utils/Monitor/MonitorStepsReferenceExtractor.test.ts +724 -0
- package/Tests/Server/Utils/PasswordHash.test.ts +555 -0
- package/Tests/Server/Utils/SingleFlight.test.ts +221 -0
- package/Tests/Types/Dashboard/NetworkDashboardTemplate.test.ts +793 -0
- package/Tests/Types/Database/BigIntColumnTransformer.test.ts +147 -0
- package/Tests/Types/Database/ColumnLength.test.ts +7 -1
- package/Tests/Types/Database/DatabasePropertyTransformer.test.ts +140 -0
- package/Tests/Types/Database/NumericColumnValue.test.ts +127 -0
- package/Tests/Types/Decimal.test.ts +37 -0
- package/Tests/Types/HashedStringPerUserSalt.test.ts +476 -0
- package/Tests/Types/Monitor/DockerAlertTemplates.test.ts +293 -0
- package/Tests/Types/Monitor/HostAlertTemplates.test.ts +249 -0
- package/Tests/Types/Monitor/IotAlertTemplates.test.ts +320 -0
- package/Tests/Types/Monitor/PodmanAlertTemplates.test.ts +271 -0
- package/Tests/Types/Monitor/SnmpVersionParsing.test.ts +152 -0
- package/Tests/Types/Port.test.ts +38 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetail.test.tsx +696 -0
- package/Tests/UI/Components/LogsHistogram.test.tsx +276 -0
- package/Tests/UI/Components/UseLiveLogsRefresh.test.tsx +489 -0
- package/Tests/UI/Components/UseLogsHistogram.test.tsx +500 -0
- package/Tests/UI/Utils/UserProjectsModelAPI.test.ts +714 -0
- package/Tests/Utils/Dashboard/Components/DashboardComponentsUtil.test.ts +120 -0
- package/Tests/Utils/Dashboard/DashboardNetworkMapComponent.test.ts +327 -0
- package/Tests/Utils/TeamMembersByProject.test.ts +655 -0
- package/Types/Dashboard/DashboardComponentType.ts +1 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardNetworkMapComponent.ts +40 -0
- package/Types/Dashboard/DashboardTemplates.ts +397 -0
- package/Types/Database/BigIntColumnTransformer.ts +74 -0
- package/Types/Database/ColumnLength.ts +9 -1
- package/Types/Database/DatabaseProperty.ts +26 -0
- package/Types/Database/NumericColumnValue.ts +128 -0
- package/Types/Database/TableColumn.ts +11 -0
- package/Types/Database/UnsynchronizedIndex.ts +48 -0
- package/Types/Decimal.ts +16 -4
- package/Types/HashedString.ts +139 -4
- package/Types/Permission.ts +48 -0
- package/Types/Port.ts +16 -4
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +85 -11
- package/UI/Components/LogsViewer/useLiveLogsRefresh.ts +86 -0
- package/UI/Components/LogsViewer/useLogsHistogram.ts +113 -0
- package/UI/Components/Navbar/NavBar.tsx +12 -2
- package/UI/Components/Navbar/NavBarMenuModal.tsx +19 -7
- package/UI/Utils/ModelAPI/UserProjectsModelAPI.ts +257 -0
- package/Utils/Dashboard/Components/DashboardNetworkMapComponent.ts +136 -0
- package/Utils/Dashboard/Components/Index.ts +7 -0
- package/Utils/TeamMembersByProject.ts +237 -0
- package/build/dist/Models/DatabaseModels/CephCluster.js +16 -1
- package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CodeRepository.js +14 -6
- package/build/dist/Models/DatabaseModels/CodeRepository.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +12 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHost.js +16 -1
- package/build/dist/Models/DatabaseModels/DockerHost.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalOidcProject.js +16 -1
- package/build/dist/Models/DatabaseModels/GlobalOidcProject.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalSsoProject.js +16 -1
- package/build/dist/Models/DatabaseModels/GlobalSsoProject.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IoTFleet.js +16 -1
- package/build/dist/Models/DatabaseModels/IoTFleet.js.map +1 -1
- package/build/dist/Models/DatabaseModels/KubernetesCluster.js +16 -1
- package/build/dist/Models/DatabaseModels/KubernetesCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LogDropFilter.js +9 -20
- package/build/dist/Models/DatabaseModels/LogDropFilter.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +16 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkInterface.js +16 -1
- package/build/dist/Models/DatabaseModels/NetworkInterface.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +16 -2
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +16 -1
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Service.js +28 -1
- package/build/dist/Models/DatabaseModels/Service.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageMonitorRule.js +925 -0
- package/build/dist/Models/DatabaseModels/StatusPageMonitorRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/StatusPagePrivateUser.js +32 -0
- package/build/dist/Models/DatabaseModels/StatusPagePrivateUser.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageResource.js +72 -0
- package/build/dist/Models/DatabaseModels/StatusPageResource.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TraceDropFilter.js +9 -20
- package/build/dist/Models/DatabaseModels/TraceDropFilter.js.map +1 -1
- package/build/dist/Models/DatabaseModels/User.js +32 -0
- package/build/dist/Models/DatabaseModels/User.js.map +1 -1
- package/build/dist/Server/API/AIAgentDataAPI.js +21 -2
- package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +11 -1
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +343 -10
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/GitHubAPI.js +94 -167
- package/build/dist/Server/API/GitHubAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +187 -2
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +34 -4
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/GlobalCache.js +120 -0
- package/build/dist/Server/Infrastructure/GlobalCache.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/DataSourceOptions.js +5 -3
- package/build/dist/Server/Infrastructure/Postgres/DataSourceOptions.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786005052769-AddStatusPageMonitorRule.js +48 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786005052769-AddStatusPageMonitorRule.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786018109307-AddPerUserPasswordSalt.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786018109307-AddPerUserPasswordSalt.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786023262402-WidenHashedStringColumnsForScrypt.js +59 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786023262402-WidenHashedStringColumnsForScrypt.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786100000000-RestoreServiceLowerNameIndex.js +93 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786100000000-RestoreServiceLowerNameIndex.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786200000000-RestoreDroppedUniqueIndexes.js +101 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786200000000-RestoreDroppedUniqueIndexes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786300000000-QuarantineUnboundGitHubInstallations.js +66 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786300000000-QuarantineUnboundGitHubInstallations.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +19 -0
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +57 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +26 -76
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceService.js +23 -73
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/CodeRepositoryService.js +90 -2
- package/build/dist/Server/Services/CodeRepositoryService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +246 -2
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +19 -69
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +27 -78
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +58 -102
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +19 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +2 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/IoTFleetService.js +19 -69
- package/build/dist/Server/Services/IoTFleetService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +17 -68
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LabelService.js +42 -7
- package/build/dist/Server/Services/LabelService.js.map +1 -1
- package/build/dist/Server/Services/MetricTypeService.js +74 -0
- package/build/dist/Server/Services/MetricTypeService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +81 -9
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorStatusTimelineService.js +28 -0
- package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +60 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +155 -25
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +19 -69
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +23 -73
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationService.js +19 -70
- package/build/dist/Server/Services/RumApplicationService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +20 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionService.js +24 -75
- package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +236 -61
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js +603 -0
- package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/StatusPageMonitorRuleService.js +401 -0
- package/build/dist/Server/Services/StatusPageMonitorRuleService.js.map +1 -0
- package/build/dist/Server/Services/TelemetryEntityRelationshipService.js +1 -0
- package/build/dist/Server/Services/TelemetryEntityRelationshipService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryEntityService.js +1 -0
- package/build/dist/Server/Services/TelemetryEntityService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +165 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/CodeTools.js +31 -1
- package/build/dist/Server/Utils/AI/Toolbox/CodeTools.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +13 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +126 -4
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubInstallationBinding.js +136 -0
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubInstallationBinding.js.map +1 -0
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js +105 -29
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +56 -32
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js +30 -3
- package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepsProjectValidator.js +110 -98
- package/build/dist/Server/Utils/Monitor/MonitorStepsProjectValidator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js +312 -0
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js.map +1 -0
- package/build/dist/Server/Utils/PasswordHash.js +237 -0
- package/build/dist/Server/Utils/PasswordHash.js.map +1 -0
- package/build/dist/Server/Utils/SingleFlight.js +76 -0
- package/build/dist/Server/Utils/SingleFlight.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/MonitorRulePatternValidator.js +29 -0
- package/build/dist/Server/Utils/StatusPage/MonitorRulePatternValidator.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +78 -19
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ResourceHeartbeat.js +160 -0
- package/build/dist/Server/Utils/Telemetry/ResourceHeartbeat.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/Telemetry.js +279 -104
- package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +1 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardNetworkMapComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardNetworkMapComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +368 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/Database/BigIntColumnTransformer.js +66 -0
- package/build/dist/Types/Database/BigIntColumnTransformer.js.map +1 -0
- package/build/dist/Types/Database/ColumnLength.js +9 -1
- package/build/dist/Types/Database/ColumnLength.js.map +1 -1
- package/build/dist/Types/Database/DatabaseProperty.js +25 -0
- package/build/dist/Types/Database/DatabaseProperty.js.map +1 -1
- package/build/dist/Types/Database/NumericColumnValue.js +97 -0
- package/build/dist/Types/Database/NumericColumnValue.js.map +1 -0
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Database/UnsynchronizedIndex.js +46 -0
- package/build/dist/Types/Database/UnsynchronizedIndex.js.map +1 -0
- package/build/dist/Types/Decimal.js +14 -3
- package/build/dist/Types/Decimal.js.map +1 -1
- package/build/dist/Types/HashedString.js +95 -5
- package/build/dist/Types/HashedString.js.map +1 -1
- package/build/dist/Types/Permission.js +42 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Port.js +15 -5
- package/build/dist/Types/Port.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +51 -10
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/useLiveLogsRefresh.js +44 -0
- package/build/dist/UI/Components/LogsViewer/useLiveLogsRefresh.js.map +1 -0
- package/build/dist/UI/Components/LogsViewer/useLogsHistogram.js +75 -0
- package/build/dist/UI/Components/LogsViewer/useLogsHistogram.js.map +1 -0
- package/build/dist/UI/Components/Navbar/NavBar.js +3 -1
- package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +19 -7
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -1
- package/build/dist/UI/Utils/ModelAPI/UserProjectsModelAPI.js +156 -0
- package/build/dist/UI/Utils/ModelAPI/UserProjectsModelAPI.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardNetworkMapComponent.js +114 -0
- package/build/dist/Utils/Dashboard/Components/DashboardNetworkMapComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +4 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/TeamMembersByProject.js +145 -0
- package/build/dist/Utils/TeamMembersByProject.js.map +1 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import MetricsAggregationType from "../Metrics/MetricsAggregationType";
|
|
|
9
9
|
import IncidentMetricType from "../Incident/IncidentMetricType";
|
|
10
10
|
import AlertMetricType from "../Alerts/AlertMetricType";
|
|
11
11
|
import MonitorMetricType from "../Monitor/MonitorMetricType";
|
|
12
|
+
import MonitorType from "../Monitor/MonitorType";
|
|
12
13
|
import MetricDashboardMetricType from "../Metrics/MetricDashboardMetricType";
|
|
13
14
|
import { DashboardValueTrendDirection } from "./DashboardComponents/DashboardValueComponent";
|
|
14
15
|
/*
|
|
@@ -37,6 +38,7 @@ export var DashboardTemplateType;
|
|
|
37
38
|
DashboardTemplateType["DockerSwarm"] = "DockerSwarm";
|
|
38
39
|
DashboardTemplateType["Metrics"] = "Metrics";
|
|
39
40
|
DashboardTemplateType["Rum"] = "Rum";
|
|
41
|
+
DashboardTemplateType["Network"] = "Network";
|
|
40
42
|
})(DashboardTemplateType || (DashboardTemplateType = {}));
|
|
41
43
|
/*
|
|
42
44
|
* Templates are grouped into categories so the "Create from Template"
|
|
@@ -142,6 +144,13 @@ export const DashboardTemplates = [
|
|
|
142
144
|
icon: IconProp.Cube,
|
|
143
145
|
category: DashboardTemplateCategory.Infrastructure,
|
|
144
146
|
},
|
|
147
|
+
{
|
|
148
|
+
type: DashboardTemplateType.Network,
|
|
149
|
+
name: "Network Dashboard",
|
|
150
|
+
description: "Your sites on the world map, SNMP interface throughput, utilization and errors, device reachability and round-trip latency, and the monitors watching them.",
|
|
151
|
+
icon: IconProp.Map,
|
|
152
|
+
category: DashboardTemplateCategory.Infrastructure,
|
|
153
|
+
},
|
|
145
154
|
];
|
|
146
155
|
/*
|
|
147
156
|
* Templates for a category in their declared order. The modal uses this
|
|
@@ -591,6 +600,53 @@ function createCephPoolListComponent(data) {
|
|
|
591
600
|
},
|
|
592
601
|
};
|
|
593
602
|
}
|
|
603
|
+
function createNetworkMapComponent(data) {
|
|
604
|
+
var _a, _b;
|
|
605
|
+
return {
|
|
606
|
+
_type: ObjectType.DashboardComponent,
|
|
607
|
+
componentType: DashboardComponentType.NetworkMap,
|
|
608
|
+
componentId: ObjectID.generate(),
|
|
609
|
+
topInDashboardUnits: data.top,
|
|
610
|
+
leftInDashboardUnits: data.left,
|
|
611
|
+
widthInDashboardUnits: data.width,
|
|
612
|
+
heightInDashboardUnits: data.height,
|
|
613
|
+
/*
|
|
614
|
+
* A map needs room in BOTH axes — the world is roughly 2:1, so a short
|
|
615
|
+
* tile letterboxes it into a strip. Same floor the widget's own default
|
|
616
|
+
* declares (Common/Utils/Dashboard/Components/DashboardNetworkMapComponent).
|
|
617
|
+
*/
|
|
618
|
+
minHeightInDashboardUnits: 4,
|
|
619
|
+
minWidthInDashboardUnits: 4,
|
|
620
|
+
arguments: {
|
|
621
|
+
title: data.title,
|
|
622
|
+
maxSites: (_a = data.maxSites) !== null && _a !== void 0 ? _a : 250,
|
|
623
|
+
viewMode: "map",
|
|
624
|
+
showLabels: (_b = data.showLabels) !== null && _b !== void 0 ? _b : true,
|
|
625
|
+
statusFilter: data.statusFilter,
|
|
626
|
+
},
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
function createMonitorListComponent(data) {
|
|
630
|
+
var _a;
|
|
631
|
+
return {
|
|
632
|
+
_type: ObjectType.DashboardComponent,
|
|
633
|
+
componentType: DashboardComponentType.MonitorList,
|
|
634
|
+
componentId: ObjectID.generate(),
|
|
635
|
+
topInDashboardUnits: data.top,
|
|
636
|
+
leftInDashboardUnits: data.left,
|
|
637
|
+
widthInDashboardUnits: data.width,
|
|
638
|
+
heightInDashboardUnits: data.height,
|
|
639
|
+
minHeightInDashboardUnits: 3,
|
|
640
|
+
minWidthInDashboardUnits: 6,
|
|
641
|
+
arguments: {
|
|
642
|
+
title: data.title,
|
|
643
|
+
maxRows: (_a = data.maxRows) !== null && _a !== void 0 ? _a : 25,
|
|
644
|
+
viewMode: "list",
|
|
645
|
+
monitorTypes: data.monitorTypes,
|
|
646
|
+
statusFilter: data.statusFilter,
|
|
647
|
+
},
|
|
648
|
+
};
|
|
649
|
+
}
|
|
594
650
|
// -- Dashboard configs --
|
|
595
651
|
function createMonitorDashboardConfig() {
|
|
596
652
|
const components = [
|
|
@@ -3096,6 +3152,316 @@ function createCephDashboardConfig() {
|
|
|
3096
3152
|
heightInDashboardUnits: Math.max(DashboardSize.heightInDashboardUnits, 16),
|
|
3097
3153
|
};
|
|
3098
3154
|
}
|
|
3155
|
+
function createNetworkDashboardConfig() {
|
|
3156
|
+
/*
|
|
3157
|
+
* Layout and metric notes:
|
|
3158
|
+
*
|
|
3159
|
+
* - The map reads the Postgres NetworkSite inventory rather than a metric
|
|
3160
|
+
* series, so its markers are true right now — the same reasoning the
|
|
3161
|
+
* Kubernetes / Ceph templates use for their inventory widgets.
|
|
3162
|
+
*
|
|
3163
|
+
* - EVERY metric widget here queries an `oneuptime.monitor.snmp.*` series,
|
|
3164
|
+
* and those are emitted by exactly one code path:
|
|
3165
|
+
* NetworkDeviceMetricUtil.saveWalkMetrics, off a network device walk.
|
|
3166
|
+
* That is deliberate and it is the constraint the rest of this template
|
|
3167
|
+
* is built around.
|
|
3168
|
+
*
|
|
3169
|
+
* The obvious tiles to reach for — uptime, round-trip time, packet loss,
|
|
3170
|
+
* jitter — do NOT belong here, however much a network dashboard wants
|
|
3171
|
+
* them. `oneuptime.monitor.online` and `oneuptime.monitor.response.time`
|
|
3172
|
+
* are emitted by MonitorMetricUtil for EVERY probeable monitor in the
|
|
3173
|
+
* project, and packet loss and jitter come from Ping/IP monitors. A tile
|
|
3174
|
+
* titled "Round-trip Time" on a network dashboard that silently averages
|
|
3175
|
+
* every website check in the project is worse than no tile: it is a
|
|
3176
|
+
* number a reader will act on. Device reachability is on this dashboard
|
|
3177
|
+
* as the Network Device monitor list, which IS correctly scoped.
|
|
3178
|
+
*
|
|
3179
|
+
* - Because every series here comes from the device walk, every series
|
|
3180
|
+
* carries `deviceName`, and the per-interface ones also carry
|
|
3181
|
+
* `interfaceName` — so both template variables bind to something real on
|
|
3182
|
+
* every widget. Those keys are BARE, not `resource.`-prefixed; see
|
|
3183
|
+
* NetworkDeviceMetricUtil.buildDeviceMetricRow.
|
|
3184
|
+
*
|
|
3185
|
+
* - No widget aggregates with Sum. The interface series are already
|
|
3186
|
+
* per-second RATES, and the Value tile reduces across time buckets — so
|
|
3187
|
+
* a summed rate grows with the dashboard's time range rather than
|
|
3188
|
+
* describing the network. Max answers "how bad did it get", Avg answers
|
|
3189
|
+
* "what is normal"; both are range-independent.
|
|
3190
|
+
*
|
|
3191
|
+
* - For the same reason the in/out bit-rate charts are NOT
|
|
3192
|
+
* transformAsRate'd the way the Ceph template's cumulative
|
|
3193
|
+
* ceph_pool_*_bytes counters are. They are already rates; rate-of-a-rate
|
|
3194
|
+
* plots noise around zero.
|
|
3195
|
+
*/
|
|
3196
|
+
const components = [
|
|
3197
|
+
// Row 0: Title
|
|
3198
|
+
createTextComponent({
|
|
3199
|
+
text: "Network Dashboard",
|
|
3200
|
+
top: 0,
|
|
3201
|
+
left: 0,
|
|
3202
|
+
width: 12,
|
|
3203
|
+
height: 1,
|
|
3204
|
+
isBold: true,
|
|
3205
|
+
}),
|
|
3206
|
+
/*
|
|
3207
|
+
* Rows 1-5: where the network IS, next to how it is doing. The map is
|
|
3208
|
+
* the subject and takes two thirds of the width; the column beside it
|
|
3209
|
+
* is the numbers a reader checks without leaving the picture.
|
|
3210
|
+
*/
|
|
3211
|
+
createNetworkMapComponent({
|
|
3212
|
+
title: "Sites",
|
|
3213
|
+
top: 1,
|
|
3214
|
+
left: 0,
|
|
3215
|
+
width: 8,
|
|
3216
|
+
height: 5,
|
|
3217
|
+
maxSites: 250,
|
|
3218
|
+
}),
|
|
3219
|
+
/*
|
|
3220
|
+
* SnmpInterfaceOperStatus is emitted as 0/1 per interface, so Avg is the
|
|
3221
|
+
* FRACTION of interfaces currently up — in [0, 1], not a percent.
|
|
3222
|
+
* Labelled "(avg)" for the same reason the Monitor template labels its
|
|
3223
|
+
* uptime tile that way rather than printing a misleading "%".
|
|
3224
|
+
*/
|
|
3225
|
+
createValueComponent({
|
|
3226
|
+
title: "Interfaces Up (avg)",
|
|
3227
|
+
top: 1,
|
|
3228
|
+
left: 8,
|
|
3229
|
+
width: 4,
|
|
3230
|
+
metricConfig: {
|
|
3231
|
+
metricName: MonitorMetricType.SnmpInterfaceOperStatus,
|
|
3232
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
3233
|
+
},
|
|
3234
|
+
trendDirection: DashboardValueTrendDirection.HigherIsBetter,
|
|
3235
|
+
}),
|
|
3236
|
+
createValueComponent({
|
|
3237
|
+
title: "Avg Interface Utilization",
|
|
3238
|
+
top: 2,
|
|
3239
|
+
left: 8,
|
|
3240
|
+
width: 4,
|
|
3241
|
+
metricConfig: {
|
|
3242
|
+
metricName: MonitorMetricType.SnmpInterfaceUtilizationPercent,
|
|
3243
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
3244
|
+
},
|
|
3245
|
+
trendDirection: DashboardValueTrendDirection.HigherIsWorse,
|
|
3246
|
+
}),
|
|
3247
|
+
/*
|
|
3248
|
+
* Max, not Sum: this is "how bad did the worst port get", which is what
|
|
3249
|
+
* an operator acts on. Summing a per-second error rate across every
|
|
3250
|
+
* interface and every time bucket produces a number that doubles when
|
|
3251
|
+
* you widen the time picker.
|
|
3252
|
+
*/
|
|
3253
|
+
createValueComponent({
|
|
3254
|
+
title: "Worst Interface Errors/sec",
|
|
3255
|
+
top: 3,
|
|
3256
|
+
left: 8,
|
|
3257
|
+
width: 4,
|
|
3258
|
+
metricConfig: {
|
|
3259
|
+
metricName: MonitorMetricType.SnmpInterfaceErrorsPerSecond,
|
|
3260
|
+
aggregationType: MetricsAggregationType.Max,
|
|
3261
|
+
},
|
|
3262
|
+
trendDirection: DashboardValueTrendDirection.HigherIsWorse,
|
|
3263
|
+
}),
|
|
3264
|
+
createValueComponent({
|
|
3265
|
+
title: "Peak Inbound",
|
|
3266
|
+
top: 4,
|
|
3267
|
+
left: 8,
|
|
3268
|
+
width: 4,
|
|
3269
|
+
metricConfig: {
|
|
3270
|
+
metricName: MonitorMetricType.SnmpInterfaceInBitsPerSecond,
|
|
3271
|
+
aggregationType: MetricsAggregationType.Max,
|
|
3272
|
+
},
|
|
3273
|
+
}),
|
|
3274
|
+
createValueComponent({
|
|
3275
|
+
title: "Peak Outbound",
|
|
3276
|
+
top: 5,
|
|
3277
|
+
left: 8,
|
|
3278
|
+
width: 4,
|
|
3279
|
+
metricConfig: {
|
|
3280
|
+
metricName: MonitorMetricType.SnmpInterfaceOutBitsPerSecond,
|
|
3281
|
+
aggregationType: MetricsAggregationType.Max,
|
|
3282
|
+
},
|
|
3283
|
+
}),
|
|
3284
|
+
// Row 6: Section header
|
|
3285
|
+
createTextComponent({
|
|
3286
|
+
text: "Interface Throughput",
|
|
3287
|
+
top: 6,
|
|
3288
|
+
left: 0,
|
|
3289
|
+
width: 12,
|
|
3290
|
+
height: 1,
|
|
3291
|
+
isBold: true,
|
|
3292
|
+
}),
|
|
3293
|
+
/*
|
|
3294
|
+
* Rows 7-9: throughput, split per interface. Grouping by
|
|
3295
|
+
* `interfaceName` is what turns one flat line into one line per uplink,
|
|
3296
|
+
* which is the only form in which "is a link saturated" is answerable —
|
|
3297
|
+
* an ungrouped chart averages a saturated uplink with nine idle access
|
|
3298
|
+
* ports and reports that everything is fine.
|
|
3299
|
+
*/
|
|
3300
|
+
createChartComponent({
|
|
3301
|
+
title: "Inbound by Interface",
|
|
3302
|
+
chartType: DashboardChartType.Area,
|
|
3303
|
+
top: 7,
|
|
3304
|
+
left: 0,
|
|
3305
|
+
width: 6,
|
|
3306
|
+
height: 3,
|
|
3307
|
+
metricConfig: {
|
|
3308
|
+
metricName: MonitorMetricType.SnmpInterfaceInBitsPerSecond,
|
|
3309
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
3310
|
+
legend: "Inbound",
|
|
3311
|
+
legendUnit: "bps",
|
|
3312
|
+
groupByAttributeKeys: ["interfaceName"],
|
|
3313
|
+
},
|
|
3314
|
+
}),
|
|
3315
|
+
createChartComponent({
|
|
3316
|
+
title: "Outbound by Interface",
|
|
3317
|
+
chartType: DashboardChartType.Area,
|
|
3318
|
+
top: 7,
|
|
3319
|
+
left: 6,
|
|
3320
|
+
width: 6,
|
|
3321
|
+
height: 3,
|
|
3322
|
+
metricConfig: {
|
|
3323
|
+
metricName: MonitorMetricType.SnmpInterfaceOutBitsPerSecond,
|
|
3324
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
3325
|
+
legend: "Outbound",
|
|
3326
|
+
legendUnit: "bps",
|
|
3327
|
+
groupByAttributeKeys: ["interfaceName"],
|
|
3328
|
+
},
|
|
3329
|
+
}),
|
|
3330
|
+
// Row 10: Section header
|
|
3331
|
+
createTextComponent({
|
|
3332
|
+
text: "Utilization & Errors",
|
|
3333
|
+
top: 10,
|
|
3334
|
+
left: 0,
|
|
3335
|
+
width: 12,
|
|
3336
|
+
height: 1,
|
|
3337
|
+
isBold: true,
|
|
3338
|
+
}),
|
|
3339
|
+
/*
|
|
3340
|
+
* Rows 11-13: the gauge an operator watches during an incident, the
|
|
3341
|
+
* error-rate gauge that leads it, and the per-interface error breakdown
|
|
3342
|
+
* that says WHICH port to look at.
|
|
3343
|
+
*/
|
|
3344
|
+
createGaugeComponent({
|
|
3345
|
+
title: "Peak Interface Utilization",
|
|
3346
|
+
top: 11,
|
|
3347
|
+
left: 0,
|
|
3348
|
+
width: 3,
|
|
3349
|
+
height: 3,
|
|
3350
|
+
minValue: 0,
|
|
3351
|
+
maxValue: 100,
|
|
3352
|
+
warningThreshold: 70,
|
|
3353
|
+
criticalThreshold: 90,
|
|
3354
|
+
metricConfig: {
|
|
3355
|
+
metricName: MonitorMetricType.SnmpInterfaceUtilizationPercent,
|
|
3356
|
+
aggregationType: MetricsAggregationType.Max,
|
|
3357
|
+
},
|
|
3358
|
+
}),
|
|
3359
|
+
createGaugeComponent({
|
|
3360
|
+
title: "Interface Error Rate",
|
|
3361
|
+
top: 11,
|
|
3362
|
+
left: 3,
|
|
3363
|
+
width: 3,
|
|
3364
|
+
height: 3,
|
|
3365
|
+
/*
|
|
3366
|
+
* A healthy Ethernet port errors essentially never, so the scale is
|
|
3367
|
+
* deliberately tight: a sustained one error per second is already a
|
|
3368
|
+
* cable, duplex or optic problem worth a ticket, and five is a link
|
|
3369
|
+
* on its way out. A 0-100 scale like the utilization gauge next to it
|
|
3370
|
+
* would render every real fault as a flat line on the floor.
|
|
3371
|
+
*/
|
|
3372
|
+
minValue: 0,
|
|
3373
|
+
maxValue: 10,
|
|
3374
|
+
warningThreshold: 1,
|
|
3375
|
+
criticalThreshold: 5,
|
|
3376
|
+
metricConfig: {
|
|
3377
|
+
metricName: MonitorMetricType.SnmpInterfaceErrorsPerSecond,
|
|
3378
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
3379
|
+
},
|
|
3380
|
+
}),
|
|
3381
|
+
createChartComponent({
|
|
3382
|
+
title: "Interface Errors by Interface",
|
|
3383
|
+
chartType: DashboardChartType.Bar,
|
|
3384
|
+
top: 11,
|
|
3385
|
+
left: 6,
|
|
3386
|
+
width: 6,
|
|
3387
|
+
height: 3,
|
|
3388
|
+
metricConfig: {
|
|
3389
|
+
metricName: MonitorMetricType.SnmpInterfaceErrorsPerSecond,
|
|
3390
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
3391
|
+
legend: "Errors/sec",
|
|
3392
|
+
groupByAttributeKeys: ["interfaceName"],
|
|
3393
|
+
},
|
|
3394
|
+
}),
|
|
3395
|
+
// Row 14: Section header
|
|
3396
|
+
createTextComponent({
|
|
3397
|
+
text: "Devices & Monitors",
|
|
3398
|
+
top: 14,
|
|
3399
|
+
left: 0,
|
|
3400
|
+
width: 12,
|
|
3401
|
+
height: 1,
|
|
3402
|
+
isBold: true,
|
|
3403
|
+
}),
|
|
3404
|
+
/*
|
|
3405
|
+
* Rows 15-18: utilization per interface, beside the monitors that page
|
|
3406
|
+
* somebody when a device stops answering. The list is pinned to Network
|
|
3407
|
+
* Device monitors — an unfiltered monitor list on a network dashboard is
|
|
3408
|
+
* just the Monitors page with fewer columns — and it is also this
|
|
3409
|
+
* dashboard's reachability view, correctly scoped in a way a shared
|
|
3410
|
+
* uptime metric could never be.
|
|
3411
|
+
*/
|
|
3412
|
+
createChartComponent({
|
|
3413
|
+
title: "Utilization by Interface",
|
|
3414
|
+
chartType: DashboardChartType.Line,
|
|
3415
|
+
top: 15,
|
|
3416
|
+
left: 0,
|
|
3417
|
+
width: 6,
|
|
3418
|
+
height: 4,
|
|
3419
|
+
metricConfig: {
|
|
3420
|
+
metricName: MonitorMetricType.SnmpInterfaceUtilizationPercent,
|
|
3421
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
3422
|
+
legend: "Utilization",
|
|
3423
|
+
legendUnit: "%",
|
|
3424
|
+
groupByAttributeKeys: ["interfaceName"],
|
|
3425
|
+
},
|
|
3426
|
+
}),
|
|
3427
|
+
createMonitorListComponent({
|
|
3428
|
+
title: "Network Device Monitors",
|
|
3429
|
+
top: 15,
|
|
3430
|
+
left: 6,
|
|
3431
|
+
width: 6,
|
|
3432
|
+
height: 4,
|
|
3433
|
+
maxRows: 25,
|
|
3434
|
+
monitorTypes: [MonitorType.NetworkDevice],
|
|
3435
|
+
}),
|
|
3436
|
+
];
|
|
3437
|
+
/*
|
|
3438
|
+
* Network device metrics are stored with BARE attribute keys
|
|
3439
|
+
* (`deviceName`, `interfaceName`) rather than the OTel `resource.` prefix
|
|
3440
|
+
* — see NetworkDeviceMetricUtil.buildDeviceMetricRow — so the variables
|
|
3441
|
+
* bind to the bare keys. Both are multi-select: comparing two uplinks, or
|
|
3442
|
+
* two branch routers, is the normal use rather than the exception.
|
|
3443
|
+
*/
|
|
3444
|
+
const variables = [
|
|
3445
|
+
createTelemetryAttributeVariable({
|
|
3446
|
+
name: "device",
|
|
3447
|
+
label: "Device",
|
|
3448
|
+
attributeKey: "deviceName",
|
|
3449
|
+
isMultiSelect: true,
|
|
3450
|
+
}),
|
|
3451
|
+
createTelemetryAttributeVariable({
|
|
3452
|
+
name: "interface",
|
|
3453
|
+
label: "Interface",
|
|
3454
|
+
attributeKey: "interfaceName",
|
|
3455
|
+
isMultiSelect: true,
|
|
3456
|
+
}),
|
|
3457
|
+
];
|
|
3458
|
+
return {
|
|
3459
|
+
_type: ObjectType.DashboardViewConfig,
|
|
3460
|
+
components,
|
|
3461
|
+
variables,
|
|
3462
|
+
heightInDashboardUnits: Math.max(DashboardSize.heightInDashboardUnits, 19),
|
|
3463
|
+
};
|
|
3464
|
+
}
|
|
3099
3465
|
export function getTemplateConfig(type) {
|
|
3100
3466
|
switch (type) {
|
|
3101
3467
|
case DashboardTemplateType.Monitor:
|
|
@@ -3120,6 +3486,8 @@ export function getTemplateConfig(type) {
|
|
|
3120
3486
|
return createMetricsDashboardConfig();
|
|
3121
3487
|
case DashboardTemplateType.Rum:
|
|
3122
3488
|
return createRumDashboardConfig();
|
|
3489
|
+
case DashboardTemplateType.Network:
|
|
3490
|
+
return createNetworkDashboardConfig();
|
|
3123
3491
|
case DashboardTemplateType.Blank:
|
|
3124
3492
|
return null;
|
|
3125
3493
|
}
|