Files
FunctionalScaffold/monitoring/prometheus.yml
Roog (顾新培) 241cffebc2 main:重构指标系统并切换为 Redis 方案
变更内容:
- 重构指标系统实现,支持基于 Redis 的多实例指标管理。
- 替换原有的 Pushgateway 和 Redis Exporter 方案。
- 更新 Prometheus 配置,适配新的指标抓取方式。
- 添加 Redis 指标相关配置和告警规则文件。
- 更新 Dockerfile 和 docker-compose 文件,移除多余服务,精简配置。
- 编写 `metrics_unified.py` 模块及单元测试。
- 修复部分代码中的冗余和格式问题。
2026-02-02 13:30:28 +08:00

33 lines
799 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Prometheus 配置文件
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
cluster: 'functional-scaffold'
environment: 'development'
# 抓取配置
scrape_configs:
# 从应用实例抓取指标Redis 统一指标方案)
# 应用通过 /metrics 端点从 Redis 读取并导出 Prometheus 格式指标
- job_name: 'functional-scaffold'
static_configs:
- targets: ['app:8000']
metrics_path: '/metrics'
scrape_interval: 10s
# Prometheus 自身监控
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# 告警规则文件
rule_files:
- '/etc/prometheus/rules/*.yaml'
# Alertmanager 配置(可选)
# alerting:
# alertmanagers:
# - static_configs:
# - targets: ['alertmanager:9093']