👁️

Get Recent Errors

Verified

@elastic/get-recent-errors

Get recent error logs with details

Usage

RUN SKILL get_recent_errors()

With parameters:

RUN SKILL get_recent_errors WITH index_pattern = 'value', limit = 0, service = 'value'

Parameters

NameTypeDefaultDescription
index_patternSTRINGIndex pattern to search
limitINTMaximum number of errors to return
serviceSTRINGFilter by service name (optional)

Returns

ARRAY— An array of matching documents

Example

-- Using curl
curl -u elastic-admin:elastic-password http://localhost:9200/_escript \
  -H "Content-Type: application/json" \
  -d '{"query": "RUN SKILL get_recent_errors()"}'

-- Response
{
  "result": [...],
  "_meta": {
    "execution_id": "abc123",
    "duration_ms": 45
  }
}