aggregate_logs
Run log aggregations to find top values, trends over time, and min/max/avg stats. Filter by service or custom fields to analyze specific log subsets.
Instructions
Run aggregations on logs: terms (top values), date_histogram (trends over time), stats (min/max/avg), count. Supports service filtering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End time, e.g., "now" | |
| from | No | Start time, e.g., "now-1h" | |
| field | Yes | Field to aggregate on | |
| index | No | Index pattern, e.g., "logs-*", "filebeat-*" | * |
| query | No | Free text query string (Lucene syntax) | |
| aggType | Yes | Aggregation type | |
| filters | No | Key-value field filters | |
| service | No | Filter by kubernetes.container.name, e.g., "my-service" | |
| interval | No | Interval for date_histogram, e.g., "1h", "1d" | 1h |
| timeField | No | Timestamp field name | @timestamp |
| messageQuery | No | Search text within the message field (match_phrase) |