/polymath-observability:log-searchfrom polymath-observability
Run a typed, time-bounded log search against Elasticsearch — refuses unbounded scans, aggregates by trace id / status / route, returns a short evidence packet.
Ships in polymath-observability. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A bounded, defensible Elasticsearch query for incident or PRD investigation. Output is the matching log count, top buckets, and a 10-sample evidence packet — never a raw 10k-row dump.
Mode: deterministic — same inputs, same output. Follow the steps and the output shape exactly; compute with the named script or tool, never by estimate; add nothing the shape does not ask for.
MCP binding (read before any tool call): if your host has a
elasticMCP server, use its tools for this skill's data access. Check your own tool list — it may be registered under another name (a Claude Code connector appears asmcp__claude_ai_<Name>__*). Tool names differ between servers: use the closest match, and say so when the server is read-only. Never install or start a second copy. If there is none, work without MCP tool calls (give the user the queries or steps to run) and ask before suggesting an install.
trace.id.logs-prod-*. Refuse * (full-cluster scan).gte + lte ISO-8601 timestamps. Default now-1h only if no range provided AND --allow-default-range is set.service.name, http.response.status_code, trace.id).*, *-*, or anything with no leading namespace. Cluster-wide scans cost money and surface PII from unrelated indices.gte is required. Refuse "no time range" unless the caller explicitly opts in with --allow-default-range._search with track_total_hits=10000 (cap), size=10 (sample), and aggs for the requested buckets. Set terminate_after to cap shard-side work — and if it triggers (terminated_early: true), counts and buckets are partial: report them as lower bounds.took, total.value, total.relation. If relation = "gte", the count is approximate — surface honestly.@timestamp desc. Redact common PII fields (user.email, client.ip, http.request.headers.authorization) before printing.trace.id appears in hits, suggest joining against traces-* (Honeycomb / Tempo / OTLP indices) for the upstream trace.log-search
Index: logs-prod-refund-*
Time: 2026-05-23T14:00Z → 2026-05-23T14:30Z
Query: service.name:"refund-api" AND http.response.status_code >= 500
Took: 412ms
Matches: 2,041 (exact)
Top buckets
http.response.status_code:
502: 1,890
500: 134
504: 17
trace.id (top 5):
7a8b9c..: 412
1b2c3d..: 89
...
Sample (10 most recent)
@timestamp status trace.id message (redacted)
2026-05-23T14:29:58.412Z 502 7a8b9c "upstream timeout from refund-worker"
2026-05-23T14:29:57.110Z 502 7a8b9c "circuit-breaker open: refund-worker"
...
Cross-index hint:
Top trace.id 7a8b9c appears 412×; consider `traces-prod-*` lookup
via polymath-observability:trace-investigate.
*.index: '*' cluster-wide scans. Slow + cross-tenant PII risk.total.relation = "gte" as exact. The number is a lower bound when relation is gte.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-observability9 skills in this plugin
/author-monitorAuthor a Datadog monitor — query, threshold, evaluation window, no-data behavior, notification routing; pair with polymath-sre:slo-design for SLO burn-rate monitors./dashboard-snapshotCapture a Grafana dashboard snapshot for incident timelines + postmortem evidence — snapshot URL, time range pinned, variables resolved./logging-strategyDefine a service's logging strategy — structured JSON, level discipline, redaction, sampling for noisy paths, cost-aware retention.Other plugins' skills for the same job