libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudWatchLogs.Types.MetricTransformation

Description

 
Synopsis

Documentation

data MetricTransformation Source #

Indicates how to transform ingested log events to metric data in a CloudWatch metric.

See: newMetricTransformation smart constructor.

Constructors

MetricTransformation' 

Fields

  • defaultValue :: Maybe Double

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

  • dimensions :: Maybe (HashMap Text Text)

    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.

    To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time.

    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.

  • unit :: Maybe StandardUnit

    The unit to assign to the metric. If you omit this, the unit is set as None.

  • metricName :: Text

    The name of the CloudWatch metric.

  • metricNamespace :: Text

    A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.

  • metricValue :: Text

    The value to publish to the CloudWatch metric when a filter pattern matches a log event.

Instances

Instances details
Eq MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

Read MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

Show MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

Generic MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

Associated Types

type Rep MetricTransformation :: Type -> Type #

NFData MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

Methods

rnf :: MetricTransformation -> () #

Hashable MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

ToJSON MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

FromJSON MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

type Rep MetricTransformation Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.Types.MetricTransformation

type Rep MetricTransformation = D1 ('MetaData "MetricTransformation" "Amazonka.CloudWatchLogs.Types.MetricTransformation" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "MetricTransformation'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "defaultValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Double)) :*: (S1 ('MetaSel ('Just "dimensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "unit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe StandardUnit)))) :*: (S1 ('MetaSel ('Just "metricName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "metricNamespace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "metricValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newMetricTransformation Source #

Create a value of MetricTransformation with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:defaultValue:MetricTransformation', metricTransformation_defaultValue - (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.

$sel:dimensions:MetricTransformation', metricTransformation_dimensions - 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.

To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time.

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.

$sel:unit:MetricTransformation', metricTransformation_unit - The unit to assign to the metric. If you omit this, the unit is set as None.

$sel:metricName:MetricTransformation', metricTransformation_metricName - The name of the CloudWatch metric.

$sel:metricNamespace:MetricTransformation', metricTransformation_metricNamespace - A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.

$sel:metricValue:MetricTransformation', metricTransformation_metricValue - The value to publish to the CloudWatch metric when a filter pattern matches a log event.

metricTransformation_defaultValue :: Lens' MetricTransformation (Maybe Double) Source #

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

metricTransformation_dimensions :: Lens' MetricTransformation (Maybe (HashMap Text Text)) Source #

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.

To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time.

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.

metricTransformation_unit :: Lens' MetricTransformation (Maybe StandardUnit) Source #

The unit to assign to the metric. If you omit this, the unit is set as None.

metricTransformation_metricNamespace :: Lens' MetricTransformation Text Source #

A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.

metricTransformation_metricValue :: Lens' MetricTransformation Text Source #

The value to publish to the CloudWatch metric when a filter pattern matches a log event.