@oneuptime/common 12.0.29 → 12.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/SecurityEvent.ts +48 -16
- package/Models/AnalyticsModels/ThreatIntelIndicator.ts +10 -5
- package/Models/DatabaseModels/AlertSeverity.ts +44 -0
- package/Models/DatabaseModels/DetectionRule.ts +16 -5
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +14 -5
- package/Models/DatabaseModels/IncidentSeverity.ts +44 -0
- package/Models/DatabaseModels/Index.ts +13 -0
- package/Models/DatabaseModels/NetworkDevice.ts +113 -3
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +88 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +22 -0
- package/Models/DatabaseModels/NetworkDeviceOidTemplate.ts +499 -0
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.ts +43 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.ts +662 -0
- package/Models/DatabaseModels/ProjectOnCallCalendarFeed.ts +584 -0
- package/Models/DatabaseModels/ThreatIntelFeed.ts +16 -5
- package/Models/DatabaseModels/UserOnCallCalendarFeed.ts +546 -0
- package/Models/DatabaseModels/UserOnCallShiftReminder.ts +231 -0
- package/Models/DatabaseModels/UserOnCallShiftReminderLog.ts +331 -0
- package/Server/API/GlobalConfigAPI.ts +362 -183
- package/Server/API/OnCallCalendarAPI.ts +2194 -0
- package/Server/API/TelemetryAPI.ts +42 -4
- package/Server/EnvironmentConfig.ts +250 -0
- package/Server/Infrastructure/OnCallCalendarFeedCache.ts +1050 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790400000000-AddOnCallCalendarFeeds.ts +253 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790500000000-AddNetworkDeviceOidTemplate.ts +59 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790600000000-AddAutoImportRuleOidTemplate.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
- package/Server/Middleware/MultipartFormData.ts +118 -32
- package/Server/Middleware/OnCallCalendarFeedRateLimit.ts +487 -0
- package/Server/Services/AlertEpisodeLabelRuleEngineService.ts +9 -1
- package/Server/Services/AlertEpisodeOnCallRuleEngineService.ts +9 -1
- package/Server/Services/AlertEpisodeOwnerRuleEngineService.ts +9 -1
- package/Server/Services/AlertEpisodePrivacyRuleEngineService.ts +9 -1
- package/Server/Services/AlertGroupingEngineService.ts +9 -1
- package/Server/Services/AlertLabelRuleEngineService.ts +9 -1
- package/Server/Services/AlertOnCallRuleEngineService.ts +9 -1
- package/Server/Services/AlertOwnerRuleEngineService.ts +9 -1
- package/Server/Services/AlertPrivacyRuleEngineService.ts +9 -1
- package/Server/Services/AlertReminderRuleService.ts +9 -1
- package/Server/Services/AutoRemediationRuleEngineService.ts +9 -1
- package/Server/Services/CephClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +9 -1
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/DashboardLabelRuleEngineService.ts +9 -1
- package/Server/Services/DashboardOwnerRuleEngineService.ts +9 -1
- package/Server/Services/DockerHostLabelRuleEngineService.ts +9 -1
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +9 -1
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/HostLabelRuleEngineService.ts +9 -1
- package/Server/Services/HostOwnerRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodeLabelRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodeOnCallRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodeOwnerRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodePrivacyRuleEngineService.ts +9 -1
- package/Server/Services/IncidentGroupingEngineService.ts +9 -1
- package/Server/Services/IncidentLabelRuleEngineService.ts +9 -1
- package/Server/Services/IncidentOnCallRuleEngineService.ts +9 -1
- package/Server/Services/IncidentOwnerRuleEngineService.ts +9 -1
- package/Server/Services/IncidentPrivacyRuleEngineService.ts +9 -1
- package/Server/Services/IncidentReminderRuleService.ts +9 -1
- package/Server/Services/IncidentSlaRuleService.ts +9 -1
- package/Server/Services/IncomingCallPolicyLabelRuleEngineService.ts +9 -1
- package/Server/Services/IncomingCallPolicyOwnerRuleEngineService.ts +9 -1
- package/Server/Services/Index.ts +14 -0
- package/Server/Services/IoTFleetLabelRuleEngineService.ts +9 -1
- package/Server/Services/IoTFleetOwnerRuleEngineService.ts +9 -1
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/KubernetesResourceService.ts +5 -1
- package/Server/Services/MonitorLabelRuleEngineService.ts +9 -1
- package/Server/Services/MonitorOwnerRuleEngineService.ts +9 -1
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +35 -0
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +96 -0
- package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +9 -1
- package/Server/Services/NetworkDeviceOidTemplateService.ts +201 -0
- package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/NetworkDeviceService.ts +209 -1
- package/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.ts +32 -0
- package/Server/Services/OnCallDutyPolicyLabelRuleEngineService.ts +9 -1
- package/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.ts +9 -1
- package/Server/Services/OnCallDutyPolicyScheduleCalendarFeedService.ts +260 -0
- package/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.ts +9 -1
- package/Server/Services/OnCallDutyPolicyScheduleLayerService.ts +70 -3
- package/Server/Services/OnCallDutyPolicyScheduleLayerUserService.ts +138 -3
- package/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.ts +9 -1
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +1465 -134
- package/Server/Services/OnCallDutyPolicyUserOverrideService.ts +167 -31
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +9 -1
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +9 -1
- package/Server/Services/ProjectOnCallCalendarFeedService.ts +192 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/RumApplicationLabelRuleEngineService.ts +9 -1
- package/Server/Services/RumApplicationOwnerRuleEngineService.ts +9 -1
- package/Server/Services/RunbookLabelRuleEngineService.ts +9 -1
- package/Server/Services/RunbookOwnerRuleEngineService.ts +9 -1
- package/Server/Services/RunbookRuleEngineService.ts +9 -1
- package/Server/Services/ScheduledMaintenanceLabelRuleEngineService.ts +9 -1
- package/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/ScheduledMaintenanceReminderRuleService.ts +9 -1
- package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +9 -1
- package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +9 -1
- package/Server/Services/ServiceLabelRuleEngineService.ts +9 -1
- package/Server/Services/ServiceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/StatusPageLabelRuleEngineService.ts +9 -1
- package/Server/Services/StatusPageMonitorRuleEngineService.ts +7 -0
- package/Server/Services/StatusPageOwnerRuleEngineService.ts +9 -1
- package/Server/Services/TeamMemberService.ts +489 -1
- package/Server/Services/TeamService.ts +50 -0
- package/Server/Services/TelemetrySourceMapService.ts +266 -23
- package/Server/Services/UserNotificationSettingService.ts +44 -1
- package/Server/Services/UserOnCallCalendarFeedService.ts +159 -0
- package/Server/Services/UserOnCallShiftReminderLogService.ts +151 -0
- package/Server/Services/UserOnCallShiftReminderService.ts +112 -0
- package/Server/Services/UserService.ts +27 -0
- package/Server/Services/WorkflowLabelRuleEngineService.ts +9 -1
- package/Server/Services/WorkflowOwnerRuleEngineService.ts +9 -1
- package/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.ts +186 -0
- package/Server/Utils/Monitor/CapturedMetricAttributeUtil.ts +245 -0
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +21 -2
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +55 -21
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +32 -0
- package/Server/Utils/Monitor/NetworkDeviceMetricUtil.ts +15 -2
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +18 -1
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +10 -0
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +34 -0
- package/Server/Utils/OnCall/CalendarFeedToken.ts +241 -0
- package/Server/Utils/OnCall/OnCallCalendarFeedRenderer.ts +1488 -0
- package/Server/Utils/OnCall/OnCallCalendarFeedUrls.ts +230 -0
- package/Server/Utils/OnCall/OnCallShiftChangeListeners.ts +227 -0
- package/Server/Utils/OnCall/OnCallShiftMaterializer.ts +1127 -0
- package/Server/Utils/OnCall/OnCallShiftReminderListener.ts +174 -0
- package/Server/Utils/OnCall/OnCallShiftReminderRunner.ts +2584 -0
- package/Server/Utils/Response.ts +134 -0
- package/Server/Utils/Rules/RuleEngineRuleRead.ts +48 -0
- package/Server/Utils/StartServer.ts +10 -0
- package/Server/Utils/Telemetry/AppMetrics.ts +51 -0
- package/Server/Utils/Telemetry/ExceptionSanitizer.ts +14 -1
- package/Server/Utils/Telemetry/LogExceptionExtractor.ts +14 -2
- package/Server/Utils/Telemetry/SourceMapResolver.ts +16 -5
- package/Server/Utils/Telemetry/StackTraceParser.ts +399 -0
- package/Tests/App/Dashboard/EventOverlayHook.test.tsx +125 -0
- package/Tests/App/Dashboard/HeaderImageAssets.test.tsx +93 -0
- package/Tests/App/Dashboard/OnCallCalendarFeedLinks.test.tsx +229 -0
- package/Tests/App/Dashboard/OnCallCalendarFeedPlanGate.test.tsx +489 -0
- package/Tests/App/Dashboard/OnCallCalendarFeedSideMenus.test.tsx +149 -0
- package/Tests/App/Dashboard/OnCallCalendarFeedUtil.test.ts +855 -0
- package/Tests/App/Dashboard/OnCallPersonalCalendarFeed.test.tsx +1209 -0
- package/Tests/App/Dashboard/OnCallReadinessSurfaces.test.tsx +3 -3
- package/Tests/App/Dashboard/OnCallSharedCalendarFeedCard.test.tsx +1019 -0
- package/Tests/App/Dashboard/OnCallShiftRemindersAndUpcomingShifts.test.tsx +655 -0
- package/Tests/App/Dashboard/UserElementEmail.test.tsx +12 -4
- package/Tests/App/Dashboard/UserEmailCallSites.test.tsx +1 -1
- package/Tests/App/Dashboard/UserSettingsSetupChecklistModel.test.ts +73 -0
- package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +14 -0
- package/Tests/Models/DatabaseModels/ModelRegistryInvariants.test.ts +469 -0
- package/Tests/Models/OnCallCalendarFeedModels.test.ts +642 -0
- package/Tests/Models/OnCallDutyPolicyScheduleCalendarFeed.test.ts +288 -0
- package/Tests/Models/OnCallDutyPolicyScheduleShiftConfigVersion.test.ts +88 -0
- package/Tests/Models/SecurityDomainAccessControl.test.ts +429 -0
- package/Tests/Models/UserOnCallShiftReminderModels.test.ts +368 -0
- package/Tests/Server/API/GlobalConfigLicense.test.ts +657 -0
- package/Tests/Server/API/Helpers.ts +8 -0
- package/Tests/Server/API/OnCallCalendarAPI.test.ts +4461 -0
- package/Tests/Server/API/SecurityEventAttributesAPI.test.ts +84 -6
- package/Tests/Server/API/TelemetryResolveStackTraceAPI.test.ts +805 -0
- package/Tests/Server/EnvironmentConfigOnCallCalendarFeed.test.ts +357 -0
- package/Tests/Server/Infrastructure/OnCallCalendarFeedCache.test.ts +1589 -0
- package/Tests/Server/Infrastructure/Postgres/AddOnCallCalendarFeedsMigration.test.ts +394 -0
- package/Tests/Server/Middleware/IdentityRateLimit.test.ts +1144 -0
- package/Tests/Server/Middleware/MultipartFormData.test.ts +618 -3
- package/Tests/Server/Middleware/OnCallCalendarFeedRateLimit.test.ts +1365 -0
- package/Tests/Server/Services/FeedRetentionConsistency.test.ts +70 -0
- package/Tests/Server/Services/MonitorLabelRuleEngineScale.test.ts +520 -0
- package/Tests/Server/Services/NetworkDeviceOidTemplateService.test.ts +332 -0
- package/Tests/Server/Services/NetworkDeviceOidTemplateWriteGuards.test.ts +409 -0
- package/Tests/Server/Services/OnCallCalendarFeedServices.test.ts +1103 -0
- package/Tests/Server/Services/OnCallDutyPolicyScheduleResolver.test.ts +1037 -0
- package/Tests/Server/Services/OnCallShiftConfigPropagation.test.ts +1270 -0
- package/Tests/Server/Services/RuleEngineRuleFetchLimit.test.ts +239 -0
- package/Tests/Server/Services/TeamDeleteMemberCleanup.test.ts +156 -0
- package/Tests/Server/Services/TeamMemberOnCallCleanup.test.ts +755 -0
- package/Tests/Server/Services/TelemetrySourceMapService.test.ts +1210 -2
- package/Tests/Server/Services/UserNotificationSettingShiftReminderDefaults.test.ts +267 -0
- package/Tests/Server/Services/UserOnCallShiftReminderServices.test.ts +583 -0
- package/Tests/Server/Services/UserServiceSeatLimit.test.ts +182 -0
- package/Tests/Server/Types/AnalyticsDatabase/SecurityEventModelPermission.test.ts +255 -0
- package/Tests/Server/Types/Database/Permissions/OnCallCalendarFeedPermissions.test.ts +254 -0
- package/Tests/Server/Types/Database/Permissions/ReadBlockPermission.test.ts +212 -0
- package/Tests/Server/Types/Database/Permissions/SecurityRoleAccess.test.ts +413 -0
- package/Tests/Server/Utils/CodeRepository.test.ts +689 -0
- package/Tests/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.test.ts +495 -0
- package/Tests/Server/Utils/ExceptionSanitizer.test.ts +77 -0
- package/Tests/Server/Utils/Monitor/CapturedMetricAttributeUtil.test.ts +284 -0
- package/Tests/Server/Utils/Monitor/MonitorCustomMetricAttributes.test.ts +503 -0
- package/Tests/Server/Utils/Monitor/MonitorTemplatePrototypePollution.test.ts +106 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkLogWritePath.test.ts +33 -4
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +14 -4
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +44 -0
- package/Tests/Server/Utils/OnCall/CalendarFeedToken.test.ts +467 -0
- package/Tests/Server/Utils/OnCall/OnCallCalendarFeedRenderer.test.ts +2142 -0
- package/Tests/Server/Utils/OnCall/OnCallCalendarFeedUrls.test.ts +278 -0
- package/Tests/Server/Utils/OnCall/OnCallResolverTestHarness.ts +440 -0
- package/Tests/Server/Utils/OnCall/OnCallShiftChangeListeners.test.ts +314 -0
- package/Tests/Server/Utils/OnCall/OnCallShiftMaterializer.test.ts +1502 -0
- package/Tests/Server/Utils/OnCall/OnCallShiftReminderListener.test.ts +491 -0
- package/Tests/Server/Utils/OnCall/OnCallShiftReminderRunner.test.ts +3088 -0
- package/Tests/Server/Utils/OnCall/OnCallShiftReminderTestHarness.ts +910 -0
- package/Tests/Server/Utils/OpenAPISpec.test.ts +536 -0
- package/Tests/Server/Utils/ResponseSendCalendarResponse.test.ts +561 -0
- package/Tests/Server/Utils/Rules/RuleEngineRuleRead.test.ts +115 -0
- package/Tests/Server/Utils/StackTraceParser.test.ts +610 -0
- package/Tests/Server/Utils/StartServerEncryptionSecretWarning.test.ts +64 -0
- package/Tests/Server/Utils/Telemetry/AppMetrics.test.ts +29 -0
- package/Tests/Server/Utils/Telemetry/LogExceptionExtractor.test.ts +0 -0
- package/Tests/Server/Utils/Telemetry/SourceMapLimits.test.ts +656 -0
- package/Tests/Server/Utils/Telemetry/SourceMapResolver.test.ts +100 -0
- package/Tests/Types/Calendar/ICalendar.test.ts +488 -0
- package/Tests/Types/Monitor/SnmpMonitor/SnmpOidListUtil.test.ts +454 -0
- package/Tests/Types/NotificationSetting/NotificationSettingEventType.test.ts +53 -0
- package/Tests/Types/OnCallDutyPolicy/CalendarFeedTestFixtures.ts +310 -0
- package/Tests/Types/OnCallDutyPolicy/CalendarFeedWindow.test.ts +205 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilLayerMetaAndIterationCap.test.ts +458 -0
- package/Tests/Types/OnCallDutyPolicy/MaterializedShift.test.ts +197 -0
- package/Tests/Types/OnCallDutyPolicy/OnCallCalendarFeedUtil.test.ts +1986 -0
- package/Tests/Types/OnCallDutyPolicy/ScheduleShiftUtilGroupKey.test.ts +678 -0
- package/Tests/Types/OnCallDutyPolicy/ShiftSeamUtil.test.ts +417 -0
- package/Tests/Types/SecurityRolePermissions.test.ts +193 -0
- package/Tests/UI/Components/Charts/AnnotationLayout.test.ts +773 -0
- package/Tests/UI/Components/Charts/ChartAnnotationRail.test.tsx +789 -0
- package/Tests/UI/Components/Charts/ChartBucketIdentity.test.ts +254 -0
- package/Tests/UI/Components/Charts/TimeAnnotation.test.ts +471 -0
- package/Tests/UI/Components/EditionLabelLicenseRefresh.test.tsx +405 -0
- package/Tests/UI/Components/ErrorMessageRefreshControl.test.tsx +83 -0
- package/Tests/UI/Components/MarkdownConverters.test.ts +686 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableDeleteAndEmptyStates.test.tsx +341 -0
- package/Tests/UI/Components/OrderedStatesList.test.tsx +5 -5
- package/Tests/UI/Components/PendingProjectInvitations.test.tsx +1 -1
- package/Tests/UI/Components/TableSortAndMobileColumns.test.tsx +195 -0
- package/Tests/UI/Components/XAxis.test.ts +270 -5
- package/Tests/UI/Components/XAxisDaylightSaving.test.ts +113 -0
- package/Tests/UI/Styles/ChartFocusRing.test.ts +153 -0
- package/Tests/UI/Styles/ChartFocusRingCoverage.test.tsx +377 -0
- package/Tests/UI/Styles/ThemeStylesheet.ts +162 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +10 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +2 -0
- package/Tests/Utils/EnterpriseLicenseSeats.test.ts +507 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +951 -1
- package/Tests/Utils/NetworkDiscovery/DiscoveredHostUtil.test.ts +238 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveryReverseDnsChain.test.ts +1056 -0
- package/Tests/Utils/NetworkDiscovery/ReverseDnsNameUtil.test.ts +882 -0
- package/Types/Calendar/ICalendar.ts +442 -0
- package/Types/Date.ts +39 -0
- package/Types/Email/EmailTemplateType.ts +2 -0
- package/Types/Monitor/SnmpMonitor/SnmpOidListUtil.ts +333 -0
- package/Types/NotificationSetting/NotificationSettingEventType.ts +4 -0
- package/Types/OnCallDutyPolicy/CalendarFeedWindow.ts +140 -0
- package/Types/OnCallDutyPolicy/Layer.ts +190 -35
- package/Types/OnCallDutyPolicy/MaterializedShift.ts +274 -0
- package/Types/OnCallDutyPolicy/OnCallCalendarFeedUtil.ts +1415 -0
- package/Types/OnCallDutyPolicy/ScheduleShiftUtil.ts +159 -4
- package/Types/OnCallDutyPolicy/ShiftSeamUtil.ts +106 -0
- package/Types/Permission.ts +96 -0
- package/Types/Rum/SessionReplay.ts +21 -0
- package/Types/Telemetry/SourceMap.ts +8 -0
- package/UI/Components/Charts/ChartLibrary/Annotations/AnnotationHoverCard.tsx +176 -0
- package/UI/Components/Charts/ChartLibrary/Annotations/AnnotationLayout.ts +745 -0
- package/UI/Components/Charts/ChartLibrary/Annotations/ChartAnnotationLayer.tsx +576 -0
- package/UI/Components/Charts/ChartLibrary/Annotations/UseChartAnnotations.tsx +204 -0
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +491 -544
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +324 -372
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +487 -540
- package/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.ts +7 -3
- package/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.ts +14 -3
- package/UI/Components/Charts/Types/ChartEventKind.ts +13 -0
- package/UI/Components/Charts/Types/ReferenceRegionProps.ts +6 -0
- package/UI/Components/Charts/Types/TimeReferenceLineProps.ts +20 -3
- package/UI/Components/Charts/Utils/TimeAnnotation.ts +69 -35
- package/UI/Components/Charts/Utils/XAxis.ts +125 -18
- package/UI/Components/EditionLabel/EditionLabel.tsx +280 -26
- package/UI/Components/ErrorMessage/ErrorMessage.tsx +21 -10
- package/UI/Components/Feed/FeedItem.tsx +4 -5
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +1 -2
- package/UI/Components/Header/UserProfile/UserProfile.tsx +1 -2
- package/UI/Components/Image/Image.tsx +20 -3
- package/UI/Components/Markdown.tsx/MarkdownConverters.ts +0 -0
- package/UI/Components/MemberRoleAssignment/MemberRoleAssignment.tsx +1 -2
- package/UI/Components/ModelTable/BaseModelTable.tsx +150 -24
- package/UI/Components/Table/TableHeader.tsx +64 -48
- package/UI/Components/Table/TableRow.tsx +13 -3
- package/UI/Styles/Theme.css +38 -0
- package/Utils/EnterpriseLicense/EnterpriseLicenseSeats.ts +271 -0
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +6 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +141 -10
- package/Utils/NetworkDiscovery/DiscoveredHostUtil.ts +55 -3
- package/Utils/NetworkDiscovery/ReverseDnsNameUtil.ts +151 -0
- package/Utils/Rules/RuleEngineLimits.ts +32 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js +48 -16
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js +10 -5
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +46 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +16 -5
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +14 -5
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +46 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +13 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +115 -3
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +88 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceOidTemplate.js +519 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOidTemplate.js.map +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js +44 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +699 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProjectOnCallCalendarFeed.js +620 -0
- package/build/dist/Models/DatabaseModels/ProjectOnCallCalendarFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +16 -5
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserOnCallCalendarFeed.js +585 -0
- package/build/dist/Models/DatabaseModels/UserOnCallCalendarFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallShiftReminder.js +247 -0
- package/build/dist/Models/DatabaseModels/UserOnCallShiftReminder.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallShiftReminderLog.js +355 -0
- package/build/dist/Models/DatabaseModels/UserOnCallShiftReminderLog.js.map +1 -0
- package/build/dist/Server/API/GlobalConfigAPI.js +293 -176
- package/build/dist/Server/API/GlobalConfigAPI.js.map +1 -1
- package/build/dist/Server/API/OnCallCalendarAPI.js +1371 -0
- package/build/dist/Server/API/OnCallCalendarAPI.js.map +1 -0
- package/build/dist/Server/API/TelemetryAPI.js +31 -3
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +185 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/OnCallCalendarFeedCache.js +663 -0
- package/build/dist/Server/Infrastructure/OnCallCalendarFeedCache.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790400000000-AddOnCallCalendarFeeds.js +103 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790400000000-AddOnCallCalendarFeeds.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790500000000-AddNetworkDeviceOidTemplate.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790500000000-AddNetworkDeviceOidTemplate.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790600000000-AddAutoImportRuleOidTemplate.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790600000000-AddAutoImportRuleOidTemplate.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/MultipartFormData.js +93 -28
- package/build/dist/Server/Middleware/MultipartFormData.js.map +1 -1
- package/build/dist/Server/Middleware/OnCallCalendarFeedRateLimit.js +342 -0
- package/build/dist/Server/Middleware/OnCallCalendarFeedRateLimit.js.map +1 -0
- package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodeOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertGroupingEngineService.js +8 -1
- package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertReminderRuleService.js +8 -1
- package/build/dist/Server/Services/AlertReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DashboardLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DashboardLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodeOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentGroupingEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentReminderRuleService.js +8 -1
- package/build/dist/Server/Services/IncidentReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSlaRuleService.js +8 -1
- package/build/dist/Server/Services/IncidentSlaRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.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/IoTFleetLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesResourceService.js +5 -1
- package/build/dist/Server/Services/KubernetesResourceService.js.map +1 -1
- package/build/dist/Server/Services/MonitorLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/MonitorLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +30 -21
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +64 -0
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceOidTemplateService.js +180 -0
- package/build/dist/Server/Services/NetworkDeviceOidTemplateService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +154 -1
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js +20 -0
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleCalendarFeedService.js +219 -0
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleCalendarFeedService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerService.js +47 -3
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerUserService.js +112 -3
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerUserService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +955 -9
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js +93 -6
- package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProjectOnCallCalendarFeedService.js +157 -0
- package/build/dist/Server/Services/ProjectOnCallCalendarFeedService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RunbookLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RunbookRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js +8 -1
- package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js +6 -0
- package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +396 -1
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/TeamService.js +43 -0
- package/build/dist/Server/Services/TeamService.js.map +1 -1
- package/build/dist/Server/Services/TelemetrySourceMapService.js +213 -19
- package/build/dist/Server/Services/TelemetrySourceMapService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationSettingService.js +26 -1
- package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
- package/build/dist/Server/Services/UserOnCallCalendarFeedService.js +140 -0
- package/build/dist/Server/Services/UserOnCallCalendarFeedService.js.map +1 -0
- package/build/dist/Server/Services/UserOnCallShiftReminderLogService.js +116 -0
- package/build/dist/Server/Services/UserOnCallShiftReminderLogService.js.map +1 -0
- package/build/dist/Server/Services/UserOnCallShiftReminderService.js +92 -0
- package/build/dist/Server/Services/UserOnCallShiftReminderService.js.map +1 -0
- package/build/dist/Server/Services/UserService.js +25 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.js +145 -0
- package/build/dist/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/CapturedMetricAttributeUtil.js +201 -0
- package/build/dist/Server/Utils/Monitor/CapturedMetricAttributeUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +19 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +42 -23
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +29 -0
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js +11 -2
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +16 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +10 -0
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +33 -0
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
- package/build/dist/Server/Utils/OnCall/CalendarFeedToken.js +161 -0
- package/build/dist/Server/Utils/OnCall/CalendarFeedToken.js.map +1 -0
- package/build/dist/Server/Utils/OnCall/OnCallCalendarFeedRenderer.js +983 -0
- package/build/dist/Server/Utils/OnCall/OnCallCalendarFeedRenderer.js.map +1 -0
- package/build/dist/Server/Utils/OnCall/OnCallCalendarFeedUrls.js +155 -0
- package/build/dist/Server/Utils/OnCall/OnCallCalendarFeedUrls.js.map +1 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftChangeListeners.js +145 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftChangeListeners.js.map +1 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftMaterializer.js +752 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftMaterializer.js.map +1 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftReminderListener.js +92 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftReminderListener.js.map +1 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftReminderRunner.js +1786 -0
- package/build/dist/Server/Utils/OnCall/OnCallShiftReminderRunner.js.map +1 -0
- package/build/dist/Server/Utils/Response.js +97 -0
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/Rules/RuleEngineRuleRead.js +37 -0
- package/build/dist/Server/Utils/Rules/RuleEngineRuleRead.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +9 -1
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/AppMetrics.js +41 -0
- package/build/dist/Server/Utils/Telemetry/AppMetrics.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ExceptionSanitizer.js +12 -1
- package/build/dist/Server/Utils/Telemetry/ExceptionSanitizer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LogExceptionExtractor.js +14 -2
- package/build/dist/Server/Utils/Telemetry/LogExceptionExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js +15 -5
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/StackTraceParser.js +307 -0
- package/build/dist/Server/Utils/Telemetry/StackTraceParser.js.map +1 -1
- package/build/dist/Types/Calendar/ICalendar.js +290 -0
- package/build/dist/Types/Calendar/ICalendar.js.map +1 -0
- package/build/dist/Types/Date.js +27 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +2 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpOidListUtil.js +253 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpOidListUtil.js.map +1 -0
- package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js +3 -0
- package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/CalendarFeedWindow.js +97 -0
- package/build/dist/Types/OnCallDutyPolicy/CalendarFeedWindow.js.map +1 -0
- package/build/dist/Types/OnCallDutyPolicy/Layer.js +113 -19
- package/build/dist/Types/OnCallDutyPolicy/Layer.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/MaterializedShift.js +134 -0
- package/build/dist/Types/OnCallDutyPolicy/MaterializedShift.js.map +1 -0
- package/build/dist/Types/OnCallDutyPolicy/OnCallCalendarFeedUtil.js +800 -0
- package/build/dist/Types/OnCallDutyPolicy/OnCallCalendarFeedUtil.js.map +1 -0
- package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js +97 -3
- package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/ShiftSeamUtil.js +77 -0
- package/build/dist/Types/OnCallDutyPolicy/ShiftSeamUtil.js.map +1 -0
- package/build/dist/Types/Permission.js +86 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Rum/SessionReplay.js +19 -0
- package/build/dist/Types/Rum/SessionReplay.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationHoverCard.js +83 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationHoverCard.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationLayout.js +531 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationLayout.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/ChartAnnotationLayer.js +264 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/UseChartAnnotations.js +122 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/UseChartAnnotations.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +213 -233
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +139 -152
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +212 -232
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ChartEventKind.js +14 -0
- package/build/dist/UI/Components/Charts/Types/ChartEventKind.js.map +1 -0
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js +57 -28
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/XAxis.js +103 -17
- package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +198 -23
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js +15 -5
- package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/build/dist/UI/Components/Feed/FeedItem.js +4 -5
- package/build/dist/UI/Components/Feed/FeedItem.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +1 -2
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/Header/UserProfile/UserProfile.js.map +1 -1
- package/build/dist/UI/Components/Image/Image.js +6 -1
- package/build/dist/UI/Components/Image/Image.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownConverters.js +0 -0
- package/build/dist/UI/Components/Markdown.tsx/MarkdownConverters.js.map +1 -1
- package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js +1 -2
- package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +104 -23
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/Table/TableHeader.js +20 -22
- package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
- package/build/dist/UI/Components/Table/TableRow.js +13 -4
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js +153 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +127 -7
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js +50 -3
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/ReverseDnsNameUtil.js +132 -0
- package/build/dist/Utils/NetworkDiscovery/ReverseDnsNameUtil.js.map +1 -0
- package/build/dist/Utils/Rules/RuleEngineLimits.js +31 -0
- package/build/dist/Utils/Rules/RuleEngineLimits.js.map +1 -0
- package/jest.config.json +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import BadDataException from "../../../Types/Exception/BadDataException";
|
|
2
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
3
|
+
import EnterpriseLicenseSeatsUtil from "../../../Utils/EnterpriseLicense/EnterpriseLicenseSeats";
|
|
4
|
+
import { IsBillingEnabled, IsEnterpriseEdition } from "../../EnvironmentConfig";
|
|
5
|
+
import GlobalConfigService from "../../Services/GlobalConfigService";
|
|
6
|
+
/*
|
|
7
|
+
* Enforcement of the enterprise license seat limit on a self-hosted
|
|
8
|
+
* installation.
|
|
9
|
+
*
|
|
10
|
+
* The limit itself is set on oneuptime.com and mirrored into GlobalConfig by
|
|
11
|
+
* the daily report job (and by validating or refreshing the license by hand).
|
|
12
|
+
* This is the half that acts on it: it is the only thing standing between a
|
|
13
|
+
* customer's license terms and an unbounded User table.
|
|
14
|
+
*
|
|
15
|
+
* The seat arithmetic lives in Common/Utils/EnterpriseLicense/EnterpriseLicenseSeats
|
|
16
|
+
* as a pure function; everything here is about reading the license state and
|
|
17
|
+
* deciding whether the installation is one that enforces at all.
|
|
18
|
+
*/
|
|
19
|
+
export default class EnterpriseLicenseSeatUtil {
|
|
20
|
+
/*
|
|
21
|
+
* Whether this process is an installation whose users are governed by an
|
|
22
|
+
* enterprise license at all.
|
|
23
|
+
*
|
|
24
|
+
* Community Edition has no license and no limit. oneuptime.com runs with
|
|
25
|
+
* billing enabled and bounds seats through subscriptions instead
|
|
26
|
+
* (TeamMemberService.onBeforeCreate) — enforcing a license limit there as
|
|
27
|
+
* well would be a second, wrong answer to the same question.
|
|
28
|
+
*/
|
|
29
|
+
static isSeatLimitEnforceable() {
|
|
30
|
+
return IsEnterpriseEdition && !IsBillingEnabled;
|
|
31
|
+
}
|
|
32
|
+
/*
|
|
33
|
+
* Seat usage derived from an already-loaded GlobalConfig row. Kept separate
|
|
34
|
+
* from the loading so a caller that has the row in hand — the license
|
|
35
|
+
* endpoint, which has just read it — does not read it a second time.
|
|
36
|
+
*
|
|
37
|
+
* A null config (a fresh installation whose GlobalConfig has not been seeded
|
|
38
|
+
* yet) yields no limit, which is the same answer as a licence with no seat
|
|
39
|
+
* limit set.
|
|
40
|
+
*/
|
|
41
|
+
static getSeatUsageFromGlobalConfig(data) {
|
|
42
|
+
const config = data.config;
|
|
43
|
+
const instances = Array.isArray(config === null || config === void 0 ? void 0 : config.enterpriseLicenseInstances)
|
|
44
|
+
? config.enterpriseLicenseInstances
|
|
45
|
+
: [];
|
|
46
|
+
return EnterpriseLicenseSeatsUtil.getSeatUsage({
|
|
47
|
+
userLimit: config === null || config === void 0 ? void 0 : config.enterpriseLicenseUserLimit,
|
|
48
|
+
localUserCount: data.localUserCount,
|
|
49
|
+
aggregatedUserCount: config === null || config === void 0 ? void 0 : config.enterpriseLicenseCurrentUserCount,
|
|
50
|
+
instances: instances,
|
|
51
|
+
thisInstanceId: (config === null || config === void 0 ? void 0 : config.instanceId) ? config.instanceId.toString() : null,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/*
|
|
55
|
+
* Seat usage for this installation right now, or null on an installation
|
|
56
|
+
* that does not enforce a seat limit.
|
|
57
|
+
*
|
|
58
|
+
* Null rather than an unenforced SeatUsage so callers cannot accidentally
|
|
59
|
+
* present Community Edition with a seat report it has no business having,
|
|
60
|
+
* and so the user count is never queried there.
|
|
61
|
+
*/
|
|
62
|
+
static async getSeatUsage(data) {
|
|
63
|
+
if (!this.isSeatLimitEnforceable()) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const config = await GlobalConfigService.findOneById({
|
|
67
|
+
id: ObjectID.getZeroObjectID(),
|
|
68
|
+
select: {
|
|
69
|
+
enterpriseLicenseUserLimit: true,
|
|
70
|
+
enterpriseLicenseCurrentUserCount: true,
|
|
71
|
+
enterpriseLicenseInstances: true,
|
|
72
|
+
instanceId: true,
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
isRoot: true,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
return this.getSeatUsageForLoadedGlobalConfig({
|
|
79
|
+
config: config,
|
|
80
|
+
getLocalUserCount: data.getLocalUserCount,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/*
|
|
84
|
+
* The same answer as getSeatUsage, for a caller that has already loaded the
|
|
85
|
+
* GlobalConfig row (the license endpoint reads it to build its response, and
|
|
86
|
+
* reading it twice per request would be silly).
|
|
87
|
+
*
|
|
88
|
+
* The row must have been selected with enterpriseLicenseUserLimit,
|
|
89
|
+
* enterpriseLicenseCurrentUserCount, enterpriseLicenseInstances and
|
|
90
|
+
* instanceId, or the numbers here are a fiction built from missing columns.
|
|
91
|
+
*/
|
|
92
|
+
static async getSeatUsageForLoadedGlobalConfig(data) {
|
|
93
|
+
if (!this.isSeatLimitEnforceable()) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
/*
|
|
97
|
+
* The seat limit is read before the users are counted, and the count is
|
|
98
|
+
* skipped entirely when there is no limit. An unlimited licence is the
|
|
99
|
+
* common case on a large installation, and that is exactly the
|
|
100
|
+
* installation where counting the User table on every user creation would
|
|
101
|
+
* be worth avoiding.
|
|
102
|
+
*/
|
|
103
|
+
const withoutLocalUsers = this.getSeatUsageFromGlobalConfig({
|
|
104
|
+
config: data.config,
|
|
105
|
+
localUserCount: 0,
|
|
106
|
+
});
|
|
107
|
+
if (!withoutLocalUsers.isEnforced) {
|
|
108
|
+
return withoutLocalUsers;
|
|
109
|
+
}
|
|
110
|
+
return this.getSeatUsageFromGlobalConfig({
|
|
111
|
+
config: data.config,
|
|
112
|
+
localUserCount: await data.getLocalUserCount(),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/*
|
|
116
|
+
* Throws if this installation cannot take another user.
|
|
117
|
+
*
|
|
118
|
+
* Called from UserService.onBeforeCreate, which every path that creates a
|
|
119
|
+
* user goes through — team invitations, self-service signup, SSO and OIDC
|
|
120
|
+
* just-in-time provisioning, SCIM, and the Admin Dashboard. Enforcing on the
|
|
121
|
+
* User row rather than on the invitation is what makes that true: a seat is
|
|
122
|
+
* consumed by a person existing on the installation, not by the particular
|
|
123
|
+
* door they came through.
|
|
124
|
+
*
|
|
125
|
+
* It is also why this deliberately does NOT exempt root/internal writes.
|
|
126
|
+
* Team invitations create the invited user with `isRoot: true`, so an
|
|
127
|
+
* isRoot escape hatch here would exempt the single most important path.
|
|
128
|
+
*/
|
|
129
|
+
static async assertSeatAvailableForNewUser(data) {
|
|
130
|
+
const seatUsage = await this.getSeatUsage({
|
|
131
|
+
getLocalUserCount: data.getLocalUserCount,
|
|
132
|
+
});
|
|
133
|
+
if (!seatUsage || !seatUsage.isEnforced) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (seatUsage.hasSeatForNewUser) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
throw new BadDataException(EnterpriseLicenseSeatsUtil.getSeatLimitReachedMessage({
|
|
140
|
+
seatsInUse: seatUsage.seatsInUse,
|
|
141
|
+
userLimit: seatUsage.userLimit,
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=EnterpriseLicenseSeatUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnterpriseLicenseSeatUtil.js","sourceRoot":"","sources":["../../../../../Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,MAAM,2CAA2C,CAAC;AACzE,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,0BAEN,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AAWrE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,yBAAyB;IAC5C;;;;;;;;OAQG;IACI,MAAM,CAAC,sBAAsB;QAClC,OAAO,mBAAmB,IAAI,CAAC,gBAAgB,CAAC;IAClD,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,4BAA4B,CAAC,IAG1C;QACC,MAAM,MAAM,GAAwB,IAAI,CAAC,MAAM,CAAC;QAEhD,MAAM,SAAS,GAA4C,KAAK,CAAC,OAAO,CACtE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,0BAA0B,CACnC;YACC,CAAC,CAAC,MAAM,CAAC,0BAA0B;YACnC,CAAC,CAAC,EAAE,CAAC;QAEP,OAAO,0BAA0B,CAAC,YAAY,CAAC;YAC7C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AAC;SAClB,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC;YAClC,OAAO,iBAAiB,CAAC;QAC3B,CAAC;QAED,OAAO,IAAI,CAAC,4BAA4B,CAAC;YACvC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,cAAc,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,IAEjD;QACC,MAAM,SAAS,GAAqB,MAAM,IAAI,CAAC,YAAY,CAAC;YAC1D,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SAC1C,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;YACxC,OAAO;QACT,CAAC;QAED,IAAI,SAAS,CAAC,iBAAiB,EAAE,CAAC;YAChC,OAAO;QACT,CAAC;QAED,MAAM,IAAI,gBAAgB,CACxB,0BAA0B,CAAC,0BAA0B,CAAC;YACpD,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,SAAS,EAAE,SAAS,CAAC,SAAmB;SACzC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { AllResourceIdentityLabelKeys } from "./SeriesResourceLabels";
|
|
2
|
+
/*
|
|
3
|
+
* ---------------------------------------------------------------------------
|
|
4
|
+
* Attributes a monitor SCRIPT chose, on their way into ClickHouse
|
|
5
|
+
* ---------------------------------------------------------------------------
|
|
6
|
+
*
|
|
7
|
+
* Custom code and synthetic monitors let a user's script name its own metric
|
|
8
|
+
* dimensions:
|
|
9
|
+
*
|
|
10
|
+
* oneuptime.captureMetric("api.queue.depth", 12, { region: "us-east-1" })
|
|
11
|
+
*
|
|
12
|
+
* Everything else that writes a metric row picks its own attribute keys from a
|
|
13
|
+
* fixed vocabulary. This is the one writer where the KEY is user input, so it
|
|
14
|
+
* is the one writer that needs a guard, and this module is it.
|
|
15
|
+
*
|
|
16
|
+
* Two classes of key are refused.
|
|
17
|
+
*
|
|
18
|
+
* 1. RESOURCE IDENTITY. A metric row is not just a datapoint — it is a claim
|
|
19
|
+
* about which resource the datapoint describes. `SeriesResourceLabels`
|
|
20
|
+
* lists the attribute names that carry that claim (`service.name`,
|
|
21
|
+
* `oneuptime.host.id`, `k8s.cluster.name`, ...), and the consumers take
|
|
22
|
+
* them at face value.
|
|
23
|
+
*
|
|
24
|
+
* Two consequences, one immediate and one a step removed. Immediately, the
|
|
25
|
+
* resource detail pages scope their charts by the raw attribute rather
|
|
26
|
+
* than by the owning entity's id — Service > Metrics pins
|
|
27
|
+
* `resource.service.name = <the service's name>` — so a script stamping
|
|
28
|
+
* that key files its monitor's datapoints onto an unrelated Service's
|
|
29
|
+
* page. A step removed, ANY metric monitor grouped by one of these keys
|
|
30
|
+
* turns it into a series label, and from there `SeriesResourceLinker`
|
|
31
|
+
* attaches the named resource to every alert and incident that series
|
|
32
|
+
* opens, `AlertOwnerRuleEngineService` pages that resource's owners
|
|
33
|
+
* through owner inheritance, and `MonitorMaintenanceSuppression` silences
|
|
34
|
+
* the series for the duration of a maintenance window on it. (A custom
|
|
35
|
+
* code monitor's OWN alerts carry no series labels, so that second chain
|
|
36
|
+
* needs a metric monitor over the `custom.monitor.*` series — which is an
|
|
37
|
+
* ordinary thing for the same user to build.)
|
|
38
|
+
*
|
|
39
|
+
* The blocklist is DERIVED from `AllResourceIdentityLabelKeys` so a key
|
|
40
|
+
* added to the read side cannot be forgotten here.
|
|
41
|
+
*
|
|
42
|
+
* The whole `oneuptime.` and `resource.` namespaces go with them.
|
|
43
|
+
* `oneuptime.*` is what ingest stamps (ids, names, labels, custom fields);
|
|
44
|
+
* `resource.*` is the ClickHouse spelling of an OTel resource attribute,
|
|
45
|
+
* and a monitor metric has no OTel resource — so a script writing there is
|
|
46
|
+
* always impersonating something. Blocking the namespaces rather than the
|
|
47
|
+
* individual keys is what makes this hold for stamps added later.
|
|
48
|
+
*
|
|
49
|
+
* 2. PROTOTYPE-WALKING SEGMENTS. Dotted keys are read back as nested paths
|
|
50
|
+
* (`{{host.name}}` in an alert template walks `host` then `name`), so a
|
|
51
|
+
* segment of `__proto__` / `constructor` / `prototype` aims that walk at
|
|
52
|
+
* `Object.prototype`. `MonitorTemplateUtil` refuses to walk them, and this
|
|
53
|
+
* keeps them out of the store in the first place.
|
|
54
|
+
*
|
|
55
|
+
* Values are coerced rather than filtered. The sandbox hands over whatever
|
|
56
|
+
* JSON the script passed, and the ClickHouse column is Map(String, String), so
|
|
57
|
+
* a number or a boolean is a perfectly good dimension once stringified — which
|
|
58
|
+
* is what the synthetic runtime already does in-sandbox. The custom code path
|
|
59
|
+
* used to drop them on the floor server-side instead, so
|
|
60
|
+
* `captureMetric("queue.depth", n, { shard: 3 })` silently recorded no `shard`
|
|
61
|
+
* at all. Anything with no useful string form (objects, arrays, null, NaN,
|
|
62
|
+
* Infinity) is still dropped.
|
|
63
|
+
*
|
|
64
|
+
* The caps match the synthetic runtime's in-sandbox caps exactly. They are
|
|
65
|
+
* re-applied here because a probe is a separately deployed process: the server
|
|
66
|
+
* must not take the probe's word for how much a script was allowed to write.
|
|
67
|
+
*/
|
|
68
|
+
/** Most attributes kept on one captured metric. Matches the synthetic runtime. */
|
|
69
|
+
export const MaxCapturedMetricAttributes = 50;
|
|
70
|
+
/** Longest attribute key kept. Matches the synthetic runtime. */
|
|
71
|
+
export const MaxCapturedMetricAttributeKeyLength = 200;
|
|
72
|
+
/** Longest attribute value kept. Matches the synthetic runtime. */
|
|
73
|
+
export const MaxCapturedMetricAttributeValueLength = 1000;
|
|
74
|
+
/*
|
|
75
|
+
* The monitor's own identity, stamped by `buildMonitorMetricAttributes` and by
|
|
76
|
+
* the custom-metric block itself. A script that could overwrite these would be
|
|
77
|
+
* able to file its datapoints under a different monitor, or hide them from the
|
|
78
|
+
* Custom Metrics tab.
|
|
79
|
+
*/
|
|
80
|
+
const MonitorIdentityAttributeKeys = [
|
|
81
|
+
"monitorId",
|
|
82
|
+
"projectId",
|
|
83
|
+
"monitorName",
|
|
84
|
+
"probeName",
|
|
85
|
+
"probeId",
|
|
86
|
+
"isCustomMetric",
|
|
87
|
+
];
|
|
88
|
+
/*
|
|
89
|
+
* Namespace prefixes reserved for OneUptime's own stamps. `oneuptime.` covers
|
|
90
|
+
* every id / name / label / customField stamp; `resource.` covers the
|
|
91
|
+
* ClickHouse spelling of OTel resource attributes.
|
|
92
|
+
*/
|
|
93
|
+
const ReservedAttributeKeyPrefixes = [
|
|
94
|
+
"oneuptime.",
|
|
95
|
+
"resource.",
|
|
96
|
+
];
|
|
97
|
+
/*
|
|
98
|
+
* Path segments that make a dotted key resolve to the object prototype when a
|
|
99
|
+
* consumer walks it as a nested property path.
|
|
100
|
+
*/
|
|
101
|
+
const PrototypeWalkingKeySegments = new Set([
|
|
102
|
+
"__proto__",
|
|
103
|
+
"constructor",
|
|
104
|
+
"prototype",
|
|
105
|
+
]);
|
|
106
|
+
const ReservedAttributeKeys = new Set([
|
|
107
|
+
...MonitorIdentityAttributeKeys,
|
|
108
|
+
...AllResourceIdentityLabelKeys,
|
|
109
|
+
]);
|
|
110
|
+
export default class CapturedMetricAttributeUtil {
|
|
111
|
+
/**
|
|
112
|
+
* True when a monitor script must not be allowed to write this attribute
|
|
113
|
+
* key, either because OneUptime owns its meaning or because reading it back
|
|
114
|
+
* as a nested path would walk the object prototype.
|
|
115
|
+
*
|
|
116
|
+
* Compared case-sensitively, exactly as the read side compares
|
|
117
|
+
* (`SeriesResourceLabels.collectLabelValues` does a plain lookup), so this
|
|
118
|
+
* refuses precisely the spellings that would actually be honoured.
|
|
119
|
+
*/
|
|
120
|
+
static isReservedAttributeKey(key) {
|
|
121
|
+
if (ReservedAttributeKeys.has(key)) {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
for (const prefix of ReservedAttributeKeyPrefixes) {
|
|
125
|
+
if (key.startsWith(prefix)) {
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
for (const segment of key.split(".")) {
|
|
130
|
+
if (PrototypeWalkingKeySegments.has(segment)) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The attributes of one captured metric, filtered, coerced and capped.
|
|
138
|
+
*
|
|
139
|
+
* First key wins on a post-trim collision, so the result does not depend on
|
|
140
|
+
* how the script happened to order two keys that differ only in whitespace.
|
|
141
|
+
*/
|
|
142
|
+
static sanitize(attributes) {
|
|
143
|
+
const sanitized = {};
|
|
144
|
+
const droppedReservedKeys = [];
|
|
145
|
+
if (!attributes || typeof attributes !== "object") {
|
|
146
|
+
return { attributes: sanitized, droppedReservedKeys };
|
|
147
|
+
}
|
|
148
|
+
let kept = 0;
|
|
149
|
+
for (const rawKey of Object.keys(attributes)) {
|
|
150
|
+
if (kept >= MaxCapturedMetricAttributes) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
/*
|
|
154
|
+
* An empty or whitespace-only key would store as an attribute no filter
|
|
155
|
+
* could ever select — the same thing MetricResourceAttributeUtil refuses
|
|
156
|
+
* to form for labels and custom fields.
|
|
157
|
+
*/
|
|
158
|
+
const key = rawKey
|
|
159
|
+
.trim()
|
|
160
|
+
.substring(0, MaxCapturedMetricAttributeKeyLength);
|
|
161
|
+
if (key.length === 0) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (this.isReservedAttributeKey(key)) {
|
|
165
|
+
if (!droppedReservedKeys.includes(key)) {
|
|
166
|
+
droppedReservedKeys.push(key);
|
|
167
|
+
}
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (sanitized[key] !== undefined) {
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
const value = this.toAttributeValue(attributes[rawKey]);
|
|
174
|
+
if (value === null) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
sanitized[key] = value;
|
|
178
|
+
kept++;
|
|
179
|
+
}
|
|
180
|
+
return { attributes: sanitized, droppedReservedKeys };
|
|
181
|
+
}
|
|
182
|
+
/*
|
|
183
|
+
* One attribute value as the string the Map(String, String) column stores.
|
|
184
|
+
* Returns null for anything that carries no usable dimension — an object, an
|
|
185
|
+
* array, null/undefined, or a non-finite number, which would record as the
|
|
186
|
+
* text "NaN" and chart as a category.
|
|
187
|
+
*/
|
|
188
|
+
static toAttributeValue(value) {
|
|
189
|
+
if (typeof value === "string") {
|
|
190
|
+
return value.substring(0, MaxCapturedMetricAttributeValueLength);
|
|
191
|
+
}
|
|
192
|
+
if (typeof value === "number") {
|
|
193
|
+
return isFinite(value) ? String(value) : null;
|
|
194
|
+
}
|
|
195
|
+
if (typeof value === "boolean") {
|
|
196
|
+
return value ? "true" : "false";
|
|
197
|
+
}
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=CapturedMetricAttributeUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CapturedMetricAttributeUtil.js","sourceRoot":"","sources":["../../../../../Server/Utils/Monitor/CapturedMetricAttributeUtil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,kFAAkF;AAClF,MAAM,CAAC,MAAM,2BAA2B,GAAW,EAAE,CAAC;AAEtD,iEAAiE;AACjE,MAAM,CAAC,MAAM,mCAAmC,GAAW,GAAG,CAAC;AAE/D,mEAAmE;AACnE,MAAM,CAAC,MAAM,qCAAqC,GAAW,IAAI,CAAC;AAElE;;;;;GAKG;AACH,MAAM,4BAA4B,GAA0B;IAC1D,WAAW;IACX,WAAW;IACX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AAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAChD,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QAClC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -12,6 +12,7 @@ import PerEntityCriteriaFanOut from "../PerEntityCriteriaFanOut";
|
|
|
12
12
|
import { AnomalyDetectionSensitivity, CheckOn, CriteriaFilterUtil, FilterType, } from "../../../../Types/Monitor/CriteriaFilter";
|
|
13
13
|
import MonitorMetricType from "../../../../Types/Monitor/MonitorMetricType";
|
|
14
14
|
import OneUptimeDate from "../../../../Types/Date";
|
|
15
|
+
import SnmpOidListUtil from "../../../../Types/Monitor/SnmpMonitor/SnmpOidListUtil";
|
|
15
16
|
import EvaluateOverTime from "./EvaluateOverTime";
|
|
16
17
|
import MetricBaselineService, { MetricBaselineService as MetricBaselineServiceClass, } from "../../../Services/MetricBaselineService";
|
|
17
18
|
import CaptureSpan from "../../Telemetry/CaptureSpan";
|
|
@@ -319,8 +320,16 @@ export default class SnmpMonitorCriteria {
|
|
|
319
320
|
if (!oid) {
|
|
320
321
|
return null;
|
|
321
322
|
}
|
|
323
|
+
/*
|
|
324
|
+
* Compare canonical forms. ".1.3.6.1" and "1.3.6.1" are the same
|
|
325
|
+
* object, operators type both, and net-snmp always answers with the
|
|
326
|
+
* dotless form — so a stored leading dot used to make the criterion
|
|
327
|
+
* silently un-matchable forever. Newly reachable now that the OID
|
|
328
|
+
* picker actually writes a value.
|
|
329
|
+
*/
|
|
330
|
+
const normalizedOid = SnmpOidListUtil.normalizeOid(oid);
|
|
322
331
|
const oidResponse = (_d = snmpResponse === null || snmpResponse === void 0 ? void 0 : snmpResponse.oidResponses) === null || _d === void 0 ? void 0 : _d.find((response) => {
|
|
323
|
-
return response.oid ===
|
|
332
|
+
return SnmpOidListUtil.normalizeOid(response.oid) === normalizedOid;
|
|
324
333
|
});
|
|
325
334
|
const exists = Boolean(oidResponse && oidResponse.value !== null);
|
|
326
335
|
const isTrue = input.criteriaFilter.filterType === FilterType.True;
|
|
@@ -339,8 +348,16 @@ export default class SnmpMonitorCriteria {
|
|
|
339
348
|
if (!oid) {
|
|
340
349
|
return null;
|
|
341
350
|
}
|
|
351
|
+
/*
|
|
352
|
+
* Compare canonical forms. ".1.3.6.1" and "1.3.6.1" are the same
|
|
353
|
+
* object, operators type both, and net-snmp always answers with the
|
|
354
|
+
* dotless form — so a stored leading dot used to make the criterion
|
|
355
|
+
* silently un-matchable forever. Newly reachable now that the OID
|
|
356
|
+
* picker actually writes a value.
|
|
357
|
+
*/
|
|
358
|
+
const normalizedOid = SnmpOidListUtil.normalizeOid(oid);
|
|
342
359
|
const oidResponse = (_f = snmpResponse === null || snmpResponse === void 0 ? void 0 : snmpResponse.oidResponses) === null || _f === void 0 ? void 0 : _f.find((response) => {
|
|
343
|
-
return response.oid ===
|
|
360
|
+
return SnmpOidListUtil.normalizeOid(response.oid) === normalizedOid;
|
|
344
361
|
});
|
|
345
362
|
if (!oidResponse || oidResponse.value === null) {
|
|
346
363
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnmpMonitorCriteria.js","sourceRoot":"","sources":["../../../../../../Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,uBAAuB,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,2BAA2B,EAC3B,OAAO,EAEP,kBAAkB,EAClB,UAAU,GACX,MAAM,0CAA0C,CAAC;AAClD,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAE5E,OAAO,aAAa,MAAM,wBAAwB,CAAC;AAOnD,OAAO,gBAA2C,MAAM,oBAAoB,CAAC;AAC7E,OAAO,qBAAqB,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,CAAC;wBACnE,KAAK,EAAE,YAAY;wBACnB,SAAS,EAAE,gBAAgB;wBAC3B,cAAc,EAAE,KAAK,CAAC,cAAc;qBACrC,CAAC,CAAC;oBAEH,IAAI,MAAM,EAAE,CAAC;wBACX,OAAO,YAAY,GAAG,KAAK,WAAW,CAAC,IAAI,IAAI,GAAG,MAAM,MAAM,EAAE,CAAC;oBACnE,CAAC;gBACH,CAAC;YACH,CAAC;YAED,oBAAoB;YACpB,MAAM,MAAM,GAAkB,eAAe,CAAC,sBAAsB,CAAC;gBACnE,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC;gBACvB,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC;gBAC5B,cAAc,EAAE,KAAK,CAAC,cAAc;aACrC,CAAC,CAAC;YAEH,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,YAAY,GAAG,KAAK,WAAW,CAAC,IAAI,IAAI,GAAG,MAAM,MAAM,EAAE,CAAC;YACnE,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAzWqB;IADnB,WAAW,EAAE;;;;mEAyWb"}
|
|
1
|
+
{"version":3,"file":"SnmpMonitorCriteria.js","sourceRoot":"","sources":["../../../../../../Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,uBAAuB,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,2BAA2B,EAC3B,OAAO,EAEP,kBAAkB,EAClB,UAAU,GACX,MAAM,0CAA0C,CAAC;AAClD,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAE5E,OAAO,aAAa,MAAM,wBAAwB,CAAC;AAKnD,OAAO,eAAe,MAAM,uDAAuD,CAAC;AAGpF,OAAO,gBAA2C,MAAM,oBAAoB,CAAC;AAC7E,OAAO,qBAAqB,EAAE,EAE5B,qBAAqB,IAAI,0BAA0B,GACpD,MAAM,yCAAyC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CAAC;gBAC7D,MAAM,gBAAgB,GACpB,eAAe,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;gBAE7C,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;oBAC9B,MAAM,MAAM,GAAkB,eAAe,CAAC,sBAAsB,CAAC;wBACnE,KAAK,EAAE,YAAY;wBACnB,SAAS,EAAE,gBAAgB;wBAC3B,cAAc,EAAE,KAAK,CAAC,cAAc;qBACrC,CAAC,CAAC;oBAEH,IAAI,MAAM,EAAE,CAAC;wBACX,OAAO,YAAY,GAAG,KAAK,WAAW,CAAC,IAAI,IAAI,GAAG,MAAM,MAAM,EAAE,CAAC;oBACnE,CAAC;gBACH,CAAC;YACH,CAAC;YAED,oBAAoB;YACpB,MAAM,MAAM,GAAkB,eAAe,CAAC,sBAAsB,CAAC;gBACnE,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC;gBACvB,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC;gBAC5B,cAAc,EAAE,KAAK,CAAC,cAAc;aACrC,CAAC,CAAC;YAEH,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,YAAY,GAAG,KAAK,WAAW,CAAC,IAAI,IAAI,GAAG,MAAM,MAAM,EAAE,CAAC;YACnE,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA3XqB;IADnB,WAAW,EAAE;;;;mEA2Xb"}
|
|
@@ -11,12 +11,14 @@ import logger from "../Logger";
|
|
|
11
11
|
import CaptureSpan from "../Telemetry/CaptureSpan";
|
|
12
12
|
import TelemetryUtil from "../Telemetry/Telemetry";
|
|
13
13
|
import MetricResourceAttributeUtil from "../../../Utils/Metrics/MetricResourceAttributeUtil";
|
|
14
|
+
import CapturedMetricAttributeUtil from "./CapturedMetricAttributeUtil";
|
|
14
15
|
import MetricService from "../../Services/MetricService";
|
|
15
16
|
import GlobalConfigService from "../../Services/GlobalConfigService";
|
|
16
17
|
import { MetricPointType } from "../../../Models/AnalyticsModels/Metric";
|
|
17
18
|
import ServiceType from "../../../Types/Telemetry/ServiceType";
|
|
18
19
|
import MetricType from "../../../Models/DatabaseModels/MetricType";
|
|
19
20
|
import MonitorMetricType from "../../../Types/Monitor/MonitorMetricType";
|
|
21
|
+
import { MAX_INTERFACE_METRIC_SERIES, MAX_OID_METRIC_SERIES, } from "../../../Types/Monitor/SnmpMonitor/SnmpOidListUtil";
|
|
20
22
|
import { CheckOn } from "../../../Types/Monitor/CriteriaFilter";
|
|
21
23
|
import ObjectID from "../../../Types/ObjectID";
|
|
22
24
|
import OneUptimeDate from "../../../Types/Date";
|
|
@@ -157,9 +159,14 @@ class MonitorMetricUtil {
|
|
|
157
159
|
* same monitor, so there is nothing per-metric to decide, and one pass is
|
|
158
160
|
* far easier to keep correct than thirty call sites.
|
|
159
161
|
*
|
|
160
|
-
* Resource attributes are merged LAST
|
|
161
|
-
*
|
|
162
|
-
*
|
|
162
|
+
* Resource attributes are merged LAST, so a resource attribute wins any
|
|
163
|
+
* collision. That merge is NOT what keeps the oneuptime.* namespace safe
|
|
164
|
+
* from a monitor script, though — it only ever writes the handful of keys
|
|
165
|
+
* this monitor's own labels and custom fields produce, and it does not run
|
|
166
|
+
* at all for a monitor that has neither. Script-supplied attribute keys are
|
|
167
|
+
* refused at the point they are read instead, by
|
|
168
|
+
* CapturedMetricAttributeUtil, which rejects the whole oneuptime.* and
|
|
169
|
+
* resource.* namespaces rather than the keys that happen to collide today.
|
|
163
170
|
*/
|
|
164
171
|
static applyResourceAttributesToMetricRows(data) {
|
|
165
172
|
const resourceAttributes = MetricResourceAttributeUtil.getResourceAttributes({
|
|
@@ -739,7 +746,7 @@ class MonitorMetricUtil {
|
|
|
739
746
|
* unbounded rows (large routers can expose thousands of
|
|
740
747
|
* subinterfaces). Same approach as the custom-metric cap below.
|
|
741
748
|
*/
|
|
742
|
-
const interfacesToEmit = snmpInterfaces.slice(0,
|
|
749
|
+
const interfacesToEmit = snmpInterfaces.slice(0, MAX_INTERFACE_METRIC_SERIES);
|
|
743
750
|
if (interfacesToEmit.length < snmpInterfaces.length) {
|
|
744
751
|
logger.warn(`Monitor ${data.monitorId.toString()}: emitting metrics for first ${interfacesToEmit.length} of ${snmpInterfaces.length} SNMP interfaces`);
|
|
745
752
|
}
|
|
@@ -807,8 +814,15 @@ class MonitorMetricUtil {
|
|
|
807
814
|
*/
|
|
808
815
|
const snmpOidResponses = (_k = data.dataToProcess.snmpResponse) === null || _k === void 0 ? void 0 : _k.oidResponses;
|
|
809
816
|
if (snmpOidResponses && snmpOidResponses.length > 0) {
|
|
810
|
-
|
|
811
|
-
|
|
817
|
+
/*
|
|
818
|
+
* Same unbounded-write cap rationale as the interface block above.
|
|
819
|
+
*
|
|
820
|
+
* Shared with NetworkDeviceMetricUtil rather than repeated as a
|
|
821
|
+
* literal: this is the monitor-scoped copy of the same emit, and the
|
|
822
|
+
* two caps have to move together or a device charts a different number
|
|
823
|
+
* of OIDs than the monitors watching it.
|
|
824
|
+
*/
|
|
825
|
+
const oidResponsesToEmit = snmpOidResponses.slice(0, MAX_OID_METRIC_SERIES);
|
|
812
826
|
if (oidResponsesToEmit.length < snmpOidResponses.length) {
|
|
813
827
|
logger.warn(`Monitor ${data.monitorId.toString()}: emitting metrics for first ${oidResponsesToEmit.length} of ${snmpOidResponses.length} SNMP OID responses`);
|
|
814
828
|
}
|
|
@@ -1021,13 +1035,13 @@ class MonitorMetricUtil {
|
|
|
1021
1035
|
if (allCustomMetrics.length > 0) {
|
|
1022
1036
|
logger.debug(`${data.monitorId.toString()} - Processing ${allCustomMetrics.length} custom metrics`);
|
|
1023
1037
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1038
|
+
/*
|
|
1039
|
+
* Keys a script tried to write but is not allowed to own, collected
|
|
1040
|
+
* across the whole check so the operator gets one line naming them
|
|
1041
|
+
* rather than one per datapoint. Without it, an attribute that silently
|
|
1042
|
+
* never reaches a chart is indistinguishable from a bug in the script.
|
|
1043
|
+
*/
|
|
1044
|
+
const droppedReservedAttributeKeys = new Set();
|
|
1031
1045
|
for (const customMetric of allCustomMetrics) {
|
|
1032
1046
|
if (!customMetric.name ||
|
|
1033
1047
|
typeof customMetric.name !== "string" ||
|
|
@@ -1036,19 +1050,19 @@ class MonitorMetricUtil {
|
|
|
1036
1050
|
continue;
|
|
1037
1051
|
}
|
|
1038
1052
|
const prefixedName = `custom.monitor.${customMetric.name}`;
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1053
|
+
/*
|
|
1054
|
+
* Script-supplied attributes first, OneUptime's own stamps after, so
|
|
1055
|
+
* the stamps are written onto a set the guard has already cleared of
|
|
1056
|
+
* every key OneUptime owns.
|
|
1057
|
+
*/
|
|
1058
|
+
const sanitized = CapturedMetricAttributeUtil.sanitize(customMetric.attributes);
|
|
1059
|
+
for (const droppedKey of sanitized.droppedReservedKeys) {
|
|
1060
|
+
droppedReservedAttributeKeys.add(droppedKey);
|
|
1061
|
+
}
|
|
1062
|
+
const extraAttributes = Object.assign(Object.assign({}, sanitized.attributes), { isCustomMetric: "true" });
|
|
1042
1063
|
if (data.dataToProcess.probeId) {
|
|
1043
1064
|
extraAttributes["probeId"] = data.dataToProcess.probeId.toString();
|
|
1044
1065
|
}
|
|
1045
|
-
if (customMetric.attributes) {
|
|
1046
|
-
for (const [key, val] of Object.entries(customMetric.attributes)) {
|
|
1047
|
-
if (typeof val === "string" && !reservedAttributeKeys.has(key)) {
|
|
1048
|
-
extraAttributes[key] = val;
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
1066
|
const attributes = this.buildMonitorMetricAttributes({
|
|
1053
1067
|
monitorId: data.monitorId,
|
|
1054
1068
|
projectId: data.projectId,
|
|
@@ -1071,6 +1085,11 @@ class MonitorMetricUtil {
|
|
|
1071
1085
|
metricType.unit = "";
|
|
1072
1086
|
metricNameServiceNameMap[prefixedName] = metricType;
|
|
1073
1087
|
}
|
|
1088
|
+
if (droppedReservedAttributeKeys.size > 0) {
|
|
1089
|
+
logger.warn(`${data.monitorId.toString()} - Custom metric attributes dropped, these keys are reserved by OneUptime: ${Array.from(droppedReservedAttributeKeys)
|
|
1090
|
+
.sort()
|
|
1091
|
+
.join(", ")}`);
|
|
1092
|
+
}
|
|
1074
1093
|
this.applyResourceAttributesToMetricRows({
|
|
1075
1094
|
metricRows: metricRows,
|
|
1076
1095
|
labels: data.monitorLabels,
|