跳到正文
Skillpedia
分析与电子表格41k · #6742

prometheus-configuration

它能做什么

这个工具可以帮你搭建 Prometheus,它是一个用来收集和监控基础设施与应用性能数据的系统。它能让你随时了解系统的运行情况,并在出现问题时及时收到提醒。

适用场景

  • ✓当你需要开始监控你的系统时。
  • ✓当你要配置如何收集性能数据时。
  • ✓当你想创建规则,在出现问题时发出警告时。

技能链接

https://github.com/wshobson/agents/blob/main/plugins/observability-monitoring/skills/prometheus-configuration/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/wshobson/agents/blob/main/plugins/observability-monitoring/skills/prometheus-configuration/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  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'

Related Skills

  • grafana-dashboards - For visualization
  • slo-implementation - For SLO monitoring
  • distributed-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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能