Set up Prometheus for comprehensive metric collection

Prometheus configuration

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

Prometheus configuration cover

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.

---
name: prometheus-configuration
description: 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.
---

# 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

Overview

Complete guide to Prometheus setup, metric collection, scrape configuration, and recording rules.

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill prometheus-configuration -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/observability-monitoring/skills/prometheus-configuration
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/8e99828fa6f9759ab8d8/prometheus-configuration.zip" -OutFile "$env:TEMP\prometheus-configuration.zip"; Expand-Archive "$env:TEMP\prometheus-configuration.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md1.8 KB
  • references/1 file · 8.3 KB
Read the files here
wshobson/4236bb92 files
SKILL.md
Show the full text65 lines

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:

curl http://localhost:9090/api/v1/targets

Check configuration:

curl http://localhost:9090/api/v1/status/config

Test query:

curl 'http://localhost:9090/api/v1/query?query=up'
  • grafana-dashboards - For visualization
  • slo-implementation - For SLO monitoring
  • distributed-tracing - For request tracing
1---
2name: prometheus-configuration
3description: 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.
4---
5 
6# Prometheus Configuration
7 
8Complete guide to Prometheus setup, metric collection, scrape configuration, and recording rules.
9 
10## Purpose
11 
12Configure Prometheus for comprehensive metric collection, alerting, and monitoring of infrastructure and applications.
13 
14## When to Use
15 
16- Set up Prometheus monitoring
17- Configure metric scraping
18- Create recording rules
19- Design alert rules
20- Implement service discovery
21 
22## Detailed patterns and worked examples
23 
24Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
25 
26## Best Practices
27 
281. **Use consistent naming** for metrics (prefix_name_unit)
292. **Set appropriate scrape intervals** (15-60s typical)
303. **Use recording rules** for expensive queries
314. **Implement high availability** (multiple Prometheus instances)
325. **Configure retention** based on storage capacity
336. **Use relabeling** for metric cleanup
347. **Monitor Prometheus itself**
358. **Implement federation** for large deployments
369. **Use Thanos/Cortex** for long-term storage
3710. **Document custom metrics**
38 
39## Troubleshooting
40 
41**Check scrape targets:**
42 
43```bash
44curl http://localhost:9090/api/v1/targets
45```
46 
47**Check configuration:**
48 
49```bash
50curl http://localhost:9090/api/v1/status/config
51```
52 
53**Test query:**
54 
55```bash
56curl 'http://localhost:9090/api/v1/query?query=up'
57```
58 
59 
60## Related Skills
61 
62- `grafana-dashboards` - For visualization
63- `slo-implementation` - For SLO monitoring
64- `distributed-tracing` - For request tracing
65 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
SkillDiagnose why a specific ad creative is winning or losingCreative performance analysisgmmh1/claude-paid-media-skills · by gmmh1Diagnose why a specific ad creative is winning or losing using the generalized hook-hold-click-convert funnel, applicable across any platform. Triggers on 'why is this ad underperforming', 'diagnose my creative', or 'where in the funnel is this ad failing'. Platform-agnostic diagnostic framework — platform-specific versions (meta-ads-creative-analytics) apply this with platform-native metrics.New listingPromptAct as a professional full-stack developer taskedProfessional Full-Stack Developer for Network Mapping & Monitoring Applicationf/prompts.chat · by Yohanes Farly RakinaungAct as a professional full-stack developer tasked with building a web application for mapping and monitoring networks using Mikrotik Netwatch API. Implement multi-user role-based management to handle devices, monitor their status, and manage user subscriptions.New listingSkillEstablishes a project's quality bar as a written contractConstraint driven developmentaddyosmani/agent-skills · by addyosmaniEstablishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.★ 98.7k GitHub starsSkillInstruments code so production behavior is visibleObservability and instrumentationaddyosmani/agent-skills · by addyosmaniInstruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.★ 98.7k GitHub starsSkillOptimizes application performance across frontend, backendPerformance optimizationaddyosmani/agent-skills · by addyosmaniOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.★ 98.7k GitHub starsSkillDiscovers and invokes agent skillsUsing agent skillsaddyosmani/agent-skills · by addyosmaniDiscovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of work at hand. This is the meta-skill that governs how all other skills are discovered and invoked.★ 98.7k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars