AWS monitoring and management services provide comprehensive observability, logging, and resource governance capabilities for maintaining operational excellence.
Monitoring and observability service that provides data and actionable insights for AWS and on-premises applications.
/**
* CloudWatch alarm for monitoring metrics
*/
class Alarm extends Resource implements IAlarm {
constructor(scope: Construct, id: string, props: AlarmProps);
/**
* Import an existing alarm
*/
static fromAlarmArn(scope: Construct, id: string, alarmArn: string): IAlarm;
/**
* Add an alarm action
*/
addAlarmAction(...alarmActions: IAlarmAction[]): void;
/**
* Add an ok action
*/
addOkAction(...okActions: IAlarmAction[]): void;
readonly alarmArn: string;
readonly alarmName: string;
readonly metric: IMetric;
}
/**
* CloudWatch log group for storing log data
*/
class LogGroup extends Resource implements ILogGroup {
constructor(scope: Construct, id: string, props?: LogGroupProps);
/**
* Import an existing log group by name
*/
static fromLogGroupName(scope: Construct, id: string, logGroupName: string): ILogGroup;
/**
* Grant write permissions to this log group
*/
grantWrite(grantee: IGrantable): Grant;
/**
* Add a log stream to this log group
*/
addStream(id: string, props?: StreamOptions): LogStream;
readonly logGroupName: string;
readonly logGroupArn: string;
}interface AlarmProps {
readonly metric: IMetric;
readonly threshold: number;
readonly actionsEnabled?: boolean;
readonly alarmDescription?: string;
readonly alarmName?: string;
readonly comparisonOperator?: ComparisonOperator;
readonly datapointsToAlarm?: number;
readonly evaluateLowSampleCountPercentile?: string;
readonly evaluationPeriods?: number;
readonly treatMissingData?: TreatMissingData;
}
interface LogGroupProps {
readonly encryptionKey?: IKey;
readonly logGroupName?: string;
readonly removalPolicy?: RemovalPolicy;
readonly retention?: RetentionDays;
}
enum ComparisonOperator {
GREATER_THAN_OR_EQUAL_TO_THRESHOLD = "GreaterThanOrEqualToThreshold",
GREATER_THAN_THRESHOLD = "GreaterThanThreshold",
LESS_THAN_THRESHOLD = "LessThanThreshold",
LESS_THAN_OR_EQUAL_TO_THRESHOLD = "LessThanOrEqualToThreshold"
}
enum TreatMissingData {
BREACHING = "breaching",
NOT_BREACHING = "notBreaching",
IGNORE = "ignore",
MISSING = "missing"
}