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

Description

Creates or updates a metric filter and associates it with the specified log group. Metric filters allow you to configure rules to extract metric data from log events ingested through PutLogEvents.

The maximum number of metric filters that can be associated with a log group is 100.

When you create a metric filter, you can also optionally assign a unit and dimensions to the metric that is created.

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.

Synopsis

Creating a Request

data PutMetricFilter Source #

See: newPutMetricFilter smart constructor.

Constructors

PutMetricFilter' 

Fields

Instances

Instances details
Eq PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Read PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Show PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Generic PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Associated Types

type Rep PutMetricFilter :: Type -> Type #

NFData PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Methods

rnf :: PutMetricFilter -> () #

Hashable PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

ToJSON PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

AWSRequest PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Associated Types

type AWSResponse PutMetricFilter #

ToHeaders PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

ToPath PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

ToQuery PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

type Rep PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

type Rep PutMetricFilter = D1 ('MetaData "PutMetricFilter" "Amazonka.CloudWatchLogs.PutMetricFilter" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "PutMetricFilter'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "logGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "filterName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "filterPattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "metricTransformations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty MetricTransformation)))))
type AWSResponse PutMetricFilter Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

newPutMetricFilter Source #

Create a value of PutMetricFilter 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:logGroupName:PutMetricFilter', putMetricFilter_logGroupName - The name of the log group.

$sel:filterName:PutMetricFilter', putMetricFilter_filterName - A name for the metric filter.

$sel:filterPattern:PutMetricFilter', putMetricFilter_filterPattern - A filter pattern for extracting metric data out of ingested log events.

$sel:metricTransformations:PutMetricFilter', putMetricFilter_metricTransformations - A collection of information that defines how metric data gets emitted.

Request Lenses

putMetricFilter_filterPattern :: Lens' PutMetricFilter Text Source #

A filter pattern for extracting metric data out of ingested log events.

putMetricFilter_metricTransformations :: Lens' PutMetricFilter (NonEmpty MetricTransformation) Source #

A collection of information that defines how metric data gets emitted.

Destructuring the Response

data PutMetricFilterResponse Source #

See: newPutMetricFilterResponse smart constructor.

Instances

Instances details
Eq PutMetricFilterResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Read PutMetricFilterResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Show PutMetricFilterResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Generic PutMetricFilterResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Associated Types

type Rep PutMetricFilterResponse :: Type -> Type #

NFData PutMetricFilterResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

Methods

rnf :: PutMetricFilterResponse -> () #

type Rep PutMetricFilterResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.PutMetricFilter

type Rep PutMetricFilterResponse = D1 ('MetaData "PutMetricFilterResponse" "Amazonka.CloudWatchLogs.PutMetricFilter" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "PutMetricFilterResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newPutMetricFilterResponse :: PutMetricFilterResponse Source #

Create a value of PutMetricFilterResponse with all optional fields omitted.

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