Amazon CloudWatch Logs

2016/11/10 - Amazon CloudWatch Logs - 1 updated api methods

DescribeMetricFilters (updated) Link ΒΆ
Changes (request, response)
Request
{'metricName': 'string', 'metricNamespace': 'string'}
Response
{'metricFilters': {'logGroupName': 'string'}}

Lists the specified metric filters. You can list all the metric filters or filter the results by log name, prefix, metric name, or metric namespace. The results are ASCII-sorted by filter name.

Request Syntax

client.describe_metric_filters(
    logGroupName='string',
    filterNamePrefix='string',
    nextToken='string',
    limit=123,
    metricName='string',
    metricNamespace='string'
)
type logGroupName

string

param logGroupName

The name of the log group.

type filterNamePrefix

string

param filterNamePrefix

The prefix to match.

type nextToken

string

param nextToken

The token for the next set of items to return. (You received this token from a previous call.)

type limit

integer

param limit

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

type metricName

string

param metricName

The name of the CloudWatch metric.

type metricNamespace

string

param metricNamespace

The namespace of the CloudWatch metric.

rtype

dict

returns

Response Syntax

{
    'metricFilters': [
        {
            'filterName': 'string',
            'filterPattern': 'string',
            'metricTransformations': [
                {
                    'metricName': 'string',
                    'metricNamespace': 'string',
                    'metricValue': 'string',
                    'defaultValue': 123.0
                },
            ],
            'creationTime': 123,
            'logGroupName': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • metricFilters (list) --

      The metric filters.

      • (dict) --

        Metric filters express how CloudWatch Logs would extract metric observations from ingested log events and transform them into metric data in a CloudWatch metric.

        • filterName (string) --

          The name of the metric filter.

        • filterPattern (string) --

          A symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event may contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.

        • metricTransformations (list) --

          The metric transformations.

          • (dict) --

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

            • metricName (string) --

              The name of the CloudWatch metric.

            • metricNamespace (string) --

              The namespace of the CloudWatch metric.

            • metricValue (string) --

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

            • defaultValue (float) --

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

        • creationTime (integer) --

          The creation time of the metric filter.

        • logGroupName (string) --

          The name of the log group.

    • nextToken (string) --

      The token for the next set of items to return. The token expires after 24 hours.