aws-cdk-lib.aws_cloudwatch.Statistic

enum Statistic ⚠️

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.Statistic
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#Statistic
Javasoftware.amazon.awscdk.services.cloudwatch.Statistic
Pythonaws_cdk.aws_cloudwatch.Statistic
TypeScript (source)aws-cdk-lib » aws_cloudwatch » Statistic

Statistic to use over the aggregation period.

See also: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html

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

NameDescription
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.