enum Statistic
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudWatch.Statistic |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#Statistic |
Java | software.amazon.awscdk.services.cloudwatch.Statistic |
Python | aws_cdk.aws_cloudwatch.Statistic |
TypeScript (source) | aws-cdk-lib » aws_cloudwatch » Statistic |
Statistic to use over the aggregation period.
Example
declare const matchmakingRuleSet: gamelift.MatchmakingRuleSet;
// Alarm that triggers when the per-second average of not placed matches exceed 10%
const ruleEvaluationRatio = new cloudwatch.MathExpression({
expression: '1 - (ruleEvaluationsPassed / ruleEvaluationsFailed)',
usingMetrics: {
ruleEvaluationsPassed: matchmakingRuleSet.metricRuleEvaluationsPassed({ statistic: cloudwatch.Statistic.SUM }),
ruleEvaluationsFailed: matchmakingRuleSet.metric('ruleEvaluationsFailed'),
},
});
new cloudwatch.Alarm(this, 'Alarm', {
metric: ruleEvaluationRatio,
threshold: 0.1,
evaluationPeriods: 3,
});
Members
Name | Description |
---|---|
SAMPLE_COUNT | The count (number) of data points used for the statistical calculation. |
AVERAGE | The value of Sum / SampleCount during the specified period. |
SUM | All values submitted for the matching metric added together. |
MINIMUM | The lowest value observed during the specified period. |
MAXIMUM | The highest value observed during the specified period. |
SAMPLE_COUNT
The count (number) of data points used for the statistical calculation.
AVERAGE
The value of Sum / SampleCount during the specified period.
SUM
All values submitted for the matching metric added together.
This statistic can be useful for determining the total volume of a metric.
MINIMUM
The lowest value observed during the specified period.
You can use this value to determine low volumes of activity for your application.
MAXIMUM
The highest value observed during the specified period.
You can use this value to determine high volumes of activity for your application.