Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Add support for EvaluateLowSampleCountPercentile field on percentile …
Browse files Browse the repository at this point in the history
…alarms.
  • Loading branch information
JasperAtD2L committed Nov 26, 2020
1 parent 92dbc50 commit 2d59f7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -388,6 +388,7 @@ definitions:
datapointsToAlarm: 1
comparisonOperator: GreaterThanThreshold
treatMissingData: missing
evaluateLowSampleCountPercentile: ignore
```

## Using a Separate CloudFormation Stack
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Expand Up @@ -161,6 +161,7 @@ class AlertsPlugin {
alarm.Properties.Statistic = definition.statistic
} else {
alarm.Properties.ExtendedStatistic = definition.statistic
alarm.Properties.EvaluateLowSampleCountPercentile = definition.evaluateLowSampleCountPercentile
}
} else if (definition.type === 'anomalyDetection') {
alarm = {
Expand Down
2 changes: 2 additions & 0 deletions src/index.test.js
Expand Up @@ -1145,6 +1145,7 @@ describe('#index', function () {
evaluationPeriods: 1,
comparisonOperator: 'GreaterThanThreshold',
treatMissingData: 'breaching',
evaluateLowSampleCountPercentile: 'ignore',
};

const functionName = 'func-name';
Expand All @@ -1161,6 +1162,7 @@ describe('#index', function () {
Threshold: definition.threshold,
ExtendedStatistic: definition.statistic,
Period: definition.period,
EvaluateLowSampleCountPercentile: definition.evaluateLowSampleCountPercentile,
EvaluationPeriods: definition.evaluationPeriods,
ComparisonOperator: definition.comparisonOperator,
OKActions: ['ok-topic'],
Expand Down

0 comments on commit 2d59f7c

Please sign in to comment.