@renovosolutions/cdk-library-cloudwatch-alarms
Version:
AWS CDK Construct Library to automatically create CloudWatch Alarms for resources in a CDK app based on resource type.
889 lines (888 loc) • 33.7 kB
TypeScript
import { IAspect, aws_rds as rds, aws_cloudwatch as cloudwatch, Duration } from 'aws-cdk-lib';
import { IConstruct, Construct } from 'constructs';
import { AlarmBaseProps } from './common';
/**
* The recommended metrics for RDS alarms.
*/
export declare enum RdsRecommendedAlarmsMetrics {
/**
* The percentage of CPU utilization for an RDS instance.
*/
INSTANCE_CPU_UTILIZATION = "CPUUtilization",
/**
* The number of client network connections to the database instance.
*/
INSTANCE_DATABASE_CONNECTIONS = "DatabaseConnections",
/**
* The amount of available memory (RAM) on the RDS instance.
*/
INSTANCE_FREEABLE_MEMORY = "FreeableMemory",
/**
* The amount of available local storage space for an Aurora instance used for temporary files.
*/
INSTANCE_FREE_LOCAL_STORAGE = "FreeLocalStorage",
/**
* The amount of available storage space for an Aurora instance.
*/
INSTANCE_FREE_STORAGE_SPACE = "FreeStorageSpace",
/**
* The average amount of time taken per disk read I/O operation.
*/
INSTANCE_READ_LATENCY = "ReadLatency",
/**
* The average amount of time taken per disk write I/O operation.
*/
INSTANCE_WRITE_LATENCY = "WriteLatency",
/**
* The average active sessions (AAS) for the DB instance which shows how many sessions are concurrently active on the database.
*/
INSTANCE_DB_LOAD = "DBLoad",
/**
* The remaining available space for the cluster volume.
*/
AURORA_VOLUME_BYTES_LEFT_TOTAL = "AuroraVolumeBytesLeftTotal",
/**
* The amount of time that a binary log replica DB cluster running on Aurora MySQL lags behind the binary log replication source.
*/
AURORA_BIN_LOG_REPLICATION_LAG = "AuroraBinLogReplicaLag"
}
/**
* The common optional configuration for the alarms.
*/
export interface RdsAlarmBaseConfig extends AlarmBaseProps {
/**
* The period over which the specified statistic is applied.
*
* @default Duration.minutes(1)
*/
readonly period?: Duration;
}
/**
* The common properties for the instance alarms. The alarm should receive either
* instanceIdentifier or databaseInstance.
*/
export interface RdsInstanceAlarmProps {
/**
* The database instance identifier to monitor.
*/
readonly instanceIdentifier?: string;
/**
* The database instance to monitor.
*/
readonly databaseInstance?: rds.IDatabaseInstance;
}
/**
* Validates that either instanceIdentifier or databaseInstance is specified.
*
* @param props The properties for the RdsInstanceAlarm construct.
*/
export declare function validateInstanceIdentifier(props: RdsInstanceAlarmProps): void;
/**
* Configuration for the CpuUtilization alarm.
*/
export interface RdsCpuUtilizationAlarmConfig extends RdsAlarmBaseConfig {
/**
* The percentage (0-100) value against which the specified statistic is compared.
* Random spikes in CPU consumption might not hamper database performance, but sustained
* high CPU can hinder upcoming database requests. Depending on the overall database
* workload, high CPU at your RDS/Aurora instance can degrade the overall performance.
*
* @default 90
*/
readonly threshold?: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 5
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 5
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - CpuUtilization'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to detect consistent high CPU utilization in order to
* prevent very high response time and time-outs. If you want to check micro-bursting
* of CPU utilization you can set a lower alarm evaluation time.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceCpuUtilizationAlarm construct.
*/
export interface RdsInstanceCpuUtilizationAlarmProps extends RdsInstanceAlarmProps, RdsCpuUtilizationAlarmConfig {
}
/**
* An alarm that monitors CPU utilization for an RDS instance.
*
* This alarm is used to detect consistent high CPU utilization in order to prevent very
* high response time and time-outs.
*
* The alarm is triggered when the CPU utilization exceeds the % threshold.
*/
export declare class RdsInstanceCpuUtilizationAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceCpuUtilizationAlarmProps);
}
/**
* Configuration for the DatabaseConnections alarm.
*/
export interface RdsDatabaseConnectionsAlarmConfig extends RdsAlarmBaseConfig {
/**
* The number of connections against which the specified statistic is compared.
* The number of connections allowed depends on the size of your DB instance class and
* database engine-specific parameters related to processes/connections. You should
* calculate a value between 90-95% of the maximum number of connections for your database
* and use that result as the threshold value.
*/
readonly threshold: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 5
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 5
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - DatabaseConnections'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to help prevent rejected connections when the maximum
* number of DB connections is reached. This alarm is not recommended if you frequently
* change DB instance class, because doing so changes the memory and default maximum
* number of connections.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceDatabaseConnectionsAlarm construct.
*/
export interface RdsInstanceDatabaseConnectionsAlarmProps extends RdsInstanceAlarmProps, RdsDatabaseConnectionsAlarmConfig {
}
/**
* An alarm that monitors the number of client network connections to the database instance.
*
* This alarm is used to help prevent rejected connections when the maximum number of DB
* connections is reached.
*
* The alarm is triggered when number of connections is greater than threshold.
*/
export declare class RdsInstanceDatabaseConnectionsAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceDatabaseConnectionsAlarmProps);
}
/**
* Configuration for the FreeableMemory alarm.
*/
export interface RdsFreeableMemoryAlarmConfig extends RdsAlarmBaseConfig {
/**
* The percentage value (0-100) against which the specified statistic is compared.
* Depending on the workload and instance class, different values for the threshold
* can be appropriate. Ideally, available memory should not go below 25% of total
* memory for prolonged periods. For Aurora, you can set the threshold close to 5%,
* because the metric approaching 0 means that the DB instance has scaled up as much
* as it can. You can analyze the historical behavior of this metric to determine
* sensible threshold levels.
*/
readonly threshold: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 15
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 15
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - FreeableMemory'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to help prevent running out of memory
* which can result in rejected connections.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceFreeableMemoryAlarm construct.
*/
export interface RdsInstanceFreeableMemoryAlarmProps extends RdsInstanceAlarmProps, RdsFreeableMemoryAlarmConfig {
}
/**
* An alarm that monitors the amount of available memory (RAM) on the RDS instance.
*
* This alarm is used to help prevent running out of memory which can result in rejected connections.
*
* The alarm is triggered when the percentage of available memory is less than threshold.
*/
export declare class RdsInstanceFreeableMemoryAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceFreeableMemoryAlarmProps);
}
/**
* Configuration for the FreeLocalStorage alarm.
*/
export interface RdsFreeLocalStorageAlarmConfig extends RdsAlarmBaseConfig {
/**
* The percentage value (0-100) against which the specified statistic is compared.
* You should calculate about 10%-20% of the amount of storage available based on
* velocity and trend of volume usage, and then use that result as the threshold value
* to proactively take action before the volume reaches its limit.
*/
readonly threshold: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 5
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 5
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - FreeLocalStorage'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to detect how close the Aurora DB instance is to reaching
* the local storage limit, if you do not use Aurora Serverless v2 or higher. Local storage
* can reach capacity when you store non-persistent data, such as temporary table and log
* files, in the local storage. This alarm can prevent an out-of-space error that occurs when
* your DB instance runs out of local storage.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceFreeLocalStorageAlarm construct.
*/
export interface RdsInstanceFreeLocalStorageAlarmProps extends RdsInstanceAlarmProps, RdsFreeLocalStorageAlarmConfig {
}
/**
* An alarm that monitors the amount of available local storage space for an Aurora instance
* used for temporary files.
*
* This alarm is used to detect how close the Aurora DB instance is to reaching the local storage limit.
* This alarm can prevent an out-of-space error that occurs when your DB instance runs out of local storage.
*
* The alarm is triggered when the amount of available local storage space (bytes) is less than threshold.
*/
export declare class RdsInstanceFreeLocalStorageAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceFreeLocalStorageAlarmProps);
}
/**
* Configuration for the FreeStorageSpace alarm.
*/
export interface RdsFreeStorageSpaceAlarmConfig extends RdsAlarmBaseConfig {
/**
* The percentage value (0-100) against which the specified statistic is compared.
* The threshold value will depend on the currently allocated storage space. Typically,
* you should calculate the value of 10 percent of the allocated storage space and use
* that result as the threshold value.
*/
readonly threshold: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 5
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 5
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - FreeStorageSpace'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm helps prevent storage full issues. This can prevent downtime
* that occurs when your database instance runs out of storage. We do not recommend
* using this alarm if you have storage auto scaling enabled, or if you frequently change
* the storage capacity of the database instance.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceFreeStorageSpaceAlarm construct.
*/
export interface RdsInstanceFreeStorageSpaceAlarmProps extends RdsInstanceAlarmProps, RdsFreeStorageSpaceAlarmConfig {
}
/**
* An alarm that monitors the amount of available storage space for an Aurora instance.
*
* This alarm helps prevent storage full issues. This can prevent downtime that occurs when your database
* instance runs out of storage.
*
* The alarm is triggered when the amount of available storage space (bytes) is less than threshold.
*/
export declare class RdsInstanceFreeStorageSpaceAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceFreeStorageSpaceAlarmProps);
}
/**
* Configuration for the ReadLatency alarm.
*/
export interface RdsReadLatencyAlarmConfig extends RdsAlarmBaseConfig {
/**
* The value in milliseconds against which the specified statistic is compared.
* The recommended threshold value for this alarm is highly dependent on your use case.
* Read latencies higher than 20 milliseconds are likely a cause for investigation.
* You can also set a higher threshold if your application can have higher latency for
* read operations. Review the criticality and requirements of read latency and analyze
* the historical behavior of this metric to determine sensible threshold levels.
*/
readonly threshold: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 5
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 5
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - ReadLatency'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to detect high read latency. Database disks normally
* have a low read/write latency, but they can have issues that can cause high latency
* operations.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceReadLatencyAlarm construct.
*/
export interface RdsInstanceReadLatencyAlarmProps extends RdsInstanceAlarmProps, RdsReadLatencyAlarmConfig {
}
/**
* An alarm that monitors the average amount of time taken per disk read I/O operation.
*
* This alarm is used to detect high read latency. Database disks normally have a low read/write latency,
* but they can have issues that can cause high latency operations.
*
* The alarm is triggered when the average amount of time per disk read operation (in milliseconds) is
* greater than threshold.
*/
export declare class RdsInstanceReadLatencyAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceReadLatencyAlarmProps);
}
/**
* Configuration for the WriteLatency alarm.
*/
export interface RdsWriteLatencyAlarmConfig extends RdsAlarmBaseConfig {
/**
* The value in milliseconds against which the specified statistic is compared.
* The recommended threshold value for this alarm is highly dependent on your use case.
* Write latencies higher than 20 milliseconds are likely a cause for investigation.
* You can also set a higher threshold if your application can have a higher latency
* for write operations. Review the criticality and requirements of write latency and
* analyze the historical behavior of this metric to determine sensible threshold levels.
*/
readonly threshold: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 5
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 5
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - WriteLatency'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to detect high write latency. Although database disks
* typically have low read/write latency, they may experience problems that cause high
* latency operations. Monitoring this will assure you the disk latency is as low as expected.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceWriteLatencyAlarm construct.
*/
export interface RdsInstanceWriteLatencyAlarmProps extends RdsInstanceAlarmProps, RdsWriteLatencyAlarmConfig {
}
/**
* An alarm that monitors the average amount of time taken per disk write I/O operation.
*
* This alarm is used to detect high write latency. Database disks normally have a low read/write latency,
* but they can have issues that can cause high latency operations.
*
* The alarm is triggered when the average amount of time per disk write operation (in milliseconds) is
* greater than threshold.
*/
export declare class RdsInstanceWriteLatencyAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceWriteLatencyAlarmProps);
}
/**
* Configuration for the DbLoad alarm.
*/
export interface RdsDbLoadAlarmConfig extends RdsAlarmBaseConfig {
/**
* The value against which the specified statistic is compared.
* The maximum vCPU value is determined by the number of vCPU (virtual CPU) cores
* for your DB instance. Depending on the maximum vCPU, different values for the
* threshold can be appropriate. Ideally, DB load should not go above vCPU line.
*/
readonly threshold: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 15
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 15
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - DBLoad'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to detect a high DB load. High DB load can cause
* performance issues in the DB instance. This alarm is not applicable to serverless
* DB instances.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsInstanceDbLoadAlarm construct.
*/
export interface RdsInstanceDbLoadAlarmProps extends RdsInstanceAlarmProps, RdsDbLoadAlarmConfig {
}
/**
* An alarm that monitors the number of concurrent active sessions on the database.
*
* This alarm helps to monitor high DB load. If the number of processes exceed the number of vCPUs,
* the processes start queuing. When the queuing increases, the performance is impacted.
*
* The alarm is triggered when the number of active sessions for the database is
* greater than threshold.
*/
export declare class RdsInstanceDbLoadAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsInstanceDbLoadAlarmProps);
}
/**
* Configuration for the AuroraVolumeBytesLeftTotal alarm.
*/
export interface RdsAuroraVolumeBytesLeftTotalAlarmConfig extends RdsAlarmBaseConfig {
/**
* The value in bytes against which the specified statistic is compared.
* You should calculate 10%-20% of the actual size limit based on velocity and
* trend of volume usage increase, and then use that result as the threshold value
* to proactively take action before the volume reaches its limit.
*/
readonly threshold?: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 5
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 5
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - AuroraVolumeBytesLeftTotal'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to detect how close the Aurora cluster is to the volume
* size limit. This alarm can prevent an out-of-space error that occurs when your cluster
* runs out of space. This alarm is recommended only for Aurora MySQL.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsAuroraVolumeBytesLeftTotal construct.
*/
export interface RdsAuroraVolumeBytesLeftTotalAlarmProps extends RdsAuroraVolumeBytesLeftTotalAlarmConfig {
/**
* The database cluster to monitor.
*/
readonly databaseCluster: rds.IDatabaseCluster;
}
/**
* An alarm that monitors the remaining available space (in bytes) for the cluster volume.
*
* This alarm is used to detect how close the Aurora cluster is to the volume size limit. This
* alarm can prevent an out-of-space error that occurs when your cluster runs out of space.
*
* The alarm is triggered when the remaining available space (in bytes) is less than threshold.
*/
export declare class RdsAuroraVolumeBytesLeftTotalAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsAuroraVolumeBytesLeftTotalAlarmProps);
}
/**
* Configuration for the AuroraBinLogReplicationLag alarm.
*/
export interface RdsAuroraBinLogReplicationLagAlarmConfig extends RdsAlarmBaseConfig {
/**
* The value against which the specified statistic is compared.
* We recommend that you use -1 as the threshold value because Aurora MySQL publishes
* this value if the replica is in an error state.
*
* @default -1
*/
readonly threshold?: number;
/**
* The number of periods over which data is compared to the specified threshold.
*
* @default 2
*/
readonly evaluationPeriods?: number;
/**
* The number of data points that must be breaching to trigger the alarm.
*
* @default 2
*/
readonly datapointsToAlarm?: number;
/**
* The alarm name.
*
* @default - database.instanceIdentifiers[*] + ' - AuroraBinLogReplicationLag'
*/
readonly alarmName?: string;
/**
* The description of the alarm.
*
* @default - This alarm is used to detect whether the writer instance is in an error
* state and can’t replicate the source. This alarm is recommended only for Aurora MySQL.
*/
readonly alarmDescription?: string;
}
/**
* The properties for the RdsAuroraBinLogReplicationLag construct.
*/
export interface RdsAuroraBinLogReplicationLagAlarmProps extends RdsAuroraBinLogReplicationLagAlarmConfig {
/**
* The database cluster to monitor.
*/
readonly databaseCluster: rds.IDatabaseCluster;
}
/**
* An alarm that monitors the error state of Aurora writer instance replication.
*
* This alarm is used to detect whether the writer instance is in an error state and can’t replicate the source.
*
* The alarm is triggered when the value is less than or equal to threshold.
*/
export declare class RdsAuroraBinLogReplicationLagAlarm extends cloudwatch.Alarm {
constructor(scope: Construct, id: string, props: RdsAuroraBinLogReplicationLagAlarmProps);
}
/**
* Configuration for RDS recommended alarms.
*
* Default actions are overridden by the actions specified in the
* individual alarm configurations.
*/
export interface RdsRecommendedAlarmsConfig {
/**
* The default action to take when an alarm is triggered.
*
* @default - None
*/
readonly defaultAlarmAction?: cloudwatch.IAlarmAction;
/**
* The default action to take when an alarm enters the ok state.
*
* @default - None
*/
readonly defaultOkAction?: cloudwatch.IAlarmAction;
/**
* The default action to take when an alarm has insufficient data.
*
* @default - None
*/
readonly defaultInsufficientDataAction?: cloudwatch.IAlarmAction;
/**
* How to handle missing data for this alarm.
*
* @default TreatMissingData.MISSING
*/
readonly treatMissingData?: cloudwatch.TreatMissingData;
/**
* Alarm metrics to exclude from the recommended alarms.
*
* @default - None
*/
readonly excludeAlarms?: RdsRecommendedAlarmsMetrics[];
/**
* The resources to exclude from the recommended alarms.
*
* Use a resources id to exclude a specific resource.
*/
readonly excludeResources?: string[];
}
export interface RdsInstanceRecommendedAlarmsConfig extends RdsRecommendedAlarmsConfig {
/**
* The configuration for the CpuUtilization alarm.
*/
readonly configCpuUtilizationAlarm?: RdsCpuUtilizationAlarmConfig;
/**
* The configuration for the DatabaseConnections alarm.
*/
readonly configDatabaseConnectionsAlarm: RdsDatabaseConnectionsAlarmConfig;
/**
* The configuration for the FreeableMemory alarm.
*/
readonly configFreeableMemoryAlarm: RdsFreeableMemoryAlarmConfig;
/**
* The configuration for the FreeLocalStorage alarm.
*/
readonly configFreeLocalStorageAlarm: RdsFreeLocalStorageAlarmConfig;
/**
* The configuration for the FreeStorageSpace alarm.
*/
readonly configFreeStorageSpaceAlarm: RdsFreeStorageSpaceAlarmConfig;
/**
* The configuration for the ReadLatency alarm.
*/
readonly configReadLatencyAlarm: RdsReadLatencyAlarmConfig;
/**
* The configuration for the WriteLatency alarm.
*/
readonly configWriteLatencyAlarm: RdsWriteLatencyAlarmConfig;
/**
* The configuration for the DbLoad alarm.
*/
readonly configDbLoadAlarm: RdsDbLoadAlarmConfig;
}
export interface RdsAuroraRecommendedAlarmsConfig extends RdsInstanceRecommendedAlarmsConfig {
/**
* The configuration for the AuroraVolumeBytesLeftTotal alarm.
*/
readonly configAuroraVolumeBytesLeftTotalAlarm?: RdsAuroraVolumeBytesLeftTotalAlarmConfig;
/**
* The configuration for the AuroraBinLogReplicationLag alarm.
*/
readonly configAuroraBinLogReplicationLagAlarm?: RdsAuroraBinLogReplicationLagAlarmConfig;
}
export interface RdsInstanceRecommendedAlarmsProps extends RdsInstanceRecommendedAlarmsConfig {
/**
* The cluster instance identifier to apply the recommended alarms.
*/
readonly instanceIdentifier?: string;
/**
* The cluster instance to apply the recommended alarms.
*/
readonly databaseInstance?: rds.IDatabaseInstance;
}
export interface RdsAuroraRecommendedAlarmsProps extends RdsAuroraRecommendedAlarmsConfig {
/**
* The database cluster to apply the recommended alarms.
*/
readonly databaseCluster: rds.IDatabaseCluster;
}
/**
* A construct that creates recommended alarms for an RDS cluster instance.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html#RDS
*/
export declare class RdsInstanceRecommendedAlarms extends Construct {
/**
* The CpuUtilization alarm for the database instance.
*/
readonly alarmCpuUtilization?: RdsInstanceCpuUtilizationAlarm;
/**
* The DatabaseConnections alarm for the database instance.
*/
readonly alarmDatabaseConnections?: RdsInstanceDatabaseConnectionsAlarm;
/**
* The FreeableMemory alarm for the database instance.
*/
readonly alarmFreeableMemory?: RdsInstanceFreeableMemoryAlarm;
/**
* The FreeLocalStorage alarm for the database instance.
*/
readonly alarmFreeLocalStorage?: RdsInstanceFreeLocalStorageAlarm;
/**
* The FreeStorageSpace alarm for the database instance.
*/
readonly alarmFreeStorageSpace?: RdsInstanceFreeStorageSpaceAlarm;
/**
* The ReadLatency alarm for the database instance.
*/
readonly alarmReadLatency?: RdsInstanceReadLatencyAlarm;
/**
* The WriteLatency alarm for the database instance.
*/
readonly alarmWriteLatency?: RdsInstanceWriteLatencyAlarm;
/**
* The DbLoad alarm for the database instance.
*/
readonly alarmDbLoad?: RdsInstanceDbLoadAlarm;
constructor(scope: Construct, id: string, props: RdsInstanceRecommendedAlarmsProps);
}
/**
* A construct that creates recommended alarms for an RDS cluster.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html#RDS
*/
export declare class RdsAuroraRecommendedAlarms extends Construct {
/**
* The AuroraVolumeBytesLeftTotal alarm for the database cluster.
*/
readonly alarmAuroraVolumeBytesLeftTotal?: RdsAuroraVolumeBytesLeftTotalAlarm;
/**
* The Bin Log Replication lag alarm for the database cluster.
*/
readonly alarmAuroraBinLogReplicationLag?: RdsAuroraBinLogReplicationLagAlarm;
constructor(scope: Construct, id: string, props: RdsAuroraRecommendedAlarmsProps);
}
/**
* An extension of the rds instance (database or cluster instance) construct
* that provides methods to create recommended alarms
*/
export declare class DatabaseInstance extends rds.DatabaseInstance {
constructor(scope: Construct, id: string, props: rds.DatabaseInstanceProps);
/**
* Creates an alarm that monitors the CpuUtilization.
*/
alarmCpuUtilization(props?: RdsCpuUtilizationAlarmConfig): RdsInstanceCpuUtilizationAlarm;
/**
* Creates an alarm that monitors the DatabaseConnections.
*/
alarmDatabaseConnections(props: RdsDatabaseConnectionsAlarmConfig): RdsInstanceDatabaseConnectionsAlarm;
/**
* Creates an alarm that monitors the FreeableMemory.
*/
alarmFreeableMemory(props: RdsFreeableMemoryAlarmConfig): RdsInstanceFreeableMemoryAlarm;
/**
* Creates an alarm that monitors the FreeLocalStorage.
*/
alarmFreeLocalStorage(props: RdsFreeLocalStorageAlarmConfig): RdsInstanceFreeLocalStorageAlarm;
/**
* Creates an alarm that monitors the FreeStorageSpace.
*/
alarmFreeStorageSpace(props: RdsFreeStorageSpaceAlarmConfig): RdsInstanceFreeStorageSpaceAlarm;
/**
* Creates an alarm that monitors the ReadLatency.
*/
alarmReadLatency(props: RdsReadLatencyAlarmConfig): RdsInstanceReadLatencyAlarm;
/**
* Creates an alarm that monitors the WriteLatency.
*/
alarmWriteLatency(props: RdsWriteLatencyAlarmConfig): RdsInstanceWriteLatencyAlarm;
/**
* Creates an alarm that monitors the DbLoad.
*/
alarmDbLoad(props: RdsDbLoadAlarmConfig): RdsInstanceDbLoadAlarm;
/**
* Creates recommended alarms for the database instance.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html#RDS
*/
applyRecommendedAlarms(props: RdsInstanceRecommendedAlarmsConfig): RdsInstanceRecommendedAlarms;
}
/**
* An extension of the database cluster construct
* that provides methods to create recommended alarms
*/
export declare class DatabaseCluster extends rds.DatabaseCluster {
constructor(scope: Construct, id: string, props: rds.DatabaseClusterProps);
/**
* Creates an alarm that monitors the AuroraVolumeBytesLeftTotal.
*/
alarmAuroraVolumeBytesLeftTotal(props: RdsAuroraVolumeBytesLeftTotalAlarmConfig): RdsAuroraVolumeBytesLeftTotalAlarm;
/**
* Creates an alarm that monitors the Bin Log Replication lag.
*/
alarmAuroraBinLogReplicationLag(props?: RdsAuroraBinLogReplicationLagAlarmConfig): RdsAuroraBinLogReplicationLagAlarm;
/**
* Creates recommended alarms for the database cluster.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html#RDS
*/
applyRecommendedAlarms(props: RdsAuroraRecommendedAlarmsConfig): RdsAuroraRecommendedAlarms;
}
/**
* An aspect that applies recommended alarms for RDS database instances.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html#RDS
*/
export declare class RdsInstanceRecommendedAlarmsAspect implements IAspect {
private readonly props;
constructor(props: RdsInstanceRecommendedAlarmsConfig);
visit(node: IConstruct): void;
}
/**
* An aspect that applies recommended alarms for RDS clusters.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html#RDS
*/
export declare class RdsAuroraRecommendedAlarmsAspect implements IAspect {
private readonly props;
constructor(props: RdsAuroraRecommendedAlarmsConfig);
visit(node: IConstruct): void;
}