Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data PutMetricFilter = PutMetricFilter' {}
- newPutMetricFilter :: Text -> Text -> Text -> NonEmpty MetricTransformation -> PutMetricFilter
- putMetricFilter_logGroupName :: Lens' PutMetricFilter Text
- putMetricFilter_filterName :: Lens' PutMetricFilter Text
- putMetricFilter_filterPattern :: Lens' PutMetricFilter Text
- putMetricFilter_metricTransformations :: Lens' PutMetricFilter (NonEmpty MetricTransformation)
- data PutMetricFilterResponse = PutMetricFilterResponse' {
- newPutMetricFilterResponse :: PutMetricFilterResponse
Creating a Request
data PutMetricFilter Source #
See: newPutMetricFilter
smart constructor.
PutMetricFilter' | |
|
Instances
:: Text | |
-> Text | |
-> Text | |
-> NonEmpty MetricTransformation | |
-> PutMetricFilter |
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_logGroupName :: Lens' PutMetricFilter Text Source #
The name of the log group.
putMetricFilter_filterName :: Lens' PutMetricFilter Text Source #
A name for the metric filter.
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
Eq PutMetricFilterResponse Source # | |
Defined in Amazonka.CloudWatchLogs.PutMetricFilter | |
Read PutMetricFilterResponse Source # | |
Show PutMetricFilterResponse Source # | |
Defined in Amazonka.CloudWatchLogs.PutMetricFilter showsPrec :: Int -> PutMetricFilterResponse -> ShowS # show :: PutMetricFilterResponse -> String # showList :: [PutMetricFilterResponse] -> ShowS # | |
Generic PutMetricFilterResponse Source # | |
Defined in Amazonka.CloudWatchLogs.PutMetricFilter type Rep PutMetricFilterResponse :: Type -> Type # | |
NFData PutMetricFilterResponse Source # | |
Defined in Amazonka.CloudWatchLogs.PutMetricFilter rnf :: PutMetricFilterResponse -> () # | |
type Rep PutMetricFilterResponse Source # | |
Defined in Amazonka.CloudWatchLogs.PutMetricFilter |
newPutMetricFilterResponse :: PutMetricFilterResponse Source #
Create a value of PutMetricFilterResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.