AWS CloudFormation
User Guide (Version )

AWS::Logs::MetricFilter MetricTransformation

MetricTransformation is a property of the AWS::Logs::MetricFilter resource that describes how to transform log streams into a CloudWatch metric.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "DefaultValue" : Double, "MetricName" : String, "MetricNamespace" : String, "MetricValue" : String }

YAML

DefaultValue: Double MetricName: String MetricNamespace: String MetricValue: String

Properties

DefaultValue

(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.

Required: No

Type: Double

Update requires: No interruption

MetricName

The name of the CloudWatch metric.

Required: Yes

Type: String

Update requires: No interruption

MetricNamespace

The namespace of the CloudWatch metric.

Required: Yes

Type: String

Maximum: 255

Pattern: [^:*$]*

Update requires: No interruption

MetricValue

The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like Error, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $ followed by the name of the field that you specified in the filter pattern, such as $size.

Required: Yes

Type: String

Update requires: No interruption

On this page: