prometheus-configuration
它能做什么
这个工具可以帮你搭建 Prometheus,它是一个用来收集和监控基础设施与应用性能数据的系统。它能让你随时了解系统的运行情况,并在出现问题时及时收到提醒。
适用场景
- ✓当你需要开始监控你的系统时。
- ✓当你要配置如何收集性能数据时。
- ✓当你想创建规则,在出现问题时发出警告时。
技能链接
https://github.com/wshobson/agents/blob/main/plugins/observability-monitoring/skills/prometheus-configuration/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我设置 Prometheus,从我的 Web 服务器收集指标。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要提供想收集哪些数据、以及如何收集的信息。工具会把这些设置整理好,让 Prometheus 自动开始监控你的系统。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
- Use consistent naming for metrics (prefix_name_unit)
- Set appropriate scrape intervals (15-60s typical)
- Use recording rules for expensive queries
- Implement high availability (multiple Prometheus instances)
- Configure retention based on storage capacity
- Use relabeling for metric cleanup
- Monitor Prometheus itself
- Implement federation for large deployments
- Use Thanos/Cortex for long-term storage
- 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'
Related Skills
grafana-dashboards- For visualizationslo-implementation- For SLO monitoringdistributed-tracing- For request tracing
常见问题
什么是“指标”(metrics)?
指标就像系统的生命体征,用来衡量 CPU 使用率、内存占用、服务器接收的请求数量等内容。
什么是“抓取”(scraping)?
抓取是指 Prometheus 主动访问你的系统,收集它们上报的指标。
什么是“记录规则”和“告警规则”?
记录规则用于预先计算经常用到的指标。告警规则则定义了一些条件,一旦满足,就会触发警告。
详情
作者的原始描述
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.
repo: wshobson/agents
热度
- GitHub 星标
- 41k
- 排名
- #6742
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …