> For the complete documentation index, see [llms.txt](https://oklencodes.gitbook.io/untitled/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oklencodes.gitbook.io/untitled/cloud/aws/using-different-aws-services-with-splunk/cloudwatch/cloudwatch-alarms-and-metric-filters/searching-logs-using-metric-filters.md).

# Searching logs using metric filters

As well as setting up metric log filters using the syntax, you can also directly search log groups for entries that match the pattern. This can be especially useful for troubleshooting or providing information on activity in your accounts.

<figure><img src="/files/6aMfdyRfyVasr29VfChI" alt=""><figcaption></figcaption></figure>

Select a log group from the CloudWatch console and click on the Search all button to search across all logs in the group.

<figure><img src="/files/ADOgWbkQ6300Ninb4csZ" alt=""><figcaption></figcaption></figure>

You can put the filter pattern in the search box and select a time frame in which to return matching log events. You can even create a metric filter straight from this page.

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://oklencodes.gitbook.io/untitled/cloud/aws/using-different-aws-services-with-splunk/cloudwatch/cloudwatch-alarms-and-metric-filters/searching-logs-using-metric-filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
