configure-log-aggregation

configure-log-aggregation is a skill for Claude Code from pjt222/agent-almanac. It costs 86 tokens per session (3,661 once invoked), scanned A, original, MIT.

A guide to centralizing application and system logs with Loki and Promtail or the ELK stack. It covers collecting, parsing, labeling, searching, retaining, and correlating logs with metrics and traces.

In plain words
What is it for?
Use it to collect container or application logs, extract searchable fields, set retention policies, and compare log events with metrics or traces.
Why use it?
It makes logs from multiple services or machines searchable in one place during troubleshooting and incident analysis.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

Good fit Use it to collect container or application logs, extract searchable fields, set retention policies, and compare log events with metrics or traces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pjt222/agent-almanac/configure-log-aggregation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pjt222/agent-almanac --skill configure-log-aggregation
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for configure-log-aggregation

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/configure-log-aggregation/github.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/configure-log-aggregation)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/configure-log-aggregation"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/configure-log-aggregation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for configure-log-aggregation

Your own site · 80×15
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/configure-log-aggregation"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/configure-log-aggregation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,661 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 433
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00086 $0.03661
Opus 5 $0.00043 $0.01831
Sonnet 5 $0.00017 $0.00732
Haiku 4.5 $0.00009 $0.00366

Measured 6d ago against content hash 203271cfd37b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

configure-log-aggregation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Monitor Promtail metrics: `curl http://localhost:9080/metrics | grep promtail`
i18n/caveman-lite/skills/configure-log-aggregation/SKILL.md · 471 lines

How it starts

The opening of the file, as written. The whole thing — 471 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Configure Log Aggregation

Implement centralized log collection, parsing, and querying with Loki/Promtail or ELK stack for operational visibility.

When to Use

  • Consolidating logs from multiple services or hosts into a searchable system
  • Replacing local log files with centralized, queryable log storage
  • Correlating logs with metrics and traces for full observability
  • Implementing structured logging with label extraction from unstructured logs
  • Setting retention policies for log data based on storage and compliance needs
  • Troubleshooting production incidents requiring log analysis across services

Inputs

  • Required: Log sources (application logs, system logs, container logs)
  • Required: Log format patterns (JSON, plaintext, syslog, etc.)
  • Optional: Label extraction rules for structured querying
  • Optional: Retention and compression policies
  • Optional: Existing log shipper configuration (Fluentd, Filebeat, Promtail)

Procedure

See Extended Examples for complete configuration files and templates.

Step 1: Choose Log Aggregation Stack

Select between Loki (Prometheus-style) or ELK (Elasticsearch-based) based on requirements.

Loki advantages:

  • Lightweight, designed for Kubernetes and cloud-native environments
  • Label-based indexing (like Prometheus) for low storage overhead
  • Native integration with Grafana for unified dashboards
  • Horizontal scalability with object storage (S3, GCS)
  • Lower resource consumption compared to Elasticsearch

ELK advantages:

  • Full-text search across all log content (not only labels)
  • Rich query DSL and aggregations
  • Mature ecosystem with beats, logstash plugins
  • Better for compliance/audit logs requiring deep historical search

For this guide, we'll focus on Loki + Promtail (recommended for most modern setups).

Decision criteria:

Use Loki if:
- You want label-based queries similar to Prometheus
- Storage costs are a concern (Loki indexes only labels)
- You already use Grafana for metrics
- Kubernetes/container-native deployment

Use ELK if:
- You need full-text search across all log content
- You have complex log parsing and enrichment requirements
- You require advanced analytics and aggregations
- Legacy systems with existing Logstash pipelines

Read the full file on GitHub · 471 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 471 lines · 86 tokens per session scan A 203271cfd37b

Subscribe to this mod's changes

configure-log-aggregation is a skill published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed yesterday), licensed MIT. It adds 86 tokens to every session and 3,661 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

wrangler

Run or troubleshoot Wrangler CLI commands and configure Worker projects for local development, deployment, and Cloudflare resource management.

cloudflare/skills · 25 tokens

aws-cloudformation-ecs

Provides AWS CloudFormation patterns for ECS clusters, task definitions, services, container definitions, auto scaling, blue/green deployments, CodeDeploy integration, ALB integration, service discovery, monitoring, logging, template structure, parameters, outputs, and cross-stack references. Use when creating ECS…

giuseppe-trisciuoglio/developer-kit · 101 tokens

loom-kubernetes

Kubernetes deployment, cluster architecture, security, and operations.

cosmix/loom · 16 tokens

loom-karpenter

Kubernetes node autoscaling and cost optimization with Karpenter.

cosmix/loom · 18 tokens

northflank

Deploy, manage, and automate infrastructure on Northflank — a developer platform for building, deploying, and scaling services, jobs, databases, and release workflows on Kubernetes. Use when managing Northflank projects, services, jobs, addons (databases), secrets, domains, templates (IaC), environments, preview…

northflank/skills · 126 tokens

kubernetes

WHAT: Kubernetes manifest generation - Deployments, StatefulSets, CronJobs, Services, Ingresses, ConfigMaps, Secrets, and PVCs with production-grade security and health checks. WHEN: User needs to create K8s manifests, deploy containers, configure Services/Ingress, manage ConfigMaps/Secrets, set up persistent storage…

wpank/ai · 129 tokens