cdk-monitoring-constructs
Version:
[](https://badge.fury.io/js/cdk-monitoring-constructs) [](https://m
99 lines (98 loc) • 6.71 kB
TypeScript
import { GraphWidget, HorizontalAnnotation, IWidget } from "aws-cdk-lib/aws-cloudwatch";
import { RdsClusterMetricFactoryProps } from "./RdsClusterMetricFactory";
import { BaseMonitoringProps, ConnectionAlarmFactory, HighConnectionCountThreshold, LatencyAlarmFactory, LatencyThreshold, LatencyType, LowConnectionCountThreshold, MaxUsageCountThreshold, MetricWithAlarmSupport, Monitoring, MonitoringScope, UsageAlarmFactory, UsageThreshold } from "../../common";
import { MonitoringHeaderWidget } from "../../dashboard";
export interface RdsClusterMonitoringOptions extends BaseMonitoringProps {
readonly addDiskSpaceUsageAlarm?: Record<string, UsageThreshold>;
readonly addCpuUsageAlarm?: Record<string, UsageThreshold>;
readonly addMinConnectionCountAlarm?: Record<string, LowConnectionCountThreshold>;
readonly addMaxConnectionCountAlarm?: Record<string, HighConnectionCountThreshold>;
readonly addReadIOPSAlarm?: Record<string, MaxUsageCountThreshold>;
readonly addWriteIOPSAlarm?: Record<string, MaxUsageCountThreshold>;
readonly addSelectLatencyP50Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyP70Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyP90Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyP95Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyP99Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyP999Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyP9999Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyP100Alarm?: Record<string, LatencyThreshold>;
readonly addSelectLatencyAverageAlarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP50Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP70Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP90Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP95Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP99Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP999Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP9999Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyP100Alarm?: Record<string, LatencyThreshold>;
readonly addInsertLatencyAverageAlarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP50Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP70Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP90Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP95Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP99Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP999Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP9999Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyP100Alarm?: Record<string, LatencyThreshold>;
readonly addUpdateLatencyAverageAlarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP50Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP70Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP90Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP95Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP99Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP999Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP9999Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyP100Alarm?: Record<string, LatencyThreshold>;
readonly addDeleteLatencyAverageAlarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP50Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP70Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP90Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP95Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP99Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP999Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP9999Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyP100Alarm?: Record<string, LatencyThreshold>;
readonly addCommitLatencyAverageAlarm?: Record<string, LatencyThreshold>;
/**
* You can specify what latency types you want to be rendered in the dashboards.
* Note: any latency type with an alarm will be also added automatically.
* If the list is undefined, default values will be shown.
* If the list is empty, only the latency types with an alarm will be shown (if any).
* @default - p90 for all operation types
*/
readonly latencyTypesToRender?: LatencyType[];
}
export interface RdsClusterMonitoringProps extends RdsClusterMetricFactoryProps, RdsClusterMonitoringOptions {
}
export declare class RdsClusterMonitoring extends Monitoring {
readonly title: string;
readonly url?: string;
readonly usageAlarmFactory: UsageAlarmFactory;
readonly connectionAlarmFactory: ConnectionAlarmFactory;
readonly latencyAlarmFactory: LatencyAlarmFactory;
readonly usageAnnotations: HorizontalAnnotation[];
readonly connectionAnnotations: HorizontalAnnotation[];
readonly readLatencyAnnotations: HorizontalAnnotation[];
readonly writeLatencyAnnotations: HorizontalAnnotation[];
readonly iopsAnnotations: HorizontalAnnotation[];
readonly connectionsMetric: MetricWithAlarmSupport;
readonly diskSpaceUsageMetric: MetricWithAlarmSupport;
readonly cpuUsageMetric: MetricWithAlarmSupport;
readonly readIopsMetric: MetricWithAlarmSupport;
readonly writeIopsMetric: MetricWithAlarmSupport;
readonly selectLatencyMetrics: Record<string, MetricWithAlarmSupport>;
readonly insertLatencyMetrics: Record<string, MetricWithAlarmSupport>;
readonly updateLatencyMetrics: Record<string, MetricWithAlarmSupport>;
readonly deleteLatencyMetrics: Record<string, MetricWithAlarmSupport>;
readonly commitLatencyMetrics: Record<string, MetricWithAlarmSupport>;
readonly latencyTypesToRender: string[];
constructor(scope: MonitoringScope, props: RdsClusterMonitoringProps);
summaryWidgets(): IWidget[];
widgets(): IWidget[];
createTitleWidget(): MonitoringHeaderWidget;
createCpuAndDiskUsageWidget(width: number, height: number): GraphWidget;
createConnectionsWidget(width: number, height: number): GraphWidget;
createLatencyWidget(width: number, height: number): GraphWidget;
createIOPSWidget(width: number, height: number): GraphWidget;
}