log-aggregator-setup
Skill1 starsChanged 5 months agoApache-2.0View on GitHub
Sets up centralized log aggregation with structured logging, log levels, and alerting. Use when implementing observability in production systems.
In this repository58 other files it gives its agents.
- agent-chain-designerSkill
- api-wrapper-builderSkill
- embeddings-builderSkill
- evaluation-harnessSkill
- fine-tuning-preparerSkill
- llm-router-builderSkill
- ml-model-trainerSkill
- model-benchmarkerSkill
- prompt-engineerSkill
- rag-pipeline-builderSkill
- synthetic-data-generatorSkill
- vector-db-integratorSkill
- csv-processorSkill
- database-schema-designerSkill
- data-pipeline-builderSkill
- etl-workflow-designerSkill
- json-transformerSkill
- pandas-data-cleanerSkill
- report-generatorSkill
- sql-query-optimizerSkill
- time-series-analyzerSkill
- visualization-generatorSkill
- backup-strategySkill
- ci-cd-optimizerSkill
- docker-compose-generatorSkill
- github-actions-pipelineSkill
- kubernetes-deploymentSkill
- load-balancer-configSkill
- monitoring-dashboardSkill
- nginx-config-generatorSkill
- security-hardeningSkill
- ssl-certificate-managerSkill
- terraform-module-builderSkill
- api-security-auditorSkill
- compliance-checkerSkill
- dependency-checkerSkill
- incident-responderSkill
- jwt-security-auditorSkill
- owasp-checkerSkill
- penetration-test-plannerSkill
- secret-detectorSkill
- threat-model-designerSkill
- vulnerability-scannerSkill
- accessibility-auditorSkill
- api-route-builderSkill
- auth-flow-builderSkill
- css-animation-crafterSkill
- form-validatorSkill
- graphql-schema-designerSkill
- html-component-builderSkill
- nextjs-app-scaffoldSkill
- performance-auditorSkill
- pwa-setupSkill
- react-component-generatorSkill
- responsive-layout-systemSkill
- seo-optimizerSkill
- tailwind-design-systemSkill
- websocket-integrationSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Use a library that outputs JSON (pino for Node, structlog or logging with json formatter for Python, zap for Go).
- Distinctive: line 72
High cardinality labels: Avoid putting user IDs or request IDs in labels in Loki (use in message or indexed fields carefully).
- Distinctive: line 73
Sensitive data: Never log passwords, tokens, PII.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Establishes centralized, structured logging for production systems. Covers JSON log format, log level guidelines, shipping options (Fluentd, Promtail, Vector, Filebeat), storage backends (ELK, Loki + Grafana, CloudWatch, Datadog), retention policies, and basic alerting on error rate or anomaly patterns. Includes code examples for Node.js, Python, and Go.
When to Use This Skill
- Moving from local file logs or
console.logto a proper observability stack. - Debugging production issues that require historical logs.
- Meeting compliance or audit requirements.
Prerequisites
- Applications that can emit structured logs.
- A logging backend (self-hosted or SaaS).
- Network access from apps to the log shipper/collector.
Steps
- Adopt structured logging:
- Use a library that outputs JSON (pino for Node, structlog or logging with json formatter for Python, zap for Go).
- Include standard fields:
timestamp,level,message,service,trace_id,user_id(when available),error.
- Log level policy:
- ERROR: Something broke, needs attention.
- WARN: Degraded but recovered.
- INFO: Normal business events.
- DEBUG: Detailed for local/dev only (never in prod by default).
- Choose shipping architecture:
- Sidecar / DaemonSet (Promtail for Loki, Fluent Bit).
- Direct from app (for cloud providers).
- Agent on host.
- Storage & query:
- Loki + Grafana (lightweight, labels + LogQL).
- ELK (full text search, Kibana).
- Cloud native (CloudWatch Logs, GCP Logging).
- Retention & cost:
- Hot/warm/cold tiers.
- 30-90 days hot, longer in cold storage or S3.
- Alerting:
- High error rate (>1% or threshold).
- Sudden spike in logs (possible loop).
- Specific error strings (e.g., "OutOfMemory").
- Output:
- Structured logger config for 2-3 languages.
- Docker / Kubernetes log shipping config (Promtail example).
- Basic Grafana dashboard for logs + error rate.
- Retention and alert rule examples.
Examples
Pino logger setup for Node, structlog for Python, Promtail config for Kubernetes, and a simple Loki alert rule are included.
Edge Cases & Error Handling
- High cardinality labels: Avoid putting user IDs or request IDs in labels in Loki (use in message or indexed fields carefully).
- Sensitive data: Never log passwords, tokens, PII. Use log redaction middleware.
- Log volume explosion: Sample debug logs in prod or use dynamic levels.
Verification
- Deploy the logger + shipper.
- Generate traffic and errors.
- Query logs in the backend by service, level, trace_id.
- Confirm an alert fires on injected errors.
- Success: All services emit consistent JSON logs, they are queryable centrally, and critical errors are alerted.
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

