search_logs
Search Datadog logs by service, status, host, environment, or raw query to retrieve timestamped entries, helping troubleshoot incidents and investigate issues quickly.
Instructions
Search Datadog logs with structured filters or raw query. Returns log entries with timestamp, service, status, host, and message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End time: relative or ISO 8601 or 'now' | now |
| env | No | Filter by environment (e.g. prod, staging) | |
| from | No | Start time: relative (15m, 1h, 1d, 7d) or ISO 8601 | 15m |
| host | No | Filter by host name | |
| sort | No | Sort order (- prefix for descending) | -timestamp |
| limit | No | Max logs to return | |
| query | No | Raw Datadog log query (overrides structured filters). E.g. 'service:web-api status:error' | |
| cursor | No | Pagination cursor from previous response | |
| source | No | Filter by log source | |
| status | No | Filter by log status/level | |
| message | No | Free-text search in log message | |
| service | No | Filter by service name |