@oneuptime/common 14.0.92 → 14.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/Alert.d.mts +2 -0
- package/Models/DatabaseModels/Alert.d.ts +2 -0
- package/Models/DatabaseModels/Alert.js +62 -1
- package/Models/DatabaseModels/AlertEpisodeMember.d.mts +1 -0
- package/Models/DatabaseModels/AlertEpisodeMember.d.ts +1 -0
- package/Models/DatabaseModels/AlertEpisodeMember.js +50 -0
- package/Models/DatabaseModels/CloudAccount.d.mts +29 -0
- package/Models/DatabaseModels/CloudAccount.d.ts +29 -0
- package/Models/DatabaseModels/CloudAccount.js +546 -0
- package/Models/DatabaseModels/CloudAccount.mjs +2 -0
- package/Models/DatabaseModels/CloudResource.d.mts +8 -0
- package/Models/DatabaseModels/CloudResource.d.ts +8 -0
- package/Models/DatabaseModels/CloudResource.js +169 -0
- package/Models/DatabaseModels/CloudResourceLabelRule.d.mts +1 -0
- package/Models/DatabaseModels/CloudResourceLabelRule.d.ts +1 -0
- package/Models/DatabaseModels/CloudResourceLabelRule.js +40 -0
- package/Models/DatabaseModels/CloudResourceOwnerRule.d.mts +1 -0
- package/Models/DatabaseModels/CloudResourceOwnerRule.d.ts +1 -0
- package/Models/DatabaseModels/CloudResourceOwnerRule.js +40 -0
- package/Models/DatabaseModels/Incident.d.mts +2 -0
- package/Models/DatabaseModels/Incident.d.ts +2 -0
- package/Models/DatabaseModels/Incident.js +54 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.d.mts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.d.ts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.js +50 -0
- package/Models/DatabaseModels/IncomingCallPolicy.js +1 -1
- package/Models/DatabaseModels/Index.js +2 -0
- package/Models/DatabaseModels/LlmProvider.js +1 -1
- package/Models/DatabaseModels/Monitor.d.mts +2 -0
- package/Models/DatabaseModels/Monitor.d.ts +2 -0
- package/Models/DatabaseModels/Monitor.js +54 -0
- package/Models/DatabaseModels/MonitorTemplate.js +10 -4
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +13 -13
- package/Models/DatabaseModels/OnCallDutyPolicy.js +1 -1
- package/Models/DatabaseModels/OpenSourceDeployment.d.mts +1 -0
- package/Models/DatabaseModels/OpenSourceDeployment.d.ts +1 -0
- package/Models/DatabaseModels/OpenSourceDeployment.js +25 -6
- package/Models/DatabaseModels/ScheduledMaintenance.d.mts +1 -0
- package/Models/DatabaseModels/ScheduledMaintenance.d.ts +1 -0
- package/Models/DatabaseModels/ScheduledMaintenance.js +50 -0
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +1 -1
- package/Models/DatabaseModels/StatusPage.d.mts +2 -0
- package/Models/DatabaseModels/StatusPage.d.ts +2 -0
- package/Models/DatabaseModels/StatusPage.js +100 -0
- package/Types/AI/AiAffectedResources.d.mts +40 -0
- package/Types/AI/AiAffectedResources.d.ts +40 -0
- package/Types/AI/AiAffectedResources.js +292 -0
- package/Types/AI/AiAffectedResources.mjs +10 -0
- package/Types/Cloud/CloudAccountSummary.d.mts +25 -0
- package/Types/Cloud/CloudAccountSummary.d.ts +25 -0
- package/Types/Cloud/CloudAccountSummary.js +114 -0
- package/Types/Cloud/CloudAccountSummary.mjs +5 -0
- package/Types/Cloud/CloudEndpointMatch.d.mts +26 -0
- package/Types/Cloud/CloudEndpointMatch.d.ts +26 -0
- package/Types/Cloud/CloudEndpointMatch.js +134 -0
- package/Types/Cloud/CloudEndpointMatch.mjs +5 -0
- package/Types/Cloud/CloudInventory.d.mts +34 -0
- package/Types/Cloud/CloudInventory.d.ts +34 -0
- package/Types/Cloud/CloudInventory.js +362 -0
- package/Types/Cloud/CloudInventory.mjs +22 -0
- package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
- package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
- package/Types/Cloud/CloudResourceCatalog.js +29 -1
- package/Types/Cloud/CloudResourceCatalog.mjs +2 -0
- package/Types/Cloud/CloudResourceIndex.d.mts +44 -0
- package/Types/Cloud/CloudResourceIndex.d.ts +44 -0
- package/Types/Cloud/CloudResourceIndex.js +191 -0
- package/Types/Cloud/CloudResourceIndex.mjs +4 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.mts +3 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.ts +3 -0
- package/Types/CloudConnection/CloudConnectionCatalog.js +70 -12
- package/Types/CloudConnection/CloudConnectionCatalog.mjs +2 -0
- package/Types/CloudConnection/CloudConnectionPaste.js +7 -1
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +43 -3
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +43 -3
- package/Types/CloudConnection/CloudConnectionSetupCommands.js +280 -30
- package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +14 -0
- package/Types/CloudConnection/CloudConnectionTest.d.mts +1 -0
- package/Types/CloudConnection/CloudConnectionTest.d.ts +1 -0
- package/Types/CloudConnection/CloudConnectionTest.js +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.mts +19 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.ts +19 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +27 -1
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.mjs +3 -0
- package/Types/Database/BlankColumnValue.d.mts +6 -0
- package/Types/Database/BlankColumnValue.d.ts +6 -0
- package/Types/Database/BlankColumnValue.js +77 -0
- package/Types/Database/BlankColumnValue.mjs +4 -0
- package/Types/Date.d.mts +1 -0
- package/Types/Date.d.ts +1 -0
- package/Types/Date.js +32 -6
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +67 -12
- package/Types/DateLanguage.mjs +2 -0
- package/Types/Domain.d.mts +2 -0
- package/Types/Domain.d.ts +2 -0
- package/Types/Domain.js +27 -0
- package/Types/Email/EmailTemplateType.d.mts +2 -0
- package/Types/Email/EmailTemplateType.d.ts +2 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/Email.d.mts +1 -0
- package/Types/Email.d.ts +1 -0
- package/Types/Email.js +16 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.d.mts +6 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.d.ts +6 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.js +41 -14
- package/Types/IncomingCall/IncomingCallPolicyRepeat.mjs +3 -0
- package/Types/Monitor/CriteriaFilter.d.mts +1 -0
- package/Types/Monitor/CriteriaFilter.d.ts +1 -0
- package/Types/Monitor/CriteriaFilter.js +9 -0
- package/Types/Monitor/DatabaseMetricCatalog.js +2 -2
- package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.mts +4 -0
- package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.ts +4 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.d.mts +20 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.d.ts +20 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.js +232 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.mjs +8 -0
- package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.mts +3 -0
- package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.ts +3 -0
- package/Types/Monitor/MonitorStepExternalStatusPageMonitor.js +35 -0
- package/Types/Monitor/MonitorTemplateSyncField.js +6 -1
- package/Types/Monitor/MonitorType.js +12 -2
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +27 -2
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.mts +1 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.ts +1 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +31 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +3 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +3 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +3 -2
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.mts +1 -0
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.ts +1 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.d.mts +15 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.d.ts +15 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.js +2 -0
- package/Types/Monitor/UptimeBarTooltipMaintenance.mjs +1 -0
- package/Types/Monitor/UptimeHistoryLabels.d.mts +5 -0
- package/Types/Monitor/UptimeHistoryLabels.d.ts +5 -0
- package/Types/Monitor/UptimeHistoryLabels.js +5 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +2 -0
- package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +10 -3
- package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.js +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.mts +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.ts +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.js +51 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.mjs +4 -0
- package/Types/ReadingDirection.d.mts +10 -0
- package/Types/ReadingDirection.d.ts +10 -0
- package/Types/ReadingDirection.js +171 -0
- package/Types/ReadingDirection.mjs +10 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.mts +8 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.ts +8 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.js +55 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.mjs +5 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.js +2 -0
- package/Types/Runbook/HttpStepVariables.d.mts +8 -0
- package/Types/Runbook/HttpStepVariables.d.ts +8 -0
- package/Types/Runbook/HttpStepVariables.js +109 -0
- package/Types/Runbook/HttpStepVariables.mjs +5 -0
- package/Types/Runbook/RunbookStep.d.mts +1 -0
- package/Types/Runbook/RunbookStep.d.ts +1 -0
- package/Types/Runbook/RunnerFeatures.d.mts +1 -0
- package/Types/Runbook/RunnerFeatures.d.ts +1 -0
- package/Types/Runbook/RunnerFeatures.js +15 -3
- package/Types/Runbook/RunnerFeatures.mjs +1 -0
- package/Types/Runbook/SshHostKey.d.mts +22 -0
- package/Types/Runbook/SshHostKey.d.ts +22 -0
- package/Types/Runbook/SshHostKey.js +201 -0
- package/Types/Runbook/SshHostKey.mjs +10 -0
- package/Types/Runner/CodeRepositoryRunner.js +2 -3
- package/Types/Runner/GlobalAIAgentsGone.d.mts +1 -0
- package/Types/Runner/GlobalAIAgentsGone.d.ts +1 -0
- package/Types/Runner/GlobalAIAgentsGone.js +19 -0
- package/Types/Runner/GlobalAIAgentsGone.mjs +2 -0
- package/Types/Runner/GlobalRunnerWork.d.mts +1 -0
- package/Types/Runner/GlobalRunnerWork.d.ts +1 -0
- package/Types/Runner/GlobalRunnerWork.js +21 -1
- package/Types/Runner/GlobalRunnerWork.mjs +1 -0
- package/Types/SSO/SignInMethods.d.mts +31 -0
- package/Types/SSO/SignInMethods.d.ts +31 -0
- package/Types/SSO/SignInMethods.js +160 -0
- package/Types/SSO/SignInMethods.mjs +8 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.mts +24 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.ts +24 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.js +159 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.mjs +8 -0
- package/Types/StatusPage/StatusPageLanguage.d.mts +6 -0
- package/Types/StatusPage/StatusPageLanguage.d.ts +6 -0
- package/Types/StatusPage/StatusPageLanguage.js +17 -1
- package/Types/StatusPage/StatusPageLanguage.mjs +1 -0
- package/Types/Workflow/Templates.js +2 -5
- package/Types/Workflow/WorkflowPlan.d.mts +7 -0
- package/Types/Workflow/WorkflowPlan.d.ts +7 -0
- package/Types/Workflow/WorkflowPlan.js +39 -0
- package/Types/Workflow/WorkflowPlan.mjs +3 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.mts +11 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.ts +11 -0
- package/Utils/ColorContrast.d.mts +3 -0
- package/Utils/ColorContrast.d.ts +3 -0
- package/Utils/ColorContrast.js +41 -3
- package/Utils/ColorContrast.mjs +2 -0
- package/Utils/Dashboard/TableThresholds.d.mts +44 -0
- package/Utils/Dashboard/TableThresholds.d.ts +44 -0
- package/Utils/Dashboard/TableThresholds.js +288 -0
- package/Utils/Dashboard/TableThresholds.mjs +17 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +6 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +6 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +70 -1
- package/Utils/Dashboard/ValueWidgetSeries.mjs +2 -0
- package/Utils/DeveloperDocs/ResourceProfiles.js +16 -0
- package/Utils/DeveloperDocs/TerraformSchema.d.mts +1 -0
- package/Utils/DeveloperDocs/TerraformSchema.d.ts +1 -0
- package/Utils/DeveloperDocs/TerraformSchema.js +17 -0
- package/Utils/DeveloperDocs/TerraformSchema.mjs +1 -0
- package/Utils/Incident/WhoOpenedItRootCause.d.mts +2 -0
- package/Utils/Incident/WhoOpenedItRootCause.d.ts +2 -0
- package/Utils/Incident/WhoOpenedItRootCause.js +50 -0
- package/Utils/Incident/WhoOpenedItRootCause.mjs +3 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.d.mts +17 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.d.ts +17 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.js +274 -0
- package/Utils/Monitor/ExternalStatusPageComponentNames.mjs +6 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.mts +35 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.ts +35 -0
- package/Utils/Monitor/ExternalStatusPageReading.js +380 -0
- package/Utils/Monitor/ExternalStatusPageReading.mjs +6 -0
- package/Utils/Monitor/ExternalStatusPageScope.d.mts +43 -0
- package/Utils/Monitor/ExternalStatusPageScope.d.ts +43 -0
- package/Utils/Monitor/ExternalStatusPageScope.js +213 -0
- package/Utils/Monitor/ExternalStatusPageScope.mjs +4 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.d.mts +18 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.d.ts +18 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.js +129 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.mjs +4 -0
- package/Utils/Rules/RuleRunSummary.d.mts +1 -0
- package/Utils/Rules/RuleRunSummary.d.ts +1 -0
- package/Utils/Rules/RuleRunSummary.js +19 -1
- package/Utils/Rules/RuleRunSummary.mjs +1 -0
- package/Utils/Runbook/SshHostKeyFingerprint.d.mts +8 -0
- package/Utils/Runbook/SshHostKeyFingerprint.d.ts +8 -0
- package/Utils/Runbook/SshHostKeyFingerprint.js +83 -0
- package/Utils/Runbook/SshHostKeyFingerprint.mjs +5 -0
- package/Utils/ScheduledMaintenanceStart.d.mts +6 -0
- package/Utils/ScheduledMaintenanceStart.d.ts +6 -0
- package/Utils/ScheduledMaintenanceStart.js +15 -0
- package/Utils/Sms/Gsm7Text.js +9 -1
- package/Utils/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +19 -2
- package/Utils/Sms/OnCallPageSms.mjs +1 -0
- package/Utils/Sms/SubscriberSms.d.mts +2 -0
- package/Utils/Sms/SubscriberSms.d.ts +2 -0
- package/Utils/Sms/SubscriberSms.js +35 -0
- package/Utils/Sms/SubscriberSms.mjs +3 -0
- package/Utils/StatusPage/HistoryChartBarColors.d.mts +2 -0
- package/Utils/StatusPage/HistoryChartBarColors.d.ts +2 -0
- package/Utils/StatusPage/HistoryChartBarColors.js +12 -1
- package/Utils/StatusPage/HistoryChartBarColors.mjs +2 -0
- package/Utils/Telemetry/ChangeEventFields.d.mts +19 -1
- package/Utils/Telemetry/ChangeEventFields.d.ts +19 -1
- package/Utils/Telemetry/ChangeEventFields.js +52 -1
- package/Utils/Uptime/DayUptimeGraphUtil.d.mts +6 -0
- package/Utils/Uptime/DayUptimeGraphUtil.d.ts +6 -0
- package/Utils/Uptime/DayUptimeGraphUtil.js +37 -6
- package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +60 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +60 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.js +295 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.mjs +3 -0
- package/package.json +1 -1
|
@@ -15,6 +15,10 @@ export default interface ExternalStatusPageMonitorResponse {
|
|
|
15
15
|
provider?: string | undefined;
|
|
16
16
|
componentGroupName?: string | undefined;
|
|
17
17
|
componentName?: string | undefined;
|
|
18
|
+
componentNames?: Array<string> | undefined;
|
|
19
|
+
unmatchedComponentNames?: Array<string> | undefined;
|
|
20
|
+
incidentsOutsideScopeCount?: number | undefined;
|
|
21
|
+
activeIncidentNames?: Array<string> | undefined;
|
|
18
22
|
rawBody?: string | undefined;
|
|
19
23
|
isTimeout?: boolean | undefined;
|
|
20
24
|
probeAttempts?: Array<ProbeAttempt> | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import MonitorStep from "./MonitorStep.mjs";
|
|
2
|
+
import MonitorStepLogMonitor from "./MonitorStepLogMonitor.mjs";
|
|
3
|
+
import { KubernetesAlertTemplateArgs } from "./KubernetesAlertTemplates.mjs";
|
|
4
|
+
export declare const KUBERNETES_WARNING_EVENTS_TEMPLATE_ID: string;
|
|
5
|
+
export declare const KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE: string;
|
|
6
|
+
export declare const KUBERNETES_WARNING_EVENTS_WINDOW_SECONDS: number;
|
|
7
|
+
export declare const KUBERNETES_WARNING_EVENTS_GROUP_BY: Array<string>;
|
|
8
|
+
export type KubernetesEventAlertTemplateCategory = "Events";
|
|
9
|
+
export interface KubernetesEventAlertTemplate {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
summary: string;
|
|
13
|
+
description: string;
|
|
14
|
+
category: KubernetesEventAlertTemplateCategory;
|
|
15
|
+
severity: "Critical" | "Warning";
|
|
16
|
+
getMonitorStep: (args: KubernetesAlertTemplateArgs) => MonitorStep;
|
|
17
|
+
}
|
|
18
|
+
export declare function buildKubernetesWarningEventsLogMonitor(clusterIdentifier: string): MonitorStepLogMonitor;
|
|
19
|
+
export declare function getAllKubernetesEventAlertTemplates(): Array<KubernetesEventAlertTemplate>;
|
|
20
|
+
export declare function getKubernetesWarningEventsTemplate(): KubernetesEventAlertTemplate;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import MonitorStep from "./MonitorStep";
|
|
2
|
+
import MonitorStepLogMonitor from "./MonitorStepLogMonitor";
|
|
3
|
+
import { KubernetesAlertTemplateArgs } from "./KubernetesAlertTemplates";
|
|
4
|
+
export declare const KUBERNETES_WARNING_EVENTS_TEMPLATE_ID: string;
|
|
5
|
+
export declare const KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE: string;
|
|
6
|
+
export declare const KUBERNETES_WARNING_EVENTS_WINDOW_SECONDS: number;
|
|
7
|
+
export declare const KUBERNETES_WARNING_EVENTS_GROUP_BY: Array<string>;
|
|
8
|
+
export type KubernetesEventAlertTemplateCategory = "Events";
|
|
9
|
+
export interface KubernetesEventAlertTemplate {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
summary: string;
|
|
13
|
+
description: string;
|
|
14
|
+
category: KubernetesEventAlertTemplateCategory;
|
|
15
|
+
severity: "Critical" | "Warning";
|
|
16
|
+
getMonitorStep: (args: KubernetesAlertTemplateArgs) => MonitorStep;
|
|
17
|
+
}
|
|
18
|
+
export declare function buildKubernetesWarningEventsLogMonitor(clusterIdentifier: string): MonitorStepLogMonitor;
|
|
19
|
+
export declare function getAllKubernetesEventAlertTemplates(): Array<KubernetesEventAlertTemplate>;
|
|
20
|
+
export declare function getKubernetesWarningEventsTemplate(): KubernetesEventAlertTemplate;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.KUBERNETES_WARNING_EVENTS_GROUP_BY = exports.KUBERNETES_WARNING_EVENTS_WINDOW_SECONDS = exports.KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE = exports.KUBERNETES_WARNING_EVENTS_TEMPLATE_ID = void 0;
|
|
40
|
+
exports.buildKubernetesWarningEventsLogMonitor = buildKubernetesWarningEventsLogMonitor;
|
|
41
|
+
exports.getAllKubernetesEventAlertTemplates = getAllKubernetesEventAlertTemplates;
|
|
42
|
+
exports.getKubernetesWarningEventsTemplate = getKubernetesWarningEventsTemplate;
|
|
43
|
+
const ObjectID_1 = __importDefault(require("../ObjectID"));
|
|
44
|
+
const FilterCondition_1 = __importDefault(require("../Filter/FilterCondition"));
|
|
45
|
+
const KubernetesEvent_1 = __importStar(require("../Kubernetes/KubernetesEvent"));
|
|
46
|
+
const CriteriaFilter_1 = require("./CriteriaFilter");
|
|
47
|
+
const MonitorCriteria_1 = __importDefault(require("./MonitorCriteria"));
|
|
48
|
+
const MonitorCriteriaInstance_1 = __importDefault(require("./MonitorCriteriaInstance"));
|
|
49
|
+
const MonitorStep_1 = __importDefault(require("./MonitorStep"));
|
|
50
|
+
/*
|
|
51
|
+
* THE KUBERNETES WARNING EVENTS ALERT.
|
|
52
|
+
*
|
|
53
|
+
* Issue #5179 found where a cluster's warning events - kernel-monitor's
|
|
54
|
+
* OOMKilling on a node, an HPA's FailedGetResourceMetric - were lost, and
|
|
55
|
+
* put them on the cluster's Events page. Being told when one happens took a
|
|
56
|
+
* Logs monitor built by hand from a recipe in the docs (#5201's follow-up:
|
|
57
|
+
* "a built-in monitor template"). This is that monitor, offered on every
|
|
58
|
+
* cluster's Recommendations page and from its Events page.
|
|
59
|
+
*
|
|
60
|
+
* Kubernetes events are logs, stamped by ingest with what each one says
|
|
61
|
+
* (KubernetesEvent.ts), so the template is a Logs monitor - not a
|
|
62
|
+
* Kubernetes monitor, which reads metrics, and not one of
|
|
63
|
+
* KubernetesAlertTemplates, which the Kubernetes monitor's Quick Setup
|
|
64
|
+
* builds Kubernetes steps from:
|
|
65
|
+
*
|
|
66
|
+
* - the cluster's Warning events: its records (event.domain k8s,
|
|
67
|
+
* k8s.resource.name events), of this cluster (resource.k8s.cluster.name),
|
|
68
|
+
* of type Warning (k8s.event.type);
|
|
69
|
+
* - grouped by namespace, kind, object and reason, so every object that
|
|
70
|
+
* warns raises its own alert - an OOM kill on one node never hides behind
|
|
71
|
+
* another node's - and each says what and where;
|
|
72
|
+
* - over the last five minutes: a warning opens its alert at the next
|
|
73
|
+
* check, a repeating one (FailedGetResourceMetric, every 15 seconds while
|
|
74
|
+
* the HPA cannot read its metric) keeps it open, and five quiet minutes
|
|
75
|
+
* resolve it. A record Kubernetes sends when it deletes an Event an hour
|
|
76
|
+
* later is dated when the Event last happened, so it never reopens one.
|
|
77
|
+
*
|
|
78
|
+
* These attribute keys are stored in customers' logs and monitors: never
|
|
79
|
+
* rename one.
|
|
80
|
+
*/
|
|
81
|
+
exports.KUBERNETES_WARNING_EVENTS_TEMPLATE_ID = "k8s-warning-events";
|
|
82
|
+
// The resource attribute every record of a cluster's agent carries.
|
|
83
|
+
exports.KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE = "resource.k8s.cluster.name";
|
|
84
|
+
// How far back each check looks: a warning stays open while it repeats.
|
|
85
|
+
exports.KUBERNETES_WARNING_EVENTS_WINDOW_SECONDS = 300;
|
|
86
|
+
// One alert per object and reason that warns.
|
|
87
|
+
exports.KUBERNETES_WARNING_EVENTS_GROUP_BY = [
|
|
88
|
+
KubernetesEvent_1.default.Namespace,
|
|
89
|
+
KubernetesEvent_1.default.ObjectKind,
|
|
90
|
+
KubernetesEvent_1.default.ObjectName,
|
|
91
|
+
KubernetesEvent_1.default.Reason,
|
|
92
|
+
];
|
|
93
|
+
// The Logs monitor's query: this cluster's Warning events, grouped.
|
|
94
|
+
function buildKubernetesWarningEventsLogMonitor(clusterIdentifier) {
|
|
95
|
+
return {
|
|
96
|
+
attributes: {
|
|
97
|
+
[KubernetesEvent_1.default.Domain]: KubernetesEvent_1.KUBERNETES_EVENT_DOMAIN,
|
|
98
|
+
[KubernetesEvent_1.default.ResourceName]: KubernetesEvent_1.KUBERNETES_EVENTS_RESOURCE_NAME,
|
|
99
|
+
[exports.KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE]: clusterIdentifier,
|
|
100
|
+
[KubernetesEvent_1.default.Type]: KubernetesEvent_1.KubernetesEventType.Warning,
|
|
101
|
+
},
|
|
102
|
+
body: "",
|
|
103
|
+
severityTexts: [],
|
|
104
|
+
telemetryServiceIds: [],
|
|
105
|
+
lastXSecondsOfLogs: exports.KUBERNETES_WARNING_EVENTS_WINDOW_SECONDS,
|
|
106
|
+
groupByAttributes: [...exports.KUBERNETES_WARNING_EVENTS_GROUP_BY],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function buildWarningEventsCriteria(args) {
|
|
110
|
+
const unhealthy = new MonitorCriteriaInstance_1.default();
|
|
111
|
+
const title = `[K8s] Warning Event - ${args.monitorName}`;
|
|
112
|
+
/*
|
|
113
|
+
* The group - namespace, kind, object and reason - is the alert's series
|
|
114
|
+
* and is named under its title (SeriesContextEnricher); the message is on
|
|
115
|
+
* the cluster's Events page, and in the root cause.
|
|
116
|
+
*/
|
|
117
|
+
const description = `Kubernetes reported a warning event on ${args.monitorName}. It names the object and the reason; the message is in the root cause and on the cluster's Events page.`;
|
|
118
|
+
unhealthy.data = {
|
|
119
|
+
id: ObjectID_1.default.generate().toString(),
|
|
120
|
+
monitorStatusId: args.offlineMonitorStatusId,
|
|
121
|
+
filterCondition: FilterCondition_1.default.Any,
|
|
122
|
+
filters: [
|
|
123
|
+
{
|
|
124
|
+
checkOn: CriteriaFilter_1.CheckOn.LogCount,
|
|
125
|
+
filterType: CriteriaFilter_1.FilterType.GreaterThan,
|
|
126
|
+
value: 0,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
incidents: [
|
|
130
|
+
{
|
|
131
|
+
title: title,
|
|
132
|
+
description: description,
|
|
133
|
+
incidentSeverityId: args.defaultIncidentSeverityId,
|
|
134
|
+
autoResolveIncident: true,
|
|
135
|
+
id: ObjectID_1.default.generate().toString(),
|
|
136
|
+
onCallPolicyIds: [],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
alerts: [
|
|
140
|
+
{
|
|
141
|
+
title: title,
|
|
142
|
+
description: description,
|
|
143
|
+
alertSeverityId: args.defaultAlertSeverityId,
|
|
144
|
+
autoResolveAlert: true,
|
|
145
|
+
id: ObjectID_1.default.generate().toString(),
|
|
146
|
+
onCallPolicyIds: [],
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
changeMonitorStatus: true,
|
|
150
|
+
/*
|
|
151
|
+
* Both, as every template ships: the create form's Alert / Incident /
|
|
152
|
+
* Both choice (an alert unless someone picks otherwise) decides which
|
|
153
|
+
* of the two a monitor made from it raises (MonitorRecommendationUtil).
|
|
154
|
+
*/
|
|
155
|
+
createIncidents: true,
|
|
156
|
+
createAlerts: true,
|
|
157
|
+
name: `${args.monitorName} - Warning event reported`,
|
|
158
|
+
description: "Kubernetes reported a warning event in the last 5 minutes.",
|
|
159
|
+
};
|
|
160
|
+
const healthy = new MonitorCriteriaInstance_1.default();
|
|
161
|
+
healthy.data = {
|
|
162
|
+
id: ObjectID_1.default.generate().toString(),
|
|
163
|
+
monitorStatusId: args.onlineMonitorStatusId,
|
|
164
|
+
filterCondition: FilterCondition_1.default.Any,
|
|
165
|
+
filters: [
|
|
166
|
+
{
|
|
167
|
+
checkOn: CriteriaFilter_1.CheckOn.LogCount,
|
|
168
|
+
filterType: CriteriaFilter_1.FilterType.EqualTo,
|
|
169
|
+
value: 0,
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
incidents: [],
|
|
173
|
+
alerts: [],
|
|
174
|
+
changeMonitorStatus: true,
|
|
175
|
+
createIncidents: false,
|
|
176
|
+
createAlerts: false,
|
|
177
|
+
name: "Healthy",
|
|
178
|
+
description: "No warning event in the last 5 minutes.",
|
|
179
|
+
};
|
|
180
|
+
const criteria = new MonitorCriteria_1.default();
|
|
181
|
+
criteria.data = {
|
|
182
|
+
monitorCriteriaInstanceArray: [unhealthy, healthy],
|
|
183
|
+
};
|
|
184
|
+
return criteria;
|
|
185
|
+
}
|
|
186
|
+
const warningEventsTemplate = {
|
|
187
|
+
id: exports.KUBERNETES_WARNING_EVENTS_TEMPLATE_ID,
|
|
188
|
+
name: "Warning Events",
|
|
189
|
+
summary: "Kubernetes reports a warning event: one alert per object and reason.",
|
|
190
|
+
/*
|
|
191
|
+
* No backticks: the description is drawn as plain text on the
|
|
192
|
+
* recommendation card.
|
|
193
|
+
*/
|
|
194
|
+
description: "Alert when Kubernetes reports a Warning event about the cluster - an OOMKilling on a node, a BackOff on a pod, a FailedMount on a volume, a FailedGetResourceMetric on an HPA. Each object and reason raises its own alert, which resolves after 5 minutes without a new warning about it. It is a Logs monitor over the events the Kubernetes agent sends: edit its filter to watch only some reasons.",
|
|
195
|
+
category: "Events",
|
|
196
|
+
severity: "Warning",
|
|
197
|
+
getMonitorStep: (args) => {
|
|
198
|
+
const monitorStep = new MonitorStep_1.default();
|
|
199
|
+
monitorStep.data = {
|
|
200
|
+
id: ObjectID_1.default.generate().toString(),
|
|
201
|
+
monitorDestination: undefined,
|
|
202
|
+
doNotFollowRedirects: undefined,
|
|
203
|
+
monitorDestinationPort: undefined,
|
|
204
|
+
monitorCriteria: buildWarningEventsCriteria(args),
|
|
205
|
+
requestType: "GET",
|
|
206
|
+
requestHeaders: undefined,
|
|
207
|
+
requestBody: undefined,
|
|
208
|
+
customCode: undefined,
|
|
209
|
+
screenSizeTypes: undefined,
|
|
210
|
+
browserTypes: undefined,
|
|
211
|
+
retryCountOnError: undefined,
|
|
212
|
+
logMonitor: buildKubernetesWarningEventsLogMonitor(args.clusterIdentifier),
|
|
213
|
+
traceMonitor: undefined,
|
|
214
|
+
metricMonitor: undefined,
|
|
215
|
+
exceptionMonitor: undefined,
|
|
216
|
+
snmpMonitor: undefined,
|
|
217
|
+
dnsMonitor: undefined,
|
|
218
|
+
domainMonitor: undefined,
|
|
219
|
+
externalStatusPageMonitor: undefined,
|
|
220
|
+
kubernetesMonitor: undefined,
|
|
221
|
+
};
|
|
222
|
+
return monitorStep;
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
// Every Kubernetes alert built on the cluster's events, not its metrics.
|
|
226
|
+
function getAllKubernetesEventAlertTemplates() {
|
|
227
|
+
return [warningEventsTemplate];
|
|
228
|
+
}
|
|
229
|
+
// The Warning Events template.
|
|
230
|
+
function getKubernetesWarningEventsTemplate() {
|
|
231
|
+
return warningEventsTemplate;
|
|
232
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import commonJsModule from "./KubernetesEventAlertTemplates.js";
|
|
2
|
+
export const KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE = commonJsModule.KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE;
|
|
3
|
+
export const KUBERNETES_WARNING_EVENTS_GROUP_BY = commonJsModule.KUBERNETES_WARNING_EVENTS_GROUP_BY;
|
|
4
|
+
export const KUBERNETES_WARNING_EVENTS_TEMPLATE_ID = commonJsModule.KUBERNETES_WARNING_EVENTS_TEMPLATE_ID;
|
|
5
|
+
export const KUBERNETES_WARNING_EVENTS_WINDOW_SECONDS = commonJsModule.KUBERNETES_WARNING_EVENTS_WINDOW_SECONDS;
|
|
6
|
+
export const buildKubernetesWarningEventsLogMonitor = commonJsModule.buildKubernetesWarningEventsLogMonitor;
|
|
7
|
+
export const getAllKubernetesEventAlertTemplates = commonJsModule.getAllKubernetesEventAlertTemplates;
|
|
8
|
+
export const getKubernetesWarningEventsTemplate = commonJsModule.getKubernetesWarningEventsTemplate;
|
|
@@ -4,12 +4,15 @@ export default interface MonitorStepExternalStatusPageMonitor {
|
|
|
4
4
|
statusPageUrl: string;
|
|
5
5
|
provider: ExternalStatusPageProviderType;
|
|
6
6
|
componentGroupName?: string | undefined;
|
|
7
|
+
componentNames?: Array<string> | undefined;
|
|
7
8
|
componentName?: string | undefined;
|
|
8
9
|
timeout: number;
|
|
9
10
|
retries: number;
|
|
10
11
|
}
|
|
11
12
|
export declare class MonitorStepExternalStatusPageMonitorUtil {
|
|
12
13
|
static getDefault(): MonitorStepExternalStatusPageMonitor;
|
|
14
|
+
static getComponentNames(monitor: Pick<MonitorStepExternalStatusPageMonitor, "componentNames" | "componentName"> | JSONObject | undefined | null): Array<string>;
|
|
15
|
+
static withComponentNames(monitor: MonitorStepExternalStatusPageMonitor, names: Array<string>): MonitorStepExternalStatusPageMonitor;
|
|
13
16
|
static fromJSON(json: JSONObject): MonitorStepExternalStatusPageMonitor;
|
|
14
17
|
static toJSON(monitor: MonitorStepExternalStatusPageMonitor): JSONObject;
|
|
15
18
|
}
|
|
@@ -4,12 +4,15 @@ export default interface MonitorStepExternalStatusPageMonitor {
|
|
|
4
4
|
statusPageUrl: string;
|
|
5
5
|
provider: ExternalStatusPageProviderType;
|
|
6
6
|
componentGroupName?: string | undefined;
|
|
7
|
+
componentNames?: Array<string> | undefined;
|
|
7
8
|
componentName?: string | undefined;
|
|
8
9
|
timeout: number;
|
|
9
10
|
retries: number;
|
|
10
11
|
}
|
|
11
12
|
export declare class MonitorStepExternalStatusPageMonitorUtil {
|
|
12
13
|
static getDefault(): MonitorStepExternalStatusPageMonitor;
|
|
14
|
+
static getComponentNames(monitor: Pick<MonitorStepExternalStatusPageMonitor, "componentNames" | "componentName"> | JSONObject | undefined | null): Array<string>;
|
|
15
|
+
static withComponentNames(monitor: MonitorStepExternalStatusPageMonitor, names: Array<string>): MonitorStepExternalStatusPageMonitor;
|
|
13
16
|
static fromJSON(json: JSONObject): MonitorStepExternalStatusPageMonitor;
|
|
14
17
|
static toJSON(monitor: MonitorStepExternalStatusPageMonitor): JSONObject;
|
|
15
18
|
}
|
|
@@ -6,23 +6,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.MonitorStepExternalStatusPageMonitorUtil = void 0;
|
|
7
7
|
const ExternalStatusPageProviderType_1 = __importDefault(require("./ExternalStatusPageProviderType"));
|
|
8
8
|
const MonitorStepRetries_1 = require("./MonitorStepRetries");
|
|
9
|
+
const ExternalStatusPageComponentNames_1 = __importDefault(require("../../Utils/Monitor/ExternalStatusPageComponentNames"));
|
|
9
10
|
class MonitorStepExternalStatusPageMonitorUtil {
|
|
10
11
|
static getDefault() {
|
|
11
12
|
return {
|
|
12
13
|
statusPageUrl: "",
|
|
13
14
|
provider: ExternalStatusPageProviderType_1.default.Auto,
|
|
14
15
|
componentGroupName: undefined,
|
|
16
|
+
componentNames: [],
|
|
15
17
|
componentName: undefined,
|
|
16
18
|
timeout: 10000,
|
|
17
19
|
retries: 3,
|
|
18
20
|
};
|
|
19
21
|
}
|
|
22
|
+
/*
|
|
23
|
+
* The names of the components a monitor watches: its list, or for a
|
|
24
|
+
* monitor saved before the list, its one name filter between stars
|
|
25
|
+
* (ExternalStatusPageComponentNames.fromLegacyName). None: the whole page.
|
|
26
|
+
*/
|
|
27
|
+
static getComponentNames(monitor) {
|
|
28
|
+
if (!monitor) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
const record = monitor;
|
|
32
|
+
if (Array.isArray(record["componentNames"])) {
|
|
33
|
+
return ExternalStatusPageComponentNames_1.default.normalize(record["componentNames"]);
|
|
34
|
+
}
|
|
35
|
+
return ExternalStatusPageComponentNames_1.default.fromLegacyName(record["componentName"]);
|
|
36
|
+
}
|
|
37
|
+
/*
|
|
38
|
+
* The monitor watching these components: the list, and the one name a
|
|
39
|
+
* probe that has not been upgraded reads in its place
|
|
40
|
+
* (ExternalStatusPageComponentNames.toLegacyName).
|
|
41
|
+
*/
|
|
42
|
+
static withComponentNames(monitor, names) {
|
|
43
|
+
const componentNames = ExternalStatusPageComponentNames_1.default.normalize(names);
|
|
44
|
+
return Object.assign(Object.assign({}, monitor), { componentNames: componentNames, componentName: ExternalStatusPageComponentNames_1.default.toLegacyName(componentNames) });
|
|
45
|
+
}
|
|
20
46
|
static fromJSON(json) {
|
|
21
47
|
return {
|
|
22
48
|
statusPageUrl: json["statusPageUrl"] || "",
|
|
23
49
|
provider: json["provider"] ||
|
|
24
50
|
ExternalStatusPageProviderType_1.default.Auto,
|
|
25
51
|
componentGroupName: json["componentGroupName"] || undefined,
|
|
52
|
+
componentNames: MonitorStepExternalStatusPageMonitorUtil.getComponentNames(json),
|
|
26
53
|
componentName: json["componentName"] || undefined,
|
|
27
54
|
timeout: json["timeout"] || 10000,
|
|
28
55
|
// 0 retries is a real answer and must survive the round-trip.
|
|
@@ -30,10 +57,18 @@ class MonitorStepExternalStatusPageMonitorUtil {
|
|
|
30
57
|
};
|
|
31
58
|
}
|
|
32
59
|
static toJSON(monitor) {
|
|
60
|
+
/*
|
|
61
|
+
* A monitor saved before the list is written with it: its one name
|
|
62
|
+
* filter, between stars. One that names nothing leaves the list out.
|
|
63
|
+
*/
|
|
64
|
+
const hasNames = Array.isArray(monitor.componentNames) || Boolean(monitor.componentName);
|
|
33
65
|
return {
|
|
34
66
|
statusPageUrl: monitor.statusPageUrl,
|
|
35
67
|
provider: monitor.provider,
|
|
36
68
|
componentGroupName: monitor.componentGroupName,
|
|
69
|
+
componentNames: hasNames
|
|
70
|
+
? MonitorStepExternalStatusPageMonitorUtil.getComponentNames(monitor)
|
|
71
|
+
: undefined,
|
|
37
72
|
componentName: monitor.componentName,
|
|
38
73
|
timeout: monitor.timeout,
|
|
39
74
|
retries: monitor.retries,
|
|
@@ -89,7 +89,7 @@ class MonitorTemplateSyncFieldUtil {
|
|
|
89
89
|
if (monitorType === MonitorType_1.default.ExternalStatusPage) {
|
|
90
90
|
add("externalStatusPageMonitor.statusPageUrl", "Status page URL");
|
|
91
91
|
add("externalStatusPageMonitor.provider", "Status page provider");
|
|
92
|
-
add("externalStatusPageMonitor.components", "Status page components", "Keep the
|
|
92
|
+
add("externalStatusPageMonitor.components", "Status page components", "Keep the component group and the chosen components together.");
|
|
93
93
|
add("externalStatusPageMonitor.timeout", "Status page timeout");
|
|
94
94
|
add("externalStatusPageMonitor.retries", "Status page retries");
|
|
95
95
|
}
|
|
@@ -213,8 +213,13 @@ class MonitorTemplateSyncFieldUtil {
|
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
if (field === "externalStatusPageMonitor.components") {
|
|
216
|
+
/*
|
|
217
|
+
* The chosen components, and the one name a monitor saved before
|
|
218
|
+
* the list had (and an older probe reads), kept together.
|
|
219
|
+
*/
|
|
216
220
|
return [
|
|
217
221
|
"externalStatusPageMonitor.componentGroupName",
|
|
222
|
+
"externalStatusPageMonitor.componentNames",
|
|
218
223
|
"externalStatusPageMonitor.componentName",
|
|
219
224
|
];
|
|
220
225
|
}
|
|
@@ -755,7 +755,13 @@ class MonitorTypeHelper {
|
|
|
755
755
|
{
|
|
756
756
|
monitorType: MonitorType.Traces,
|
|
757
757
|
title: "Traces",
|
|
758
|
-
|
|
758
|
+
/*
|
|
759
|
+
* A Traces monitor counts the spans that match its filters (its one
|
|
760
|
+
* criteria is Span Count): it cannot read a span's duration, so its
|
|
761
|
+
* card promises no latency. Latency is alerted on through a Metrics
|
|
762
|
+
* monitor on a request duration metric, which answers "latency".
|
|
763
|
+
*/
|
|
764
|
+
description: "Alert on the number of matching spans, like failed requests, from any source.",
|
|
759
765
|
icon: IconProp_1.default.Waterfall,
|
|
760
766
|
keywords: [
|
|
761
767
|
"trace",
|
|
@@ -764,7 +770,9 @@ class MonitorTypeHelper {
|
|
|
764
770
|
"opentelemetry",
|
|
765
771
|
"distributed tracing",
|
|
766
772
|
"apm",
|
|
767
|
-
"
|
|
773
|
+
"span count",
|
|
774
|
+
"failed requests",
|
|
775
|
+
"error spans",
|
|
768
776
|
],
|
|
769
777
|
},
|
|
770
778
|
{
|
|
@@ -781,6 +789,8 @@ class MonitorTypeHelper {
|
|
|
781
789
|
"histogram",
|
|
782
790
|
"timeseries",
|
|
783
791
|
"prometheus",
|
|
792
|
+
"latency",
|
|
793
|
+
"request duration",
|
|
784
794
|
],
|
|
785
795
|
},
|
|
786
796
|
{
|
|
@@ -14,6 +14,7 @@ const DockerSwarmAlertTemplates_1 = require("../DockerSwarmAlertTemplates");
|
|
|
14
14
|
const HostAlertTemplates_1 = require("../HostAlertTemplates");
|
|
15
15
|
const IotAlertTemplates_1 = require("../IotAlertTemplates");
|
|
16
16
|
const KubernetesAlertTemplates_1 = require("../KubernetesAlertTemplates");
|
|
17
|
+
const KubernetesEventAlertTemplates_1 = require("../KubernetesEventAlertTemplates");
|
|
17
18
|
const PodmanAlertTemplates_1 = require("../PodmanAlertTemplates");
|
|
18
19
|
const ProxmoxAlertTemplates_1 = require("../ProxmoxAlertTemplates");
|
|
19
20
|
const RumAlertTemplates_1 = require("../RumAlertTemplates");
|
|
@@ -44,7 +45,7 @@ function normalize(data) {
|
|
|
44
45
|
* `any` and would not catch a renamed field.
|
|
45
46
|
*/
|
|
46
47
|
function getKubernetesRecommendations() {
|
|
47
|
-
|
|
48
|
+
const metricRecommendations = (0, KubernetesAlertTemplates_1.getAllKubernetesAlertTemplates)().map((template) => {
|
|
48
49
|
return normalize({
|
|
49
50
|
resourceType: MonitorRecommendationTypes_1.MonitorRecommendationResourceType.Kubernetes,
|
|
50
51
|
monitorType: MonitorType_1.default.Kubernetes,
|
|
@@ -61,6 +62,29 @@ function getKubernetesRecommendations() {
|
|
|
61
62
|
},
|
|
62
63
|
});
|
|
63
64
|
});
|
|
65
|
+
/*
|
|
66
|
+
* A cluster's warning events are logs (KubernetesEventAlertTemplates), so
|
|
67
|
+
* their alert is a Logs monitor scoped to the cluster - offered beside the
|
|
68
|
+
* metric templates, last, under its own Events heading.
|
|
69
|
+
*/
|
|
70
|
+
const eventRecommendations = (0, KubernetesEventAlertTemplates_1.getAllKubernetesEventAlertTemplates)().map((template) => {
|
|
71
|
+
return normalize({
|
|
72
|
+
resourceType: MonitorRecommendationTypes_1.MonitorRecommendationResourceType.Kubernetes,
|
|
73
|
+
monitorType: MonitorType_1.default.Logs,
|
|
74
|
+
template: template,
|
|
75
|
+
getMonitorStep: (args) => {
|
|
76
|
+
return template.getMonitorStep({
|
|
77
|
+
clusterIdentifier: args.resourceIdentifier,
|
|
78
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
79
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
80
|
+
defaultIncidentSeverityId: args.defaultIncidentSeverityId,
|
|
81
|
+
defaultAlertSeverityId: args.defaultAlertSeverityId,
|
|
82
|
+
monitorName: args.monitorName,
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
return [...metricRecommendations, ...eventRecommendations];
|
|
64
88
|
}
|
|
65
89
|
function getHostRecommendations() {
|
|
66
90
|
return (0, HostAlertTemplates_1.getAllHostAlertTemplates)().map((template) => {
|
|
@@ -397,7 +421,8 @@ function getAllDatabaseRecommendations() {
|
|
|
397
421
|
const RESOURCE_TYPE_DEFINITIONS = [
|
|
398
422
|
{
|
|
399
423
|
resourceType: MonitorRecommendationTypes_1.MonitorRecommendationResourceType.Kubernetes,
|
|
400
|
-
|
|
424
|
+
// Metric templates, and the warning events' Logs monitor.
|
|
425
|
+
monitorTypes: [MonitorType_1.default.Kubernetes, MonitorType_1.default.Logs],
|
|
401
426
|
resourceLabel: "Kubernetes Cluster",
|
|
402
427
|
identifierFieldName: "clusterIdentifier",
|
|
403
428
|
icon: IconProp_1.default.Kubernetes,
|
|
@@ -39,6 +39,7 @@ export default class MonitorRecommendationUtil {
|
|
|
39
39
|
private static getRecommendationConfigKind;
|
|
40
40
|
private static getTelemetryResourceIdentifier;
|
|
41
41
|
private static getAttributeScopedResourceIdentifier;
|
|
42
|
+
private static getLogScopedResourceIdentifier;
|
|
42
43
|
private static getConfigValues;
|
|
43
44
|
private static getStableRecordKey;
|
|
44
45
|
private static getQueryAttributeKey;
|
|
@@ -39,6 +39,7 @@ export default class MonitorRecommendationUtil {
|
|
|
39
39
|
private static getRecommendationConfigKind;
|
|
40
40
|
private static getTelemetryResourceIdentifier;
|
|
41
41
|
private static getAttributeScopedResourceIdentifier;
|
|
42
|
+
private static getLogScopedResourceIdentifier;
|
|
42
43
|
private static getConfigValues;
|
|
43
44
|
private static getStableRecordKey;
|
|
44
45
|
private static getQueryAttributeKey;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const MonitorStepExceptionMonitor_1 = require("../MonitorStepExceptionMonitor");
|
|
7
7
|
const MonitorSteps_1 = __importDefault(require("../MonitorSteps"));
|
|
8
8
|
const DatabaseAlertTemplates_1 = require("../DatabaseAlertTemplates");
|
|
9
|
+
const KubernetesEventAlertTemplates_1 = require("../KubernetesEventAlertTemplates");
|
|
9
10
|
const MonitorRecommendationSeverityMapper_1 = __importDefault(require("./MonitorRecommendationSeverityMapper"));
|
|
10
11
|
const MonitorRecommendationTypes_1 = require("./MonitorRecommendationTypes");
|
|
11
12
|
class MonitorRecommendationUtil {
|
|
@@ -207,6 +208,7 @@ class MonitorRecommendationUtil {
|
|
|
207
208
|
config.arrayIdentifier ||
|
|
208
209
|
this.getTelemetryResourceIdentifier(config) ||
|
|
209
210
|
this.getAttributeScopedResourceIdentifier(config) ||
|
|
211
|
+
this.getLogScopedResourceIdentifier(configKind, config) ||
|
|
210
212
|
"";
|
|
211
213
|
const metricNames = [];
|
|
212
214
|
const metricAliases = [];
|
|
@@ -272,6 +274,7 @@ class MonitorRecommendationUtil {
|
|
|
272
274
|
"metricMonitor",
|
|
273
275
|
"traceMonitor",
|
|
274
276
|
"exceptionMonitor",
|
|
277
|
+
"logMonitor",
|
|
275
278
|
];
|
|
276
279
|
const data = monitorStep.data;
|
|
277
280
|
return kinds.find((kind) => {
|
|
@@ -313,6 +316,21 @@ class MonitorRecommendationUtil {
|
|
|
313
316
|
}
|
|
314
317
|
return Array.from(values).sort().join(",");
|
|
315
318
|
}
|
|
319
|
+
/*
|
|
320
|
+
* The cluster a Logs step is scoped to by its attribute filter - a
|
|
321
|
+
* Kubernetes cluster's warning events (KubernetesEventAlertTemplates). The
|
|
322
|
+
* whole filter is part of the fingerprint through `configValues` anyway;
|
|
323
|
+
* this makes the step's resource as explicit as a Kubernetes monitor's
|
|
324
|
+
* clusterIdentifier, so "which resource does this monitor watch" has the
|
|
325
|
+
* same answer for both.
|
|
326
|
+
*/
|
|
327
|
+
static getLogScopedResourceIdentifier(configKind, config) {
|
|
328
|
+
if (configKind !== "logMonitor") {
|
|
329
|
+
return "";
|
|
330
|
+
}
|
|
331
|
+
const value = (config.attributes || {})[KubernetesEventAlertTemplates_1.KUBERNETES_CLUSTER_NAME_LOG_ATTRIBUTE];
|
|
332
|
+
return typeof value === "string" ? value.trim() : "";
|
|
333
|
+
}
|
|
316
334
|
/*
|
|
317
335
|
* Query inputs that do not live in a metric view. They must participate in
|
|
318
336
|
* coverage identity: an all-span trace monitor does not cover an error-span
|
|
@@ -320,7 +338,7 @@ class MonitorRecommendationUtil {
|
|
|
320
338
|
* metric scoped to one RUM application.
|
|
321
339
|
*/
|
|
322
340
|
static getConfigValues(configKind, config) {
|
|
323
|
-
var _a, _b, _c;
|
|
341
|
+
var _a, _b, _c, _d;
|
|
324
342
|
const values = [];
|
|
325
343
|
if (config.metricViewConfig) {
|
|
326
344
|
values.push(`rollingTime=${String((_a = config.rollingTime) !== null && _a !== void 0 ? _a : "")}`);
|
|
@@ -338,6 +356,18 @@ class MonitorRecommendationUtil {
|
|
|
338
356
|
.sort()
|
|
339
357
|
.join(",")}`, `message=${config.message || ""}`, `entityKeys=${(config.entityKeys || []).slice().sort().join(",")}`, `includeResolved=${String(Boolean(config.includeResolved))}`, `includeArchived=${String(Boolean(config.includeArchived))}`, `lastXSecondsOfExceptions=${String((_c = config.lastXSecondsOfExceptions) !== null && _c !== void 0 ? _c : "")}`);
|
|
340
358
|
}
|
|
359
|
+
/*
|
|
360
|
+
* Everything a Logs step asks: the logs it counts, over how long, and
|
|
361
|
+
* what it splits them by. A monitor counting every warning of a cluster
|
|
362
|
+
* does not cover one that splits them per object - nor one over another
|
|
363
|
+
* window, nor one resolved by a log.
|
|
364
|
+
*/
|
|
365
|
+
if (configKind === "logMonitor") {
|
|
366
|
+
values.push(`attributes=${this.getStableRecordKey(config.attributes || {})}`, `severityTexts=${(config.severityTexts || []).map(String).sort().join(",")}`, `body=${config.body || ""}`, `entityKeys=${(config.entityKeys || []).slice().sort().join(",")}`, `lastXSecondsOfLogs=${String((_d = config.lastXSecondsOfLogs) !== null && _d !== void 0 ? _d : "")}`, `groupByAttributes=${(config.groupByAttributes || [])
|
|
367
|
+
.slice()
|
|
368
|
+
.sort()
|
|
369
|
+
.join(",")}`, `resolvedByAttributes=${this.getStableRecordKey(config.resolvedByAttributes || {})}`);
|
|
370
|
+
}
|
|
341
371
|
return values;
|
|
342
372
|
}
|
|
343
373
|
static getStableRecordKey(record) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ObjectID from "../../ObjectID.mjs";
|
|
2
|
-
import { CriteriaFilter, FilterType } from "../CriteriaFilter.mjs";
|
|
2
|
+
import { CheckOn, CriteriaFilter, FilterType } from "../CriteriaFilter.mjs";
|
|
3
3
|
import MonitorCriteriaInstance from "../MonitorCriteriaInstance.mjs";
|
|
4
4
|
import { SnmpTableDefinition } from "./SnmpTable.mjs";
|
|
5
5
|
export interface NetworkDeviceAlertPackItem {
|
|
@@ -21,6 +21,8 @@ export default class NetworkDeviceAlertPackUtil {
|
|
|
21
21
|
name: string;
|
|
22
22
|
filterType: FilterType;
|
|
23
23
|
value: string | number | undefined;
|
|
24
|
+
checkOn?: CheckOn.SnmpOidValue | CheckOn.SnmpOidRatePerSecond | undefined;
|
|
25
|
+
description?: string | undefined;
|
|
24
26
|
}): MonitorCriteriaInstance;
|
|
25
27
|
static buildCriteriaInstances(context?: NetworkDeviceAlertPackContext): Array<MonitorCriteriaInstance>;
|
|
26
28
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ObjectID from "../../ObjectID";
|
|
2
|
-
import { CriteriaFilter, FilterType } from "../CriteriaFilter";
|
|
2
|
+
import { CheckOn, CriteriaFilter, FilterType } from "../CriteriaFilter";
|
|
3
3
|
import MonitorCriteriaInstance from "../MonitorCriteriaInstance";
|
|
4
4
|
import { SnmpTableDefinition } from "./SnmpTable";
|
|
5
5
|
export interface NetworkDeviceAlertPackItem {
|
|
@@ -21,6 +21,8 @@ export default class NetworkDeviceAlertPackUtil {
|
|
|
21
21
|
name: string;
|
|
22
22
|
filterType: FilterType;
|
|
23
23
|
value: string | number | undefined;
|
|
24
|
+
checkOn?: CheckOn.SnmpOidValue | CheckOn.SnmpOidRatePerSecond | undefined;
|
|
25
|
+
description?: string | undefined;
|
|
24
26
|
}): MonitorCriteriaInstance;
|
|
25
27
|
static buildCriteriaInstances(context?: NetworkDeviceAlertPackContext): Array<MonitorCriteriaInstance>;
|
|
26
28
|
}
|