Agent SkillsAgent Skills
jeremylongshore

setting-up-log-aggregation

@jeremylongshore/setting-up-log-aggregation
jeremylongshore
2,103
284 forks
Updated 5/5/2026
View on GitHub

Execute use when setting up log aggregation solutions using ELK, Loki, or Splunk. Trigger with phrases like "setup log aggregation", "deploy ELK stack", "configure Loki", or "install Splunk". Generates production-ready configurations for data ingestion, processing, storage, and visualization with proper security and scalability.

Installation

$npx agent-skills-cli install @jeremylongshore/setting-up-log-aggregation
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Pathplugins/devops/log-aggregation-setup/skills/setting-up-log-aggregation/SKILL.md
Branchmain
Scoped Name@jeremylongshore/setting-up-log-aggregation

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: setting-up-log-aggregation description: 'Execute use when setting up log aggregation solutions using ELK, Loki, or Splunk. Trigger with phrases like "setup log aggregation", "deploy ELK stack", "configure Loki", or "install Splunk". Generates production-ready configurations for data ingestion, processing, storage, and visualization with proper security and scalability.

' allowed-tools: Read, Write, Edit, Grep, Glob, Bash(docker:), Bash(kubectl:) version: 1.0.0 author: Jeremy Longshore jeremy@intentsolutions.io license: MIT tags:

  • devops
  • deployment
  • security
  • scaling compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw

Setting Up Log Aggregation

Overview

Deploy centralized log aggregation platforms (ELK Stack, Grafana Loki, Splunk) with ingestion pipelines, structured parsing, retention policies, visualization dashboards, and alerting. Configure log shippers (Filebeat, Promtail, Fluentd) to collect from applications, containers, and system logs with proper security and scalability.

Prerequisites

  • Target infrastructure identified: Kubernetes, Docker Compose, or VMs
  • Storage requirements calculated: estimate daily log volume and multiply by retention period
  • Network connectivity between log sources and aggregation platform (typically ports 9200, 3100, 8088)
  • Authentication mechanism defined (LDAP, OAuth, API tokens, or basic auth)
  • Resource allocation planned: Elasticsearch needs significant heap memory (minimum 4GB per node)

Instructions

  1. Select the log aggregation platform: ELK for full-text search and complex queries, Loki for lightweight Kubernetes-native logging, Splunk for enterprise with advanced analytics
  2. Deploy the storage backend: Elasticsearch cluster, Loki with object storage (S3/GCS), or Splunk indexers
  3. Configure log shippers on sources: Filebeat for ELK, Promtail for Loki, Fluentd/Fluent Bit for multi-destination
  4. Define parsing rules: Logstash grok patterns for unstructured logs, JSON parsing for structured logs, multiline handling for stack traces
  5. Set retention policies: Index Lifecycle Management (ILM) for Elasticsearch, chunk retention for Loki, index rotation for Splunk
  6. Deploy visualization: Kibana dashboards for ELK, Grafana dashboards for Loki, Splunk Search for Splunk
  7. Configure alerting: define log-based alerts for error spikes, application exceptions, and security events
  8. Implement RBAC: restrict dashboard access and log visibility by team and environment
  9. Test the full pipeline: generate test logs, verify ingestion, confirm parsing, and validate dashboard display

Output

  • Docker Compose or Kubernetes manifests for the log aggregation stack
  • Log shipper configuration files (Filebeat YAML, Promtail config, Fluentd conf)
  • Parsing and field extraction rules (Logstash pipeline, grok patterns)
  • Retention policy configuration (ILM, lifecycle rules)
  • Dashboard JSON exports for Kibana or Grafana
  • Alert rule definitions for error rate monitoring

Error Handling

ErrorCauseSolution
Elasticsearch heap space exhaustedJVM heap too small for index volumeIncrease ES_JAVA_OPTS heap size (set to 50% of available RAM, max 32GB) or add nodes
Cannot connect to ElasticsearchNetwork issue or Elasticsearch not startedVerify Elasticsearch is running and healthy; check firewall rules and bind address
Failed to create indexDisk space full or index template misconfiguredCheck disk usage with df -h; review index template settings and shard allocation
Failed to parse log lineGrok pattern mismatch or unexpected log formatTest grok patterns with Kibana Grok Debugger; add fallback pattern for unmatched lines
Promtail: too many open filesSystem file descriptor limit too low for log tailingIncrease ulimit -n to 65536; reduce the number of watched paths

Examples

  • "Deploy an ELK stack on Docker Compose with Filebeat collecting Nginx and application logs, Logstash parsing with grok, and a Kibana dashboard for 5xx error monitoring."
  • "Set up Loki + Promtail on Kubernetes with 14-day retention, basic auth, and a Grafana dashboard showing logs per namespace."
  • "Configure Fluentd to ship logs from 20 application servers to both Elasticsearch (hot storage, 7 days) and S3 (cold storage, 1 year)."

Resources

More by jeremylongshore

View all
docker-compose-generator
2,103

generating-docker-compose-files: This skill enables Claude to generate Docker Compose configurations for multi-container applications. It leverages best practices for production-ready deployments, including defining services, networks, volumes, health checks, and resource limits. Claude should use this skill when the user requests a Docker Compose file, specifies application architecture involving multiple containers, or mentions needs for container orchestration, environment variables, or persistent data management in a Docker environment. Trigger terms include "docker-compose", "docker compose file", "multi-container", "container orchestration", "docker environment", "service definition", "volume management", "network configuration", "health checks", "resource limits", and ".env files".

environment-config-manager
2,103

managing-environment-configurations: This skill enables Claude to manage environment configurations and secrets across different deployments using the environment-config-manager plugin. It is invoked when the user needs to generate, update, or retrieve configuration settings for various environments (e.g., development, staging, production). Use this skill when the user explicitly mentions "environment configuration," "secrets management," "deployment configuration," or asks to "generate config files". It helps streamline DevOps workflows by providing production-ready configurations based on best practices.

fairdb-backup-manager
2,103

Automatically manages PostgreSQL backups with pgBackRest and Wasabi S3 storage when working with FairDB databases Activates when you request "fairdb backup manager" functionality.

git-commit-smart
2,103

generating-smart-commits: This skill generates conventional commit messages using AI analysis of staged Git changes. It automatically determines the commit type (feat, fix, docs, etc.), identifies breaking changes, and formats the message according to conventional commit standards. Use this when asked to create a commit message, write a Git commit, or when the user uses the `/commit-smart` or `/gc` command. It is especially useful after changes have been staged with `git add`.