diff --git a/health.html b/health.html index df7f90c..dcc731f 100644 --- a/health.html +++ b/health.html @@ -7,217 +7,655 @@
-

TTS 服务监控

-
{{ healthData.service || 'Loading...' }} - {{ healthData.version || '' }}
-
- - 查看 Prometheus 指标 + {{ lastRefresh }}
{{ error }}
-
-
-
-
- - 服务状态 -
-
{{ healthData.status === 'ok' ? '正常运行' : '配置错误' }}
-
运行时长: {{ formatUptime(healthData.uptime) }}
-
- -
-
配置状态
-
- 环境变量 - - {{ healthData.config_status?.all_required_vars_set ? '已配置' : '未配置' }} - -
-
- 启动时间 - {{ healthData.start_time || '-' }} -
-
- 详细指标 - /metrics -
-
- -
-
内存使用
-
-
-
{{ formatBytes(healthData.memory?.heap_alloc) }}
-
Heap Alloc
-
-
-
{{ formatBytes(healthData.memory?.heap_inuse) }}
-
Heap Inuse
-
-
-
{{ healthData.memory?.goroutines || 0 }}
-
Goroutines
-
-
-
+
+
+
运行时长
+
{{ formatUptime(health.uptime) }}
+
启动于 {{ formatTime(health.start_time) }}
- -
-
指标预览 (Prometheus 文本格式)
- +
+
总请求数
+
{{ totalRequests }}
+
自启动以来
+
+
+
成功率
+
{{ successRate }}
+
{{ okRequests }} 成功 / {{ errRequests }} 失败
+
+
+
当前并发
+
{{ concurrencyActive }}
+
在飞请求数
+
+
+
Goroutines
+
{{ health.memory?.goroutines || 0 }}
+
Go 运行时
+
+
+
堆内存
+
{{ formatBytes(health.memory?.heap_alloc) }}
+
已分配 / 容量 {{ formatBytes(health.memory?.heap_inuse) }}
-
加载中...
+
+
请求 & 流量
+
+
+
+
+
请求数
+
tts_request_total · 按 status / format / speaker 拆分
+
+
+ + + + + + + + + + +
状态格式音色次数
{{ r.status }}{{ r.format }}-{{ r.speaker || "-" }}{{ r.value }}
+
暂无数据
+
+ +
+
+
+
端到端延迟
+
tts_request_duration_seconds · 50/95/99 百分位
+
+
+ + + + + + + + + + + +
状态格式p50p95p99
{{ r.status }}{{ r.format }}-{{ r.p50 }}{{ r.p95 }}{{ r.p99 }}
+
暂无数据
+
+
+
+ +
+
上游火山 API
+
+
+
+
+
上游调用
+
tts_upstream_total · 按 status / format 拆分
+
+
+ + + + + + + + + +
状态格式次数
{{ r.status }}{{ r.format }}-{{ r.value }}
+
暂无数据
+
+ +
+
+
+
首字节耗时 (TTFB)
+
tts_upstream_first_byte_seconds · 按格式拆分
+
+
+ + + + + + + + + + +
格式p50p95p99
{{ r.format }}{{ r.p50 }}{{ r.p95 }}{{ r.p99 }}
+
暂无数据
+
+ +
+
+
+
流量统计
+
chunks & 音频字节数
+
+
+ + + + + + + + + +
格式音频分片音频字节
{{ r.format }}{{ r.chunks }}{{ r.audioBytes }}
+
暂无数据
+
+ +
+
+
+
上游错误
+
tts_upstream_errors_total · 按错误码聚合
+
+
+ + + + + + + + +
错误码次数
{{ r.code }}{{ r.value }}
+
暂无错误
+
+
+
+ +
+
限流 & 计费
+
+
+
+
+
被拒请求
+
限流 / 并发 / 鉴权失败
+
+
+ + + + + + + + + + + + + + + +
tts_ratelimit_rejected_total{{ rateLimitRejected }}
tts_concurrency_rejected_total{{ concurrencyRejected }}
tts_auth_failed_total{{ authFailed }}
+
+ +
+
+
+
计费字符
+
tts_usage_text_words_total · 按模型拆分
+
+
+ + + + + + + + +
模型字符数
{{ r.model }}{{ r.value }}
+
暂无数据
+
+
+