stream_analyze_pod_logs
Stream and analyze Kubernetes pod logs in chunks to detect patterns, identify errors and warnings, and provide real-time insights for troubleshooting.
Instructions
Stream and analyze pod logs in chunks with progressive pattern detection.
Processes logs in manageable chunks for memory efficiency and real-time insights.
Args:
namespace: Kubernetes namespace.
pod_name: Pod name to stream logs from.
container_name: Specific container (if multiple).
chunk_size: Lines per chunk (default: 5000).
analysis_mode: "errors_only", "errors_and_warnings" (default), "full_analysis", or "custom_patterns".
time_window: Time window for historical logs (e.g., "1h", "6h", "24h").
follow: Stream logs in real-time (default: False).
max_chunks: Max chunks to process (default: 50).
since_seconds: Logs from last N seconds.
tail_lines: Limit to last N lines.
time_period: Time period (e.g., "1h", "30m").
start_time: Start time (ISO format).
end_time: End time (ISO format).
max_context_tokens: Maximum tokens for output (default: 50000).
Returns:
Dict[str, Any]: Keys: chunks, overall_summary, trending_patterns, recommendations, metadata.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | ||
| pod_name | Yes | ||
| container_name | No | ||
| chunk_size | No | ||
| analysis_mode | No | errors_and_warnings | |
| time_window | No | ||
| follow | No | ||
| max_chunks | No | ||
| since_seconds | No | ||
| tail_lines | No | ||
| time_period | No | ||
| start_time | No | ||
| end_time | No | ||
| max_context_tokens | No |