@oneuptime/common 10.0.38 → 10.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/Index.ts +4 -0
- package/Models/AnalyticsModels/Profile.ts +687 -0
- package/Models/AnalyticsModels/ProfileSample.ts +547 -0
- package/Models/DatabaseModels/Dashboard.ts +357 -0
- package/Models/DatabaseModels/DashboardDomain.ts +658 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/StatusPage.ts +41 -0
- package/Server/API/DashboardAPI.ts +408 -0
- package/Server/API/DashboardDomainAPI.ts +235 -0
- package/Server/API/StatusPageAPI.ts +36 -2
- package/Server/API/TelemetryAPI.ts +393 -0
- package/Server/EnvironmentConfig.ts +12 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.ts +17 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.ts +50 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.ts +59 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
- package/Server/Middleware/UserAuthorization.ts +96 -1
- package/Server/Services/DashboardDomainService.ts +647 -0
- package/Server/Services/DashboardService.ts +174 -3
- package/Server/Services/IncidentService.ts +295 -50
- package/Server/Services/IncidentStateTimelineService.ts +1 -0
- package/Server/Services/Index.ts +6 -0
- package/Server/Services/MonitorService.ts +5 -0
- package/Server/Services/ProfileAggregationService.ts +559 -0
- package/Server/Services/ProfileSampleService.ts +11 -0
- package/Server/Services/ProfileService.ts +11 -0
- package/Server/Services/TelemetryUsageBillingService.ts +77 -3
- package/Server/Services/WorkspaceNotificationSummaryService.ts +15 -1
- package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +9 -0
- package/Server/Types/Workflow/Components/Conditions/IfElse.ts +68 -21
- package/Server/Utils/Cookie.ts +48 -0
- package/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.ts +34 -0
- package/Server/Utils/Monitor/DataToProcess.ts +3 -1
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +299 -0
- package/Server/Utils/Profile/PprofEncoder.ts +225 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +53 -16
- package/Server/Utils/Workspace/Slack/Slack.ts +26 -6
- package/ServiceRoute.ts +2 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +2 -0
- package/Types/CookieName.ts +1 -0
- package/Types/Dashboard/Chart/ChartType.ts +5 -0
- package/Types/Dashboard/DashboardComponentType.ts +4 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +10 -0
- package/Types/Dashboard/DashboardComponents/DashboardChartComponent.ts +1 -2
- package/Types/Dashboard/DashboardComponents/DashboardGaugeComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardTextComponent.ts +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.ts +13 -0
- package/Types/Dashboard/DashboardComponents/DashboardValueComponent.ts +2 -0
- package/Types/Dashboard/DashboardTemplates.ts +964 -0
- package/Types/Dashboard/DashboardVariable.ts +23 -0
- package/Types/Dashboard/DashboardViewConfig.ts +59 -0
- package/Types/Dashboard/MasterPassword.ts +10 -0
- package/Types/Icon/IconProp.ts +1 -0
- package/Types/Incident/IncidentMetricType.ts +3 -0
- package/Types/MeteredPlan/ProductType.ts +1 -0
- package/Types/Metrics/MetricQueryConfigData.ts +3 -0
- package/Types/Monitor/CriteriaFilter.ts +3 -0
- package/Types/Monitor/KubernetesAlertTemplates.ts +78 -7
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +20 -0
- package/Types/Monitor/MonitorStep.ts +25 -0
- package/Types/Monitor/MonitorStepProfileMonitor.ts +96 -0
- package/Types/Monitor/MonitorType.ts +11 -0
- package/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.ts +12 -0
- package/Types/Permission.ts +87 -0
- package/Types/Telemetry/TelemetryType.ts +1 -0
- package/Types/Workflow/Component.ts +1 -0
- package/Types/Workflow/Components/Condition.ts +24 -0
- package/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.ts +1 -0
- package/UI/Components/Button/Button.tsx +1 -1
- package/UI/Components/Card/Card.tsx +8 -4
- package/UI/Components/Charts/Area/AreaChart.tsx +4 -0
- package/UI/Components/Charts/Bar/BarChart.tsx +4 -0
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +26 -0
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +26 -0
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +26 -0
- package/UI/Components/Charts/Line/LineChart.tsx +4 -0
- package/UI/Components/Charts/Types/ReferenceLineProps.ts +6 -0
- package/UI/Components/Icon/Icon.tsx +33 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +13 -10
- package/UI/Components/MoreMenu/MoreMenu.tsx +15 -2
- package/UI/Components/MoreMenu/MoreMenuItem.tsx +4 -4
- package/UI/Components/Workflow/Component.tsx +450 -209
- package/UI/Components/Workflow/ComponentPortViewer.tsx +57 -20
- package/UI/Components/Workflow/ComponentReturnValueViewer.tsx +65 -25
- package/UI/Components/Workflow/ComponentSettingsModal.tsx +202 -37
- package/UI/Components/Workflow/ComponentsModal.tsx +180 -93
- package/UI/Components/Workflow/Utils.ts +32 -1
- package/UI/Components/Workflow/Workflow.tsx +105 -9
- package/UI/Config.ts +9 -0
- package/Utils/Dashboard/Components/DashboardChartComponent.ts +53 -22
- package/Utils/Dashboard/Components/DashboardGaugeComponent.ts +124 -0
- package/Utils/Dashboard/Components/DashboardLogStreamComponent.ts +110 -0
- package/Utils/Dashboard/Components/DashboardTableComponent.ts +86 -0
- package/Utils/Dashboard/Components/DashboardTextComponent.ts +32 -7
- package/Utils/Dashboard/Components/DashboardTraceListComponent.ts +86 -0
- package/Utils/Dashboard/Components/DashboardValueComponent.ts +39 -3
- package/Utils/Dashboard/Components/Index.ts +28 -0
- package/Utils/ValueFormatter.ts +170 -0
- package/build/dist/Models/AnalyticsModels/Index.js +4 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/Profile.js +621 -0
- package/build/dist/Models/AnalyticsModels/Profile.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/ProfileSample.js +497 -0
- package/build/dist/Models/AnalyticsModels/ProfileSample.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Dashboard.js +365 -0
- package/build/dist/Models/DatabaseModels/Dashboard.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DashboardDomain.js +691 -0
- package/build/dist/Models/DatabaseModels/DashboardDomain.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +42 -0
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +293 -0
- package/build/dist/Server/API/DashboardAPI.js.map +1 -0
- package/build/dist/Server/API/DashboardDomainAPI.js +124 -0
- package/build/dist/Server/API/DashboardDomainAPI.js.map +1 -0
- package/build/dist/Server/API/StatusPageAPI.js +26 -2
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +222 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +4 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +41 -0
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Services/DashboardDomainService.js +595 -0
- package/build/dist/Server/Services/DashboardDomainService.js.map +1 -0
- package/build/dist/Server/Services/DashboardService.js +117 -3
- package/build/dist/Server/Services/DashboardService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +231 -55
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +6 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +5 -2
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/ProfileAggregationService.js +356 -0
- package/build/dist/Server/Services/ProfileAggregationService.js.map +1 -0
- package/build/dist/Server/Services/ProfileSampleService.js +9 -0
- package/build/dist/Server/Services/ProfileSampleService.js.map +1 -0
- package/build/dist/Server/Services/ProfileService.js +9 -0
- package/build/dist/Server/Services/ProfileService.js.map +1 -0
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +61 -4
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js +13 -1
- package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js.map +1 -1
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +8 -0
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js +49 -19
- package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js.map +1 -1
- package/build/dist/Server/Utils/Cookie.js +36 -0
- package/build/dist/Server/Utils/Cookie.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.js +34 -0
- package/build/dist/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +173 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Profile/PprofEncoder.js +129 -0
- package/build/dist/Server/Utils/Profile/PprofEncoder.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +36 -14
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +23 -6
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/ServiceRoute.js +1 -0
- package/build/dist/ServiceRoute.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +2 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/CookieName.js +1 -0
- package/build/dist/Types/CookieName.js.map +1 -1
- package/build/dist/Types/Dashboard/Chart/ChartType.js +5 -0
- package/build/dist/Types/Dashboard/Chart/ChartType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +4 -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/DashboardGaugeComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardGaugeComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTableComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +853 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardVariable.js +7 -0
- package/build/dist/Types/Dashboard/DashboardVariable.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardViewConfig.js +50 -1
- package/build/dist/Types/Dashboard/DashboardViewConfig.js.map +1 -1
- package/build/dist/Types/Dashboard/MasterPassword.js +5 -0
- package/build/dist/Types/Dashboard/MasterPassword.js.map +1 -0
- package/build/dist/Types/Icon/IconProp.js +1 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/Incident/IncidentMetricType.js +3 -0
- package/build/dist/Types/Incident/IncidentMetricType.js.map +1 -1
- package/build/dist/Types/MeteredPlan/ProductType.js +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js.map +1 -1
- package/build/dist/Types/Metrics/MetricQueryConfigData.js +1 -0
- package/build/dist/Types/Metrics/MetricQueryConfigData.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +2 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +58 -7
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +15 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepProfileMonitor.js +59 -0
- package/build/dist/Types/Monitor/MonitorStepProfileMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +10 -0
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.js.map +1 -0
- package/build/dist/Types/Permission.js +75 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryType.js +1 -0
- package/build/dist/Types/Telemetry/TelemetryType.js.map +1 -1
- package/build/dist/Types/Workflow/Component.js +1 -0
- package/build/dist/Types/Workflow/Component.js.map +1 -1
- package/build/dist/Types/Workflow/Components/Condition.js +24 -0
- package/build/dist/Types/Workflow/Components/Condition.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.js +1 -0
- package/build/dist/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +1 -1
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +4 -4
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +5 -2
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +5 -2
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +6 -3
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ReferenceLineProps.js +2 -0
- package/build/dist/UI/Components/Charts/Types/ReferenceLineProps.js.map +1 -0
- package/build/dist/UI/Components/Icon/Icon.js +11 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +12 -9
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js +8 -2
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +4 -4
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Component.js +311 -143
- package/build/dist/UI/Components/Workflow/Component.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js +44 -18
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js +48 -22
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js +127 -21
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +107 -52
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Utils.js +28 -1
- package/build/dist/UI/Components/Workflow/Utils.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Workflow.js +87 -12
- package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
- package/build/dist/UI/Config.js +3 -1
- package/build/dist/UI/Config.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js +50 -21
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardGaugeComponent.js +104 -0
- package/build/dist/Utils/Dashboard/Components/DashboardGaugeComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogStreamComponent.js +91 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogStreamComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTableComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTableComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js +28 -7
- package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardTraceListComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTraceListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js +34 -3
- package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/Index.js +16 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/ValueFormatter.js +132 -0
- package/build/dist/Utils/ValueFormatter.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export enum DashboardVariableType {
|
|
2
|
+
CustomList = "Custom List",
|
|
3
|
+
Query = "Query",
|
|
4
|
+
TextInput = "Text Input",
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default interface DashboardVariable {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
label?: string | undefined;
|
|
11
|
+
type: DashboardVariableType;
|
|
12
|
+
// For CustomList: comma-separated values
|
|
13
|
+
customListValues?: string | undefined;
|
|
14
|
+
// For Query: a ClickHouse query to populate options
|
|
15
|
+
query?: string | undefined;
|
|
16
|
+
// Current selected value(s)
|
|
17
|
+
selectedValue?: string | undefined;
|
|
18
|
+
selectedValues?: Array<string> | undefined;
|
|
19
|
+
// Whether multi-select is enabled
|
|
20
|
+
isMultiSelect?: boolean | undefined;
|
|
21
|
+
// Default value
|
|
22
|
+
defaultValue?: string | undefined;
|
|
23
|
+
}
|
|
@@ -1,8 +1,67 @@
|
|
|
1
1
|
import { ObjectType } from "../JSON";
|
|
2
2
|
import DashboardBaseComponent from "./DashboardComponents/DashboardBaseComponent";
|
|
3
|
+
import DashboardVariable from "./DashboardVariable";
|
|
4
|
+
|
|
5
|
+
export enum AutoRefreshInterval {
|
|
6
|
+
OFF = "off",
|
|
7
|
+
FIVE_SECONDS = "5s",
|
|
8
|
+
TEN_SECONDS = "10s",
|
|
9
|
+
THIRTY_SECONDS = "30s",
|
|
10
|
+
ONE_MINUTE = "1m",
|
|
11
|
+
FIVE_MINUTES = "5m",
|
|
12
|
+
FIFTEEN_MINUTES = "15m",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function getAutoRefreshIntervalInMs(
|
|
16
|
+
interval: AutoRefreshInterval,
|
|
17
|
+
): number | null {
|
|
18
|
+
switch (interval) {
|
|
19
|
+
case AutoRefreshInterval.OFF:
|
|
20
|
+
return null;
|
|
21
|
+
case AutoRefreshInterval.FIVE_SECONDS:
|
|
22
|
+
return 5000;
|
|
23
|
+
case AutoRefreshInterval.TEN_SECONDS:
|
|
24
|
+
return 10000;
|
|
25
|
+
case AutoRefreshInterval.THIRTY_SECONDS:
|
|
26
|
+
return 30000;
|
|
27
|
+
case AutoRefreshInterval.ONE_MINUTE:
|
|
28
|
+
return 60000;
|
|
29
|
+
case AutoRefreshInterval.FIVE_MINUTES:
|
|
30
|
+
return 300000;
|
|
31
|
+
case AutoRefreshInterval.FIFTEEN_MINUTES:
|
|
32
|
+
return 900000;
|
|
33
|
+
default:
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function getAutoRefreshIntervalLabel(
|
|
39
|
+
interval: AutoRefreshInterval,
|
|
40
|
+
): string {
|
|
41
|
+
switch (interval) {
|
|
42
|
+
case AutoRefreshInterval.OFF:
|
|
43
|
+
return "Off";
|
|
44
|
+
case AutoRefreshInterval.FIVE_SECONDS:
|
|
45
|
+
return "5s";
|
|
46
|
+
case AutoRefreshInterval.TEN_SECONDS:
|
|
47
|
+
return "10s";
|
|
48
|
+
case AutoRefreshInterval.THIRTY_SECONDS:
|
|
49
|
+
return "30s";
|
|
50
|
+
case AutoRefreshInterval.ONE_MINUTE:
|
|
51
|
+
return "1m";
|
|
52
|
+
case AutoRefreshInterval.FIVE_MINUTES:
|
|
53
|
+
return "5m";
|
|
54
|
+
case AutoRefreshInterval.FIFTEEN_MINUTES:
|
|
55
|
+
return "15m";
|
|
56
|
+
default:
|
|
57
|
+
return "Off";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
3
60
|
|
|
4
61
|
export default interface DashboardViewConfig {
|
|
5
62
|
_type: ObjectType.DashboardViewConfig;
|
|
6
63
|
components: Array<DashboardBaseComponent>;
|
|
7
64
|
heightInDashboardUnits: number;
|
|
65
|
+
refreshInterval?: AutoRefreshInterval | undefined;
|
|
66
|
+
variables?: Array<DashboardVariable> | undefined;
|
|
8
67
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const DASHBOARD_MASTER_PASSWORD_REQUIRED_MESSAGE: string =
|
|
2
|
+
"Master password required";
|
|
3
|
+
|
|
4
|
+
export const DASHBOARD_MASTER_PASSWORD_INVALID_MESSAGE: string =
|
|
5
|
+
"Invalid master password. Please try again.";
|
|
6
|
+
|
|
7
|
+
export const DASHBOARD_MASTER_PASSWORD_COOKIE_IDENTIFIER: string =
|
|
8
|
+
"dashboard-master-password";
|
|
9
|
+
|
|
10
|
+
export const DASHBOARD_MASTER_PASSWORD_COOKIE_MAX_AGE_IN_DAYS: number = 7;
|
package/Types/Icon/IconProp.ts
CHANGED
|
@@ -3,6 +3,9 @@ enum IncidentMetricType {
|
|
|
3
3
|
TimeToResolve = "oneuptime.incident.time-to-resolve",
|
|
4
4
|
IncidentCount = "oneuptime.incident.count",
|
|
5
5
|
IncidentDuration = "oneuptime.incident.duration",
|
|
6
|
+
TimeInState = "oneuptime.incident.time-in-state",
|
|
7
|
+
SeverityChange = "oneuptime.incident.severity-change",
|
|
8
|
+
PostmortemCompletionTime = "oneuptime.incident.postmortem-completion-time",
|
|
6
9
|
}
|
|
7
10
|
|
|
8
11
|
export default IncidentMetricType;
|
|
@@ -5,6 +5,7 @@ import MetricQueryData from "./MetricQueryData";
|
|
|
5
5
|
export enum MetricChartType {
|
|
6
6
|
LINE = "line",
|
|
7
7
|
BAR = "bar",
|
|
8
|
+
AREA = "area",
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export interface ChartSeries {
|
|
@@ -17,4 +18,6 @@ export default interface MetricQueryConfigData {
|
|
|
17
18
|
getSeries?: ((data: AggregatedModel) => ChartSeries) | undefined;
|
|
18
19
|
chartType?: MetricChartType | undefined;
|
|
19
20
|
yAxisValueFormatter?: ((value: number) => string) | undefined;
|
|
21
|
+
warningThreshold?: number | undefined;
|
|
22
|
+
criticalThreshold?: number | undefined;
|
|
20
23
|
}
|
|
@@ -88,9 +88,19 @@ export function buildOfflineCriteriaInstance(args: {
|
|
|
88
88
|
metricAlias: string;
|
|
89
89
|
filterType: FilterType;
|
|
90
90
|
value: number;
|
|
91
|
+
incidentTitle?: string;
|
|
92
|
+
incidentDescription?: string;
|
|
93
|
+
criteriaName?: string;
|
|
94
|
+
criteriaDescription?: string;
|
|
91
95
|
}): MonitorCriteriaInstance {
|
|
92
96
|
const instance: MonitorCriteriaInstance = new MonitorCriteriaInstance();
|
|
93
97
|
|
|
98
|
+
const incidentTitle: string =
|
|
99
|
+
args.incidentTitle || `${args.monitorName} - Alert Triggered`;
|
|
100
|
+
const incidentDescription: string =
|
|
101
|
+
args.incidentDescription ||
|
|
102
|
+
`${args.monitorName} has triggered an alert condition. See root cause for detailed Kubernetes resource information.`;
|
|
103
|
+
|
|
94
104
|
instance.data = {
|
|
95
105
|
id: ObjectID.generate().toString(),
|
|
96
106
|
monitorStatusId: args.offlineMonitorStatusId,
|
|
@@ -108,8 +118,8 @@ export function buildOfflineCriteriaInstance(args: {
|
|
|
108
118
|
],
|
|
109
119
|
incidents: [
|
|
110
120
|
{
|
|
111
|
-
title:
|
|
112
|
-
description:
|
|
121
|
+
title: incidentTitle,
|
|
122
|
+
description: incidentDescription,
|
|
113
123
|
incidentSeverityId: args.incidentSeverityId,
|
|
114
124
|
autoResolveIncident: true,
|
|
115
125
|
id: ObjectID.generate().toString(),
|
|
@@ -118,8 +128,8 @@ export function buildOfflineCriteriaInstance(args: {
|
|
|
118
128
|
],
|
|
119
129
|
alerts: [
|
|
120
130
|
{
|
|
121
|
-
title:
|
|
122
|
-
description:
|
|
131
|
+
title: incidentTitle,
|
|
132
|
+
description: incidentDescription,
|
|
123
133
|
alertSeverityId: args.alertSeverityId,
|
|
124
134
|
autoResolveAlert: true,
|
|
125
135
|
id: ObjectID.generate().toString(),
|
|
@@ -129,8 +139,9 @@ export function buildOfflineCriteriaInstance(args: {
|
|
|
129
139
|
changeMonitorStatus: true,
|
|
130
140
|
createIncidents: true,
|
|
131
141
|
createAlerts: true,
|
|
132
|
-
name: `${args.monitorName} - Unhealthy`,
|
|
133
|
-
description:
|
|
142
|
+
name: args.criteriaName || `${args.monitorName} - Unhealthy`,
|
|
143
|
+
description:
|
|
144
|
+
args.criteriaDescription || `Criteria for detecting unhealthy state.`,
|
|
134
145
|
};
|
|
135
146
|
|
|
136
147
|
return instance;
|
|
@@ -239,6 +250,11 @@ const crashLoopBackOffTemplate: KubernetesAlertTemplate = {
|
|
|
239
250
|
metricAlias,
|
|
240
251
|
filterType: FilterType.GreaterThan,
|
|
241
252
|
value: 5,
|
|
253
|
+
incidentTitle: `[K8s] CrashLoopBackOff Detected - ${args.monitorName}`,
|
|
254
|
+
incidentDescription: `A container in the Kubernetes cluster is repeatedly crashing and restarting (CrashLoopBackOff). The container restart count has exceeded the threshold of 5 restarts. Check the root cause for the specific pod, container, and node details.`,
|
|
255
|
+
criteriaName: "CrashLoopBackOff - Container Restarts > 5",
|
|
256
|
+
criteriaDescription:
|
|
257
|
+
"Triggers when any container restart count exceeds 5 in the monitoring window, indicating a CrashLoopBackOff condition.",
|
|
242
258
|
}),
|
|
243
259
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
244
260
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -268,7 +284,7 @@ const podPendingTemplate: KubernetesAlertTemplate = {
|
|
|
268
284
|
resourceScope: KubernetesResourceScope.Cluster,
|
|
269
285
|
rollingTime: RollingTime.Past5Minutes,
|
|
270
286
|
aggregationType: MetricsAggregationType.Sum,
|
|
271
|
-
attributes: { "k8s.pod.phase": "Pending" },
|
|
287
|
+
attributes: { "resource.k8s.pod.phase": "Pending" },
|
|
272
288
|
}),
|
|
273
289
|
offlineCriteriaInstance: buildOfflineCriteriaInstance({
|
|
274
290
|
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
@@ -278,6 +294,11 @@ const podPendingTemplate: KubernetesAlertTemplate = {
|
|
|
278
294
|
metricAlias,
|
|
279
295
|
filterType: FilterType.GreaterThan,
|
|
280
296
|
value: 0,
|
|
297
|
+
incidentTitle: `[K8s] Pods Stuck in Pending - ${args.monitorName}`,
|
|
298
|
+
incidentDescription: `One or more pods in the Kubernetes cluster are stuck in Pending phase and cannot be scheduled. This typically indicates insufficient cluster resources, node affinity constraints, or unbound PersistentVolumeClaims. Check the root cause for specific pod and scheduling details.`,
|
|
299
|
+
criteriaName: "Pods Pending - Count > 0",
|
|
300
|
+
criteriaDescription:
|
|
301
|
+
"Triggers when any pods are in Pending phase, unable to be scheduled.",
|
|
281
302
|
}),
|
|
282
303
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
283
304
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -316,6 +337,11 @@ const nodeNotReadyTemplate: KubernetesAlertTemplate = {
|
|
|
316
337
|
metricAlias,
|
|
317
338
|
filterType: FilterType.EqualTo,
|
|
318
339
|
value: 0,
|
|
340
|
+
incidentTitle: `[K8s] Node Not Ready - ${args.monitorName}`,
|
|
341
|
+
incidentDescription: `A Kubernetes node has transitioned to NotReady state. This is a critical condition that affects all pods scheduled on this node. Check the root cause for the specific node name, conditions, and recommended actions.`,
|
|
342
|
+
criteriaName: "Node NotReady - Condition = 0",
|
|
343
|
+
criteriaDescription:
|
|
344
|
+
"Triggers when any node reports a NotReady condition (value 0).",
|
|
319
345
|
}),
|
|
320
346
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
321
347
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -353,6 +379,11 @@ const highCpuTemplate: KubernetesAlertTemplate = {
|
|
|
353
379
|
metricAlias,
|
|
354
380
|
filterType: FilterType.GreaterThan,
|
|
355
381
|
value: 90,
|
|
382
|
+
incidentTitle: `[K8s] High CPU Utilization (>90%) - ${args.monitorName}`,
|
|
383
|
+
incidentDescription: `Node CPU utilization has exceeded 90% in the Kubernetes cluster. Sustained high CPU usage can cause pod throttling, increased latency, and potential node instability. Check the root cause for the specific node and top CPU-consuming workloads.`,
|
|
384
|
+
criteriaName: "High CPU - Utilization > 90%",
|
|
385
|
+
criteriaDescription:
|
|
386
|
+
"Triggers when average node CPU utilization exceeds 90% over the monitoring window.",
|
|
356
387
|
}),
|
|
357
388
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
358
389
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -390,6 +421,11 @@ const highMemoryTemplate: KubernetesAlertTemplate = {
|
|
|
390
421
|
metricAlias,
|
|
391
422
|
filterType: FilterType.GreaterThan,
|
|
392
423
|
value: 85,
|
|
424
|
+
incidentTitle: `[K8s] High Memory Utilization (>85%) - ${args.monitorName}`,
|
|
425
|
+
incidentDescription: `Node memory utilization has exceeded 85% in the Kubernetes cluster. High memory usage can lead to OOMKilled pods, node instability, and potential evictions. Check the root cause for the specific node and top memory-consuming workloads.`,
|
|
426
|
+
criteriaName: "High Memory - Utilization > 85%",
|
|
427
|
+
criteriaDescription:
|
|
428
|
+
"Triggers when average node memory utilization exceeds 85% over the monitoring window.",
|
|
393
429
|
}),
|
|
394
430
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
395
431
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -428,6 +464,11 @@ const deploymentReplicaMismatchTemplate: KubernetesAlertTemplate = {
|
|
|
428
464
|
metricAlias,
|
|
429
465
|
filterType: FilterType.GreaterThan,
|
|
430
466
|
value: 0,
|
|
467
|
+
incidentTitle: `[K8s] Deployment Replica Mismatch - ${args.monitorName}`,
|
|
468
|
+
incidentDescription: `A Kubernetes deployment has unavailable replicas — the desired replica count does not match the available count. This may indicate a failed rollout, image pull errors, insufficient resources, or pod crash loops. Check the root cause for the specific deployment and replica details.`,
|
|
469
|
+
criteriaName: "Replica Mismatch - Unavailable > 0",
|
|
470
|
+
criteriaDescription:
|
|
471
|
+
"Triggers when any deployment has unavailable replicas.",
|
|
431
472
|
}),
|
|
432
473
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
433
474
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -465,6 +506,11 @@ const jobFailuresTemplate: KubernetesAlertTemplate = {
|
|
|
465
506
|
metricAlias,
|
|
466
507
|
filterType: FilterType.GreaterThan,
|
|
467
508
|
value: 0,
|
|
509
|
+
incidentTitle: `[K8s] Job Failure Detected - ${args.monitorName}`,
|
|
510
|
+
incidentDescription: `A Kubernetes Job has one or more failed pods. This indicates the job's workload is failing to complete successfully. Check the root cause for the specific job name, failed pod details, and error information.`,
|
|
511
|
+
criteriaName: "Job Failures - Failed Pods > 0",
|
|
512
|
+
criteriaDescription:
|
|
513
|
+
"Triggers when any Kubernetes Job has failed pods.",
|
|
468
514
|
}),
|
|
469
515
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
470
516
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -503,6 +549,11 @@ const etcdNoLeaderTemplate: KubernetesAlertTemplate = {
|
|
|
503
549
|
metricAlias,
|
|
504
550
|
filterType: FilterType.EqualTo,
|
|
505
551
|
value: 0,
|
|
552
|
+
incidentTitle: `[K8s] CRITICAL: etcd No Leader - ${args.monitorName}`,
|
|
553
|
+
incidentDescription: `The etcd cluster has no elected leader. This is a critical cluster health issue that can cause the Kubernetes API server to become unavailable. All cluster operations (scheduling, deployments, service discovery) will be affected.`,
|
|
554
|
+
criteriaName: "etcd No Leader - Has Leader = 0",
|
|
555
|
+
criteriaDescription:
|
|
556
|
+
"Triggers immediately when etcd reports no elected leader.",
|
|
506
557
|
}),
|
|
507
558
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
508
559
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -541,6 +592,11 @@ const apiServerThrottlingTemplate: KubernetesAlertTemplate = {
|
|
|
541
592
|
metricAlias,
|
|
542
593
|
filterType: FilterType.GreaterThan,
|
|
543
594
|
value: 0,
|
|
595
|
+
incidentTitle: `[K8s] CRITICAL: API Server Throttling - ${args.monitorName}`,
|
|
596
|
+
incidentDescription: `The Kubernetes API server is dropping requests due to throttling. This indicates the API server is overloaded and cannot process all incoming requests, affecting cluster operations.`,
|
|
597
|
+
criteriaName: "API Server Throttling - Dropped Requests > 0",
|
|
598
|
+
criteriaDescription:
|
|
599
|
+
"Triggers when the API server reports any dropped requests.",
|
|
544
600
|
}),
|
|
545
601
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
546
602
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -579,6 +635,11 @@ const schedulerBacklogTemplate: KubernetesAlertTemplate = {
|
|
|
579
635
|
metricAlias,
|
|
580
636
|
filterType: FilterType.GreaterThan,
|
|
581
637
|
value: 0,
|
|
638
|
+
incidentTitle: `[K8s] Scheduler Backlog - ${args.monitorName}`,
|
|
639
|
+
incidentDescription: `The Kubernetes scheduler has a backlog of pods waiting to be scheduled. This indicates the scheduler is unable to find suitable nodes for pending pods, possibly due to resource constraints or scheduling conflicts.`,
|
|
640
|
+
criteriaName: "Scheduler Backlog - Pending Pods > 0",
|
|
641
|
+
criteriaDescription:
|
|
642
|
+
"Triggers when there are pods waiting to be scheduled for more than 5 minutes.",
|
|
582
643
|
}),
|
|
583
644
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
584
645
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -616,6 +677,11 @@ const highDiskUsageTemplate: KubernetesAlertTemplate = {
|
|
|
616
677
|
metricAlias,
|
|
617
678
|
filterType: FilterType.GreaterThan,
|
|
618
679
|
value: 90,
|
|
680
|
+
incidentTitle: `[K8s] High Disk Usage (>90%) - ${args.monitorName}`,
|
|
681
|
+
incidentDescription: `Node disk/filesystem usage has exceeded 90% capacity. High disk usage can lead to pod evictions, inability to pull new container images, and node instability. Check the root cause for the specific node and disk usage details.`,
|
|
682
|
+
criteriaName: "High Disk - Usage > 90%",
|
|
683
|
+
criteriaDescription:
|
|
684
|
+
"Triggers when average node filesystem usage exceeds 90% capacity.",
|
|
619
685
|
}),
|
|
620
686
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
621
687
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -654,6 +720,11 @@ const daemonSetUnavailableTemplate: KubernetesAlertTemplate = {
|
|
|
654
720
|
metricAlias,
|
|
655
721
|
filterType: FilterType.GreaterThan,
|
|
656
722
|
value: 0,
|
|
723
|
+
incidentTitle: `[K8s] DaemonSet Unavailable Nodes - ${args.monitorName}`,
|
|
724
|
+
incidentDescription: `A DaemonSet has nodes where the daemon pod is not running as expected. This indicates misscheduled or unavailable daemon pods, which may affect cluster-wide services like logging, monitoring, or networking.`,
|
|
725
|
+
criteriaName: "DaemonSet Unavailable - Misscheduled > 0",
|
|
726
|
+
criteriaDescription:
|
|
727
|
+
"Triggers when a DaemonSet has nodes where daemon pods are not properly scheduled.",
|
|
657
728
|
}),
|
|
658
729
|
onlineCriteriaInstance: buildOnlineCriteriaInstance({
|
|
659
730
|
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
@@ -3,6 +3,25 @@ import InBetween from "../../BaseDatabase/InBetween";
|
|
|
3
3
|
import MonitorEvaluationSummary from "../MonitorEvaluationSummary";
|
|
4
4
|
import MetricsViewConfig from "../../Metrics/MetricsViewConfig";
|
|
5
5
|
import ObjectID from "../../ObjectID";
|
|
6
|
+
import Dictionary from "../../Dictionary";
|
|
7
|
+
|
|
8
|
+
export interface KubernetesAffectedResource {
|
|
9
|
+
podName?: string | undefined;
|
|
10
|
+
namespace?: string | undefined;
|
|
11
|
+
nodeName?: string | undefined;
|
|
12
|
+
containerName?: string | undefined;
|
|
13
|
+
workloadType?: string | undefined;
|
|
14
|
+
workloadName?: string | undefined;
|
|
15
|
+
metricValue: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface KubernetesResourceBreakdown {
|
|
19
|
+
clusterName: string;
|
|
20
|
+
metricName: string;
|
|
21
|
+
metricFriendlyName: string;
|
|
22
|
+
affectedResources: Array<KubernetesAffectedResource>;
|
|
23
|
+
attributes: Dictionary<string>;
|
|
24
|
+
}
|
|
6
25
|
|
|
7
26
|
export default interface MetricMonitorResponse {
|
|
8
27
|
projectId: ObjectID;
|
|
@@ -11,4 +30,5 @@ export default interface MetricMonitorResponse {
|
|
|
11
30
|
metricViewConfig: MetricsViewConfig;
|
|
12
31
|
monitorId: ObjectID;
|
|
13
32
|
evaluationSummary?: MonitorEvaluationSummary | undefined;
|
|
33
|
+
kubernetesResourceBreakdown?: KubernetesResourceBreakdown | undefined;
|
|
14
34
|
}
|
|
@@ -26,6 +26,9 @@ import MonitorStepMetricMonitor, {
|
|
|
26
26
|
import MonitorStepExceptionMonitor, {
|
|
27
27
|
MonitorStepExceptionMonitorUtil,
|
|
28
28
|
} from "./MonitorStepExceptionMonitor";
|
|
29
|
+
import MonitorStepProfileMonitor, {
|
|
30
|
+
MonitorStepProfileMonitorUtil,
|
|
31
|
+
} from "./MonitorStepProfileMonitor";
|
|
29
32
|
import MonitorStepSnmpMonitor, {
|
|
30
33
|
MonitorStepSnmpMonitorUtil,
|
|
31
34
|
} from "./MonitorStepSnmpMonitor";
|
|
@@ -82,6 +85,9 @@ export interface MonitorStepType {
|
|
|
82
85
|
// Exception monitor
|
|
83
86
|
exceptionMonitor?: MonitorStepExceptionMonitor | undefined;
|
|
84
87
|
|
|
88
|
+
// Profile monitor
|
|
89
|
+
profileMonitor?: MonitorStepProfileMonitor | undefined;
|
|
90
|
+
|
|
85
91
|
// SNMP monitor
|
|
86
92
|
snmpMonitor?: MonitorStepSnmpMonitor | undefined;
|
|
87
93
|
|
|
@@ -121,6 +127,7 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
121
127
|
traceMonitor: undefined,
|
|
122
128
|
metricMonitor: undefined,
|
|
123
129
|
exceptionMonitor: undefined,
|
|
130
|
+
profileMonitor: undefined,
|
|
124
131
|
snmpMonitor: undefined,
|
|
125
132
|
dnsMonitor: undefined,
|
|
126
133
|
domainMonitor: undefined,
|
|
@@ -156,6 +163,7 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
156
163
|
traceMonitor: undefined,
|
|
157
164
|
metricMonitor: undefined,
|
|
158
165
|
exceptionMonitor: undefined,
|
|
166
|
+
profileMonitor: undefined,
|
|
159
167
|
snmpMonitor: undefined,
|
|
160
168
|
dnsMonitor: undefined,
|
|
161
169
|
domainMonitor: undefined,
|
|
@@ -251,6 +259,13 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
251
259
|
return this;
|
|
252
260
|
}
|
|
253
261
|
|
|
262
|
+
public setProfileMonitor(
|
|
263
|
+
profileMonitor: MonitorStepProfileMonitor,
|
|
264
|
+
): MonitorStep {
|
|
265
|
+
this.data!.profileMonitor = profileMonitor;
|
|
266
|
+
return this;
|
|
267
|
+
}
|
|
268
|
+
|
|
254
269
|
public setSnmpMonitor(snmpMonitor: MonitorStepSnmpMonitor): MonitorStep {
|
|
255
270
|
this.data!.snmpMonitor = snmpMonitor;
|
|
256
271
|
return this;
|
|
@@ -473,6 +488,12 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
473
488
|
MonitorStepExceptionMonitorUtil.getDefault(),
|
|
474
489
|
)
|
|
475
490
|
: undefined,
|
|
491
|
+
profileMonitor: this.data.profileMonitor
|
|
492
|
+
? MonitorStepProfileMonitorUtil.toJSON(
|
|
493
|
+
this.data.profileMonitor ||
|
|
494
|
+
MonitorStepProfileMonitorUtil.getDefault(),
|
|
495
|
+
)
|
|
496
|
+
: undefined,
|
|
476
497
|
snmpMonitor: this.data.snmpMonitor
|
|
477
498
|
? MonitorStepSnmpMonitorUtil.toJSON(this.data.snmpMonitor)
|
|
478
499
|
: undefined,
|
|
@@ -594,6 +615,9 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
594
615
|
exceptionMonitor: json["exceptionMonitor"]
|
|
595
616
|
? (json["exceptionMonitor"] as JSONObject)
|
|
596
617
|
: undefined,
|
|
618
|
+
profileMonitor: json["profileMonitor"]
|
|
619
|
+
? (json["profileMonitor"] as JSONObject)
|
|
620
|
+
: undefined,
|
|
597
621
|
snmpMonitor: json["snmpMonitor"]
|
|
598
622
|
? (json["snmpMonitor"] as JSONObject)
|
|
599
623
|
: undefined,
|
|
@@ -633,6 +657,7 @@ export default class MonitorStep extends DatabaseProperty {
|
|
|
633
657
|
logMonitor: Zod.any().optional(),
|
|
634
658
|
traceMonitor: Zod.any().optional(),
|
|
635
659
|
metricMonitor: Zod.any().optional(),
|
|
660
|
+
profileMonitor: Zod.any().optional(),
|
|
636
661
|
snmpMonitor: Zod.any().optional(),
|
|
637
662
|
dnsMonitor: Zod.any().optional(),
|
|
638
663
|
domainMonitor: Zod.any().optional(),
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import Profile from "../../Models/AnalyticsModels/Profile";
|
|
2
|
+
import InBetween from "../BaseDatabase/InBetween";
|
|
3
|
+
import Includes from "../BaseDatabase/Includes";
|
|
4
|
+
import Query from "../BaseDatabase/Query";
|
|
5
|
+
import Search from "../BaseDatabase/Search";
|
|
6
|
+
import OneUptimeDate from "../Date";
|
|
7
|
+
import Dictionary from "../Dictionary";
|
|
8
|
+
import { JSONObject } from "../JSON";
|
|
9
|
+
import ObjectID from "../ObjectID";
|
|
10
|
+
|
|
11
|
+
export default interface MonitorStepProfileMonitor {
|
|
12
|
+
attributes: Dictionary<string | number | boolean>;
|
|
13
|
+
profileTypes: Array<string>;
|
|
14
|
+
telemetryServiceIds: Array<ObjectID>;
|
|
15
|
+
lastXSecondsOfProfiles: number;
|
|
16
|
+
profileType: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class MonitorStepProfileMonitorUtil {
|
|
20
|
+
public static toQuery(
|
|
21
|
+
monitorStepProfileMonitor: MonitorStepProfileMonitor,
|
|
22
|
+
): Query<Profile> {
|
|
23
|
+
const query: Query<Profile> = {};
|
|
24
|
+
|
|
25
|
+
if (
|
|
26
|
+
monitorStepProfileMonitor.telemetryServiceIds &&
|
|
27
|
+
monitorStepProfileMonitor.telemetryServiceIds.length > 0
|
|
28
|
+
) {
|
|
29
|
+
query.serviceId = new Includes(
|
|
30
|
+
monitorStepProfileMonitor.telemetryServiceIds,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (
|
|
35
|
+
monitorStepProfileMonitor.attributes &&
|
|
36
|
+
Object.keys(monitorStepProfileMonitor.attributes).length > 0
|
|
37
|
+
) {
|
|
38
|
+
query.attributes = monitorStepProfileMonitor.attributes;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (
|
|
42
|
+
monitorStepProfileMonitor.profileTypes &&
|
|
43
|
+
monitorStepProfileMonitor.profileTypes.length > 0
|
|
44
|
+
) {
|
|
45
|
+
query.profileType = new Includes(monitorStepProfileMonitor.profileTypes);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (monitorStepProfileMonitor.profileType) {
|
|
49
|
+
query.profileType = new Search(monitorStepProfileMonitor.profileType);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (monitorStepProfileMonitor.lastXSecondsOfProfiles) {
|
|
53
|
+
const endDate: Date = OneUptimeDate.getCurrentDate();
|
|
54
|
+
const startDate: Date = OneUptimeDate.addRemoveSeconds(
|
|
55
|
+
endDate,
|
|
56
|
+
monitorStepProfileMonitor.lastXSecondsOfProfiles * -1,
|
|
57
|
+
);
|
|
58
|
+
query.startTime = new InBetween(startDate, endDate);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return query;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public static getDefault(): MonitorStepProfileMonitor {
|
|
65
|
+
return {
|
|
66
|
+
attributes: {},
|
|
67
|
+
profileType: "",
|
|
68
|
+
profileTypes: [],
|
|
69
|
+
telemetryServiceIds: [],
|
|
70
|
+
lastXSecondsOfProfiles: 60,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public static fromJSON(json: JSONObject): MonitorStepProfileMonitor {
|
|
75
|
+
return {
|
|
76
|
+
attributes:
|
|
77
|
+
(json["attributes"] as Dictionary<string | number | boolean>) || {},
|
|
78
|
+
profileType: json["profileType"] as string,
|
|
79
|
+
profileTypes: json["profileTypes"] as Array<string>,
|
|
80
|
+
telemetryServiceIds: ObjectID.fromJSONArray(
|
|
81
|
+
json["telemetryServiceIds"] as Array<JSONObject>,
|
|
82
|
+
),
|
|
83
|
+
lastXSecondsOfProfiles: json["lastXSecondsOfProfiles"] as number,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public static toJSON(monitor: MonitorStepProfileMonitor): JSONObject {
|
|
88
|
+
return {
|
|
89
|
+
attributes: monitor.attributes,
|
|
90
|
+
profileType: monitor.profileType,
|
|
91
|
+
profileTypes: monitor.profileTypes,
|
|
92
|
+
telemetryServiceIds: ObjectID.toJSONArray(monitor.telemetryServiceIds),
|
|
93
|
+
lastXSecondsOfProfiles: monitor.lastXSecondsOfProfiles,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -23,6 +23,7 @@ enum MonitorType {
|
|
|
23
23
|
Metrics = "Metrics",
|
|
24
24
|
Traces = "Traces",
|
|
25
25
|
Exceptions = "Exceptions",
|
|
26
|
+
Profiles = "Profiles",
|
|
26
27
|
|
|
27
28
|
// Network device monitoring
|
|
28
29
|
SNMP = "SNMP",
|
|
@@ -94,6 +95,7 @@ export class MonitorTypeHelper {
|
|
|
94
95
|
MonitorType.Metrics,
|
|
95
96
|
MonitorType.Traces,
|
|
96
97
|
MonitorType.Exceptions,
|
|
98
|
+
MonitorType.Profiles,
|
|
97
99
|
],
|
|
98
100
|
},
|
|
99
101
|
{
|
|
@@ -109,6 +111,7 @@ export class MonitorTypeHelper {
|
|
|
109
111
|
monitorType === MonitorType.Metrics ||
|
|
110
112
|
monitorType === MonitorType.Traces ||
|
|
111
113
|
monitorType === MonitorType.Exceptions ||
|
|
114
|
+
monitorType === MonitorType.Profiles ||
|
|
112
115
|
monitorType === MonitorType.Kubernetes
|
|
113
116
|
);
|
|
114
117
|
}
|
|
@@ -236,6 +239,13 @@ export class MonitorTypeHelper {
|
|
|
236
239
|
"This monitor type lets you monitor metrics from any source.",
|
|
237
240
|
icon: IconProp.Heartbeat,
|
|
238
241
|
},
|
|
242
|
+
{
|
|
243
|
+
monitorType: MonitorType.Profiles,
|
|
244
|
+
title: "Profiles",
|
|
245
|
+
description:
|
|
246
|
+
"This monitor type lets you monitor continuous profiling data from any source.",
|
|
247
|
+
icon: IconProp.Fire,
|
|
248
|
+
},
|
|
239
249
|
{
|
|
240
250
|
monitorType: MonitorType.SNMP,
|
|
241
251
|
title: "SNMP",
|
|
@@ -333,6 +343,7 @@ export class MonitorTypeHelper {
|
|
|
333
343
|
MonitorType.Metrics,
|
|
334
344
|
MonitorType.Traces,
|
|
335
345
|
MonitorType.Exceptions,
|
|
346
|
+
MonitorType.Profiles,
|
|
336
347
|
MonitorType.SNMP,
|
|
337
348
|
MonitorType.DNS,
|
|
338
349
|
MonitorType.Domain,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Query from "../../BaseDatabase/Query";
|
|
2
|
+
import ObjectID from "../../ObjectID";
|
|
3
|
+
import Profile from "../../../Models/AnalyticsModels/Profile";
|
|
4
|
+
import MonitorEvaluationSummary from "../MonitorEvaluationSummary";
|
|
5
|
+
|
|
6
|
+
export default interface ProfileMonitorResponse {
|
|
7
|
+
projectId: ObjectID;
|
|
8
|
+
profileCount: number;
|
|
9
|
+
profileQuery: Query<Profile>;
|
|
10
|
+
monitorId: ObjectID;
|
|
11
|
+
evaluationSummary?: MonitorEvaluationSummary | undefined;
|
|
12
|
+
}
|