Skip to content

Commit

Permalink
Add sampleCountMetricId to CustomAlarmThreshold
Browse files Browse the repository at this point in the history
This provides support for `minSampleCountToEvaluateDatapoint`
when using eg. `ErrorAlarmFactory`.

See #466
  • Loading branch information
bamarni authored Oct 16, 2024
1 parent 9279cec commit 38c884c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/common/alarm/CustomAlarmThreshold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ export interface CustomAlarmThreshold {
*/
readonly minSampleCountToEvaluateDatapoint?: number;

/**
* This property is required in the following situation:
* <ol>
* <li><code>minSampleCountToEvaluateDatapoint</code> is specified</li>
* <li>the metric used for the alarm is a <code>MathExpression</code></li>
* <li>the <code>MathExpression</code> is composed of more than one metric</li>
* </ol>
*
* In this situation, this property indicates the metric Id in the MathExpression’s <code>usingMetrics</code>
* property that should be used as the sampleCount metric for the new MathExpression as described in the documentation
* for <code>minSampleCountToEvaluateDatapoint</code>.
*/
readonly sampleCountMetricId?: string;

/**
* Specifies how many samples (N) of the metric is needed to trigger the alarm.
* If this property is specified, a composite alarm is created of the following:
Expand Down

0 comments on commit 38c884c

Please sign in to comment.