Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save bossjones/9cab029cb080e34ec30a706ab63fa319 to your computer and use it in GitHub Desktop.

Select an option

Save bossjones/9cab029cb080e34ec30a706ab63fa319 to your computer and use it in GitHub Desktop.
security_onion_elasticsearch_skill_claude_code.md

Perfect! I've successfully gathered all the research materials for creating your Elasticsearch debugging skill. Here's what I created:

πŸ“ Research Directory Created: elasticsearch-research/

Complete Structure (23 files total):

elasticsearch-research/ β”œβ”€β”€ README.md # Complete guide β”œβ”€β”€ scripts/ # 9 ES management scripts β”‚ β”œβ”€β”€ so-elasticsearch-troubleshoot # Primary diagnostic tool β”‚ β”œβ”€β”€ so-elasticsearch-query # API wrapper β”‚ β”œβ”€β”€ so-elasticsearch-retention-estimate # Capacity planning β”‚ β”œβ”€β”€ so-elasticsearch-indices-growth # Growth tracking β”‚ └── ... (5 more scripts) β”œβ”€β”€ config/ # 3 configuration files β”‚ β”œβ”€β”€ defaults-excerpt.yaml # Watermark thresholds β”‚ β”œβ”€β”€ elasticsearch-yaml-structure.md # Config documentation β”‚ └── curl-config-template.md # Auth patterns β”œβ”€β”€ workflows/ # 5 troubleshooting guides β”‚ β”œβ”€β”€ disk-watermark-breach.md # Most common issue β”‚ β”œβ”€β”€ unassigned-shards.md # Critical failures β”‚ β”œβ”€β”€ ilm-troubleshooting.md # Retention issues β”‚ β”œβ”€β”€ health-report-analysis.md # Cluster health β”‚ └── retention-planning.md # Capacity planning β”œβ”€β”€ api-reference/ # 2 API guides β”‚ β”œβ”€β”€ common-api-endpoints.md # ES API reference β”‚ └── curl-patterns.md # Authentication patterns └── reference/ # 3 reference files β”œβ”€β”€ file-locations.md # All file paths β”œβ”€β”€ common-error-patterns.md # Error meanings └── so-common-functions.md # Bash functions

🎯 What's Covered

Workflows (Most important for the skill):

  • βœ… Disk watermark breaches (80%/85%/90% thresholds)
  • βœ… Unassigned shard troubleshooting
  • βœ… ILM policy debugging
  • βœ… Health report interpretation
  • βœ… Retention planning and capacity management

Tools Referenced:

  • 9 critical SO Elasticsearch scripts with full source code
  • API endpoints with examples
  • Configuration structure and defaults

Documentation:

  • Error patterns and their meanings
  • File locations and paths
  • Common functions from so-common library

πŸš€ Next Step: Create the Skill

Run this command to create your skill:

/meta-claude:skill:create elasticsearch-troubleshoot ./elasticsearch-research ./skills

This will:

  1. Analyze all 23 research files
  2. Synthesize an interactive troubleshooting guide
  3. Generate a SKILL.md file with decision tree approach
  4. Save to ./skills/elasticsearch-troubleshoot/

πŸ’‘ Skill Design

The skill will provide:

Interactive Decision Tree: What issue are you experiencing?

  1. Cluster health is yellow or red
  2. Running out of disk space
  3. Indices not deleting
  4. Performance degradation
  5. General diagnostic check

Each path includes:

  • Detection commands (sudo so-elasticsearch-troubleshoot)
  • Output interpretation (what to look for)
  • Step-by-step resolution
  • Verification steps

πŸ“‹ Quick Start

  1. Review the materials (optional but recommended): cat elasticsearch-research/README.md
  2. Create the skill: /meta-claude:skill:create elasticsearch-troubleshoot ./elasticsearch-research ./skills
  3. Test it: /elasticsearch-troubleshoot

πŸŽ“ Key Highlights

  • Focuses on quick diagnostics (80% of common issues)
  • Uses existing SO tools (not raw API calls)
  • Step-by-step workflows for each issue type
  • Based on real script analysis (9 actual SO scripts)
  • Security Onion 2.4 specific (version 8.18.8 ES)

Everything is ready! The research directory contains comprehensive materials for creating a practical, usable Elasticsearch debugging skill. Check out elasticsearch-research/README.md for detailed guidance on creating and using the skill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment