log-aggregation

Configure centralized log aggregation pipelines using ELK, Loki, or CloudWatch.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill log-aggregation-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: log-aggregation
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/02-devops-infra/log-aggregation
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill log-aggregation-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Scattered, unstructured logs across services make incident debugging slow and painful. This Skill designs a centralized log aggregation pipeline so engineers can search, correlate, and alert on logs from all services in one place. ## Core Features & Use Cases - Structured Logging Setup: Generates JSON log formatters with standard fields like trace_id, request_id, and service for consistent cross-service correlation. - Shipper & Pipeline Configuration: Produces Filebeat, Vector, and Promtail configurations for collecting, parsing, and routing logs from hosts, Docker containers, and Kubernetes pods. - Retention & Alerting: Creates Elasticsearch index templates, ILM retention policies, Loki storage configs, and alert rules for error spikes and anomalies. - Use Case: A platform team running microservices on Kubernetes needs 90-day log retention with error-spike alerts to PagerDuty; this Skill outputs the full Loki or ELK configuration to achieve it. ## Quick Start Ask the AI to design a centralized log aggregation pipeline for your Kubernetes services using Loki and Grafana with 90-day retention and error alerting.

Frequently Asked Questions about log-aggregation

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

FAQPage Schema
How do I set up centralized log aggregation for microservices?

Standardize all services on structured JSON logs with common fields like trace_id and service, then deploy shippers such as Filebeat or Vector to forward logs to Elasticsearch or Loki. Configure index templates, retention policies, and alerts on error rates.

ELK Stack vs Loki for log aggregation, which should I choose?

ELK with Elasticsearch offers full-text search and rich indexing but costs more storage and memory. Loki with Grafana is Kubernetes-native, indexes only labels, and stores chunks in S3, making it cheaper for high-volume workloads.

How do I ship Kubernetes pod logs to Elasticsearch?

Run Filebeat as a DaemonSet reading /var/log/pods with the container parser and add_kubernetes_metadata processor to enrich events with pod and namespace labels. Alternatively, use Vector with the kubernetes_logs transform for the same enrichment.

How do I set log retention policies in Elasticsearch?

Define an ILM policy with hot, warm, cold, and delete phases, for example rollover at 50GB, shrink after 2 days, freeze after 30 days, and delete after 90 days. Attach the policy to your index template so all matching indices inherit it.

Why are my logs not appearing in Elasticsearch?

Common causes include misconfigured shipper output hosts, JSON parsing failures that silently drop events, or index template mismatches. Monitor the pipeline itself by alerting on shipper errors, dropped events, and queue lag.

What fields should structured JSON logs include?

Include timestamp, level, service, environment, message, trace_id, request_id, and user_id as standard fields across all services. Never log PII such as passwords, tokens, or credit card numbers, and keep DEBUG level out of production.