Back to Skills

setting-up-log-aggregation

jeremylongshore
Updated Today
16 views
712
74
712
View on GitHub
Metadesigndata

About

This skill helps developers set up log aggregation systems using ELK, Loki, or Splunk when triggered by commands like "deploy ELK stack" or "configure Loki." It generates production-ready configurations covering data ingestion, processing, storage, and visualization. The outputs include proper security and scalability considerations for the target infrastructure.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/jeremylongshore/claude-code-plugins-plus
Git CloneAlternative
git clone https://github.com/jeremylongshore/claude-code-plugins-plus.git ~/.claude/skills/setting-up-log-aggregation

Copy and paste this command in Claude Code to install this skill

Documentation

Prerequisites

Before using this skill, ensure:

  • Target infrastructure is identified (Kubernetes, Docker, VMs)
  • Storage requirements are calculated based on log volume
  • Network connectivity between log sources and aggregation platform
  • Authentication mechanism is defined (LDAP, OAuth, basic auth)
  • Resource allocation planned (CPU, memory, disk)

Instructions

  1. Select Platform: Choose ELK, Loki, Grafana Loki, or Splunk
  2. Configure Ingestion: Set up log shippers (Filebeat, Promtail, Fluentd)
  3. Define Storage: Configure retention policies and index lifecycle
  4. Set Up Processing: Create parsing rules and field extractions
  5. Deploy Visualization: Configure Kibana/Grafana dashboards
  6. Implement Security: Enable authentication, encryption, and RBAC
  7. Test Pipeline: Verify logs flow from sources to visualization

Output

ELK Stack (Docker Compose):

# {baseDir}/elk/docker-compose.yml
version: '3.8'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=true
    volumes:
      - es-data:/usr/share/elasticsearch/data
    ports:
      - "9200:9200"

  logstash:
    image: docker.elastic.co/logstash/logstash:8.11.0
    volumes:
      - ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf
    depends_on:
      - elasticsearch

  kibana:
    image: docker.elastic.co/kibana/kibana:8.11.0
    ports:
      - "5601:5601"
    depends_on:
      - elasticsearch

Loki Configuration:

# {baseDir}/loki/loki-config.yaml
auth_enabled: false

server:
  http_listen_port: 3100

ingester:
  lifecycler:
    ring:
      kvstore:
        store: inmemory
      replication_factor: 1
  chunk_idle_period: 5m
  chunk_retain_period: 30s

schema_config:
  configs:
    - from: 2024-01-01
      store: boltdb-shipper
      object_store: filesystem
      schema: v11
      index:
        prefix: index_
        period: 24h

Error Handling

Out of Memory

  • Error: "Elasticsearch heap space exhausted"
  • Solution: Increase heap size in elasticsearch.yml or add more nodes

Connection Refused

  • Error: "Cannot connect to Elasticsearch"
  • Solution: Verify network connectivity and firewall rules

Index Creation Failed

  • Error: "Failed to create index"
  • Solution: Check disk space and index template configuration

Log Parsing Errors

  • Error: "Failed to parse log line"
  • Solution: Review grok patterns or JSON parsing configuration

Resources

GitHub Repository

jeremylongshore/claude-code-plugins-plus
Path: plugins/devops/log-aggregation-setup/skills/log-aggregation-setup
aiautomationclaude-codedevopsmarketplacemcp

Related Skills

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

Algorithmic Art Generation

Meta

This skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.

View skill

webapp-testing

Testing

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

View skill

requesting-code-review

Design

This skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.

View skill