read_service_logs
Retrieve recent log lines for any service or Docker container and filter them by keyword to identify errors or denied requests.
Instructions
Safely fetch and optionally filter recent log lines for a service or Docker container.
Args: service_name: Target unit (e.g. 'nginx', 'systemd:cron', 'docker:my_container'). lines_count: Number of recent lines to retrieve (default: 50, maximum: 1000). grep_filter: Optional case-insensitive keyword to filter lines (e.g. 'ERROR', '403', 'denied').
Returns: JSON string containing the extracted log lines and matching statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep_filter | No | ||
| lines_count | No | ||
| service_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |