TreatMissingData Enum
Specify how missing data points are treated during alarm evaluation.
Example
ts
import * as cdk from 'aws-cdk-lib';
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
const fn = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.NODEJS_LATEST,
handler: 'index.handler',
code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
timeout: Duration.minutes(5),
});
if (fn.timeout) {
new cloudwatch.Alarm(this, `MyAlarm`, {
metric: fn.metricDuration().with({
statistic: 'Maximum',
}),
evaluationPeriods: 1,
datapointsToAlarm: 1,
threshold: fn.timeout.toMilliseconds(),
treatMissingData: cloudwatch.TreatMissingData.IGNORE,
alarmName: 'My Lambda Timeout',
});
}
Members
| Member | Description |
|---|---|
BREACHING | Missing data points are treated as breaching the threshold. |
NOT_BREACHING | Missing data points are treated as being within the threshold. |
IGNORE | The current alarm state is maintained. |
MISSING | The alarm does not consider missing data points when evaluating whether to change state. |
Referenced by
AnomalyDetectionAlarmProps.treatMissingDatatreat_missing_datatreatMissingDataTreatMissingDataTreatMissingDataCreateAlarmOptions.treatMissingDatatreat_missing_datatreatMissingDataTreatMissingDataTreatMissingData