search_logs
Search Datadog logs with a query, time range, and filters to retrieve matching entries and their attributes, timestamps, and metadata.
Instructions
Search Datadog logs using the log search syntax. Returns matching log entries with their attributes, timestamps, and metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End time - ISO 8601 datetime or relative like "now" | now |
| from | No | Start time - ISO 8601 datetime or relative like "now-1h", "now-15m" | now-15m |
| sort | No | Sort order: timestamp (oldest first) or -timestamp (newest first) | -timestamp |
| limit | No | Max number of logs to return (1-1000, default 50) | |
| query | Yes | Log search query using Datadog log search syntax (e.g. "service:web-app status:error") | |
| cursor | No | Pagination cursor from a previous search result to get next page | |
| indexes | No | Specific log indexes to search. Defaults to all indexes. |