elasticsearch-analysis

Analyze Elasticsearch/OpenSearch logs to identify incident root causes.

654|77|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/incidentfox/incidentfox --skill elasticsearch-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elasticsearch-analysis
Source: https://github.com/incidentfox/incidentfox/tree/main/sre-agent/.claude/skills/observability-elasticsearch
Command: npx skills add https://github.com/incidentfox/incidentfox --skill elasticsearch-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, and includes scripts (resource) components.

What problem does it solve?

Elasticsearch/OpenSearch log analysis is needed to quickly identify root causes of incidents by searching, aggregating, and discovering patterns across large log streams.

Core Features & Use Cases

  • Lucene query syntax support for efficient log exploration
  • Elasticsearch JSON Query DSL for precise aggregations and boolean queries
  • Use Case: Investigate a spike in errors across services by identifying top sources and patterns

Quick Start

Use the included Python scripts to perform a fast analysis:

  • Run: python .claude/skills/observability-elasticsearch/scripts/get_statistics.py --time-range 60
  • Run: python .claude/skills/observability-elasticsearch/scripts/sample_logs.py --strategy errors_only --time-range 60

Frequently Asked Questions about elasticsearch-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze Elasticsearch logs to find incident root causes?

You can analyze Elasticsearch logs to find incident root causes by running Python scripts that build time-bounded queries, perform aggregations, and sample log patterns. This skill identifies top error sources and discovers patterns across large log streams.

Can I use Lucene query syntax and Elasticsearch JSON DSL together for log investigation?

Yes, you can use Lucene query syntax for efficient log exploration and Elasticsearch JSON DSL for precise aggregations and boolean queries. Both query methods are supported to generate statistics, samples, and patterns across your ELK or OpenSearch stack.

What's the best way to investigate a spike in errors across services using OpenSearch?

The best way to investigate an error spike in OpenSearch is to run statistics and sampling scripts that aggregate logs within a specific time range. This identifies top error sources and extracts patterns to pinpoint the incident root cause quickly.

Does this log analysis approach work with both ELK and OpenSearch stacks?

Yes, this log analysis approach works across both ELK and OpenSearch stacks. It uses a proxy-enabled HTTP client to query your cluster, supporting Lucene syntax and JSON DSL to discover incident patterns regardless of your specific stack implementation.

How do I sample logs from the last hour to identify error patterns?

You can sample logs from the last hour by running the provided Python script with a 60-minute time range parameter. The script uses an errors-only sampling strategy to filter and extract relevant log entries for root cause analysis.

Do I need Python and httpx installed to run Elasticsearch log analysis scripts?

Yes, you need Python and the httpx dependency installed to run the log analysis scripts. The scripts use httpx as a proxy-enabled HTTP client to communicate with your Elasticsearch or OpenSearch cluster and retrieve log data.