> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CloudWatch Logs Put Metric Filter

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](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html).

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.

<Note>
  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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html).
</Note>

<Note>
  External Documentation

  To learn more, visit the [AWS documentation](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutMetricFilter.html).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter              | Description                                                                                                                                                                                                                                                                                              |
  | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | AWS Region(s)          | Enter the desired AWS Region(s).<br /><br />To execute the action in multiple regions, provide a comma-separated list.<br />For example: `us-east-1,eu-west-2`.<br /><br />If you wish to run the action in all available regions, use the asterisk symbol (`*`) instead.                                |
  | Filter Name            | A name for the metric filter.                                                                                                                                                                                                                                                                            |
  | Filter Pattern         | A filter pattern for extracting metric data out of ingested log events.<br /><br />Input example:<br /><pre><code>\[ip, identity, user\_id, timestamp, request, status\_code, size]</code></pre>                                                                                                         |
  | Log Group Name         | The name of the log group.                                                                                                                                                                                                                                                                               |
  | Metric Transformations | A collection of information that defines how metric data gets emitted.<br /><br />Input example:<br /><pre><code>\[<br />  \{<br />    "metricValue": "4",<br />    "metricNamespace": "MyApp",<br />    "metricName": "Volume"<br />  }<br />]</code></pre><br />Array of MetricTransformation objects. |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter                        | Description                                                                   |
  | -------------------------------- | ----------------------------------------------------------------------------- |
  | Disable XML To JSON Auto Convert | When checked, XML responses are not automatically converted into JSON format. |
</div>

## Workflow Library Example

[Cloudwatch Logs Put Metric Filter with Aws and Send Results Via Email](https://library.blinkops.com/workflows/cloudwatch-logs-put-metric-filter-with-aws-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/cloudwatch-logs-put-metric-filter-with-aws-and-send-results-via-email/canvas" />
</div>
