# Prometheus Configuration > Set up Prometheus for comprehensive metric collection, storage, and monitoring of infrastructure and applications. Use when implementing metrics collection, setting up monitoring infrastructure, or configuring alerting systems. Source: https://skillsagentes.com/skills/wshobson/agents/prometheus-configuration Repository: https://github.com/wshobson/agents Author: wshobson License: MIT Updated: hace 2 meses Context cost: 57 tok installed, 449 tok once triggered, 2.6k tok with every bundled file Bundle: 2 files, 10 KB Permissions requested: none declared ## Install ```bash npx -y skills add wshobson/agents --skill prometheus-configuration --agent claude-code ``` ## What it does - Configura Prometheus para recolección de métricas, scrape configs, reglas de grabación y reglas de alertas - Aplica buenas prácticas de nomenclatura, retención, alta disponibilidad y federación - Guía la depuración de targets de scrape y configuración vía la API HTTP de Prometheus ## Use it when - Configurar monitoreo con Prometheus - Configurar el scraping de métricas - Crear reglas de grabación (recording rules) - Diseñar reglas de alerta o implementar service discovery ## What triggers it - "Ayúdame a configurar Prometheus para monitorear mis servicios" - "Necesito crear recording rules para consultas costosas" - "Configura el service discovery y las reglas de alerta en Prometheus" ## Before you install - Requiere acceso a una instancia de Prometheus (por defecto en localhost:9090) para consultar su API. - Needs on PATH: curl ## Files - SKILL.md — 2 KB - references/details.md — 8 KB ## SKILL.md Reproduced verbatim from wshobson/agents under MIT. This section is the upstream document and is in English. # Prometheus Configuration Complete guide to Prometheus setup, metric collection, scrape configuration, and recording rules. ## Purpose Configure Prometheus for comprehensive metric collection, alerting, and monitoring of infrastructure and applications. ## When to Use - Set up Prometheus monitoring - Configure metric scraping - Create recording rules - Design alert rules - Implement service discovery ## Detailed patterns and worked examples Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. ## Best Practices 1. **Use consistent naming** for metrics (prefix_name_unit) 2. **Set appropriate scrape intervals** (15-60s typical) 3. **Use recording rules** for expensive queries 4. **Implement high availability** (multiple Prometheus instances) 5. **Configure retention** based on storage capacity 6. **Use relabeling** for metric cleanup 7. **Monitor Prometheus itself** 8. **Implement federation** for large deployments 9. **Use Thanos/Cortex** for long-term storage 10. **Document custom metrics** ## Troubleshooting **Check scrape targets:** ```bash curl http://localhost:9090/api/v1/targets ``` **Check configuration:** ```bash curl http://localhost:9090/api/v1/status/config ``` **Test query:** ```bash curl 'http://localhost:9090/api/v1/query?query=up' ``` ## Related Skills - `grafana-dashboards` - For visualization - `slo-implementation` - For SLO monitoring - `distributed-tracing` - For request tracing --- Skills Agentes — https://skillsagentes.com/skills/wshobson/agents/prometheus-configuration