portainer_container_logs_grep
Search container logs for lines matching a regex pattern, returning only matches with optional context to find errors or keywords without downloading full logs.
Instructions
Search container logs for lines matching a regex pattern.
Returns only matching lines (with optional context). Useful for finding specific errors, status codes, or keywords without downloading the full log.
Args: container_id: Container ID or name pattern: Regex pattern to search for (case-insensitive) tail: Number of log lines to fetch before filtering (default 500, max 1000) context_lines: Lines of context around each match (default 0, max 5) endpoint_id: Target endpoint ID (uses default if omitted)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| container_id | Yes | ||
| pattern | Yes | ||
| tail | No | ||
| context_lines | No | ||
| endpoint_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |