Reference

Reference

Both tables on this page are generated from source at build time — ENV_SPEC in api/src/env.ts and the route registrations in api/src/index.ts. They cannot drift.

Environment variables

VariableDefaultPurpose
DATABASE_URLpostgres://localhost/relionautPostgreSQL 连接串
REDIS_URLredis://localhost:6379Redis 连接串(限流)
GLM_API_KEY—LLM key(诊断必需;不配则仅采集/查询/告警可用)
GLM_BASE_URLhttps://open.bigmodel.cn/api/anthropic任意 Anthropic 兼容端点
GLM_MODELglm-4.6模型 id
GLM_PRICE_IN_MTOK—输入价格 USD/百万 token(与 OUT 同给才折算成本)
GLM_PRICE_OUT_MTOK—输出价格 USD/百万 token
MAX_STEPS10单次调查最大 ReAct 步数
RATE_LIMIT60/60API 限流 count/window 秒
ALERT_INTERVAL60告警规则评估周期(秒)
AUTO_DIAGNOSE1告警触发后自动调查
TYPESAFE_API_KEY—TypeSafe 智能分诊 key(不配则跳过)

Adding a variable means adding one ENV_SPEC entry in api/src/env.ts — a CI check fails any pull request that reads process.env directly anywhere else, and the site rebuilds from the same object the runtime uses.

API surface

MethodPathPurpose
POST/api/alerts/evaluate手动触发一次规则评估
GET/api/alerts/history告警历史
GET/api/alerts/rules告警规则查看
PATCH/api/alerts/rules/:name单条告警规则编辑
GET/api/health健康检查(PG/Redis/LLM 配置状态)
GET/api/incidents事件列表
POST/api/incidents创建事件
GET/api/incidents/:id事件详情(轨迹+时间线)
PATCH/api/incidents/:id事件流转(open→investigating→mitigated→resolved)
POST/api/incidents/:id/chatAgent 诊断(SSE 流事件)
POST/api/incidents/:id/distill把一次诊断蒸馏为可复用 lesson
GET/api/logs日志查询(容器/级别/关键字/时间)
GET/api/metrics指标序列查询
GET/api/metrics/names可用指标名清单
GET/api/statsDashboard 汇总(活跃事件/错误日志/P95/宿主负载)
GET/api/tracestrace 列表
GET/api/traces/:traceId单 trace 瀑布
POST/api/triageTypeSafe 智能分诊(未配 key 跳过)

Route documentation lives in docs/web/docs/reference.api.tsv (one line per route); the build fails if a route is registered without a doc line, or documented without being registered.