@elastic/count-logs-by-level
Count logs grouped by severity level
RUN SKILL count_logs_by_level()With parameters:
RUN SKILL count_logs_by_level WITH index_pattern = 'value', time_range = 'value'| Name | Type | Default | Description |
|---|---|---|---|
| index_pattern | STRING | — | Index pattern to search (e.g., logs-*, logs-production-*) |
| time_range | STRING | — | Time range to analyze (e.g., 1h, 24h, 7d) |
-- Using curl
curl -u elastic-admin:elastic-password http://localhost:9200/_escript \
-H "Content-Type: application/json" \
-d '{"query": "RUN SKILL count_logs_by_level()"}'
-- Response
{
"result": [...],
"_meta": {
"execution_id": "abc123",
"duration_ms": 45
}
}