NestJS: disable incremental in 6 services tsconfig.json to fix dist not emitted when nest-cli deleteOutDir conflicts with tsc tsbuildinfo. classes/iam: import HealthModule in AppModule to fix /healthz 404. classes: rewrite HealthController to Drizzle getDb from TypeORM DI. teacher-bff: add /metrics endpoint for Prometheus scraping. infra: add node/mysql/redis exporters to observability profile. mysql-exporter v0.15.1 uses command-line flags not DATA_SOURCE_NAME. prometheus: enable web.enable-lifecycle for hot reload.
95 lines
2.3 KiB
YAML
95 lines
2.3 KiB
YAML
global:
|
||
scrape_interval: 15s
|
||
evaluation_interval: 15s
|
||
|
||
# 告警规则文件
|
||
rule_files:
|
||
- /etc/prometheus/rules.yml
|
||
|
||
# 告警管理器
|
||
alerting:
|
||
alertmanagers:
|
||
- static_configs:
|
||
- targets:
|
||
- alertmanager:9093
|
||
|
||
scrape_configs:
|
||
# ============================================================
|
||
# 应用服务(NestJS / FastAPI 暴露 /metrics)
|
||
# ============================================================
|
||
- job_name: 'classes-service'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3001']
|
||
labels:
|
||
service: classes
|
||
|
||
- job_name: 'iam-service'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3002']
|
||
labels:
|
||
service: iam
|
||
|
||
- job_name: 'teacher-bff'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3003']
|
||
labels:
|
||
service: teacher-bff
|
||
|
||
- job_name: 'core-edu-service'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3004']
|
||
labels:
|
||
service: core-edu
|
||
|
||
- job_name: 'content-service'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3005']
|
||
labels:
|
||
service: content
|
||
|
||
- job_name: 'data-ana-service'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3006']
|
||
labels:
|
||
service: data-ana
|
||
|
||
- job_name: 'msg-service'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3007']
|
||
labels:
|
||
service: msg
|
||
|
||
- job_name: 'ai-service'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:3008']
|
||
labels:
|
||
service: ai
|
||
|
||
# ============================================================
|
||
# 基础设施(docker-compose.minimal/minimal.override)
|
||
# ============================================================
|
||
- job_name: 'mysql'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:9104']
|
||
labels:
|
||
service: mysql
|
||
|
||
- job_name: 'redis'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:9121']
|
||
labels:
|
||
service: redis
|
||
|
||
# ============================================================
|
||
# 监控栈自身
|
||
# ============================================================
|
||
- job_name: 'prometheus'
|
||
static_configs:
|
||
- targets: ['localhost:9090']
|
||
|
||
- job_name: 'node-exporter'
|
||
static_configs:
|
||
- targets: ['host.docker.internal:9100']
|
||
labels:
|
||
service: node-exporter
|