Class: Aws::CloudWatchLogs::Types::MetricTransformation
- Inherits:
-
Struct
- Object
- Struct
- Aws::CloudWatchLogs::Types::MetricTransformation
- Defined in:
- gems/aws-sdk-cloudwatchlogs/lib/aws-sdk-cloudwatchlogs/types.rb
Overview
Indicates how to transform ingested log events to metric data in a CloudWatch metric.
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#default_value ⇒ Float
(Optional) The value to emit when a filter pattern does not match a log event.
-
#dimensions ⇒ Hash<String,String>
The fields to use as dimensions for the metric.
-
#metric_name ⇒ String
The name of the CloudWatch metric.
-
#metric_namespace ⇒ String
A custom namespace to contain your metric in CloudWatch.
-
#metric_value ⇒ String
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
-
#unit ⇒ String
The unit to assign to the metric.
Instance Attribute Details
#default_value ⇒ Float
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'gems/aws-sdk-cloudwatchlogs/lib/aws-sdk-cloudwatchlogs/types.rb', line 1875 class MetricTransformation < Struct.new( :metric_name, :metric_namespace, :metric_value, :default_value, :dimensions, :unit) SENSITIVE = [] include Aws::Structure end |
#dimensions ⇒ Hash<String,String>
The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.
Metrics extracted from log events are charged as custom metrics. To
prevent unexpected high charges, do not specify high-cardinality
fields such as IPAddress
or requestID
as dimensions. Each
different value found for a dimension is treated as a separate
metric and accrues charges as a separate custom metric.
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'gems/aws-sdk-cloudwatchlogs/lib/aws-sdk-cloudwatchlogs/types.rb', line 1875 class MetricTransformation < Struct.new( :metric_name, :metric_namespace, :metric_value, :default_value, :dimensions, :unit) SENSITIVE = [] include Aws::Structure end |
#metric_name ⇒ String
The name of the CloudWatch metric.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'gems/aws-sdk-cloudwatchlogs/lib/aws-sdk-cloudwatchlogs/types.rb', line 1875 class MetricTransformation < Struct.new( :metric_name, :metric_namespace, :metric_value, :default_value, :dimensions, :unit) SENSITIVE = [] include Aws::Structure end |
#metric_namespace ⇒ String
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'gems/aws-sdk-cloudwatchlogs/lib/aws-sdk-cloudwatchlogs/types.rb', line 1875 class MetricTransformation < Struct.new( :metric_name, :metric_namespace, :metric_value, :default_value, :dimensions, :unit) SENSITIVE = [] include Aws::Structure end |
#metric_value ⇒ String
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'gems/aws-sdk-cloudwatchlogs/lib/aws-sdk-cloudwatchlogs/types.rb', line 1875 class MetricTransformation < Struct.new( :metric_name, :metric_namespace, :metric_value, :default_value, :dimensions, :unit) SENSITIVE = [] include Aws::Structure end |
#unit ⇒ String
The unit to assign to the metric. If you omit this, the unit is set
as None
.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'gems/aws-sdk-cloudwatchlogs/lib/aws-sdk-cloudwatchlogs/types.rb', line 1875 class MetricTransformation < Struct.new( :metric_name, :metric_namespace, :metric_value, :default_value, :dimensions, :unit) SENSITIVE = [] include Aws::Structure end |