fix: LLM端点故障告警只数最终失败——hermes重试序列(attempt1/2的'API call failed'+'Retrying')不再计入(一次瞬时抖动=3条WARNING误报5次失败,09:54事件)
This commit is contained in:
@@ -1167,6 +1167,14 @@ def build_report():
|
|||||||
if _ts.timestamp() < _scan_cutoff:
|
if _ts.timestamp() < _scan_cutoff:
|
||||||
continue
|
continue
|
||||||
if any(_p in _line for _p in _LLM_ERR_PATTERNS):
|
if any(_p in _line for _p in _LLM_ERR_PATTERNS):
|
||||||
|
# 2026-08-25 只数最终失败:hermes 一次抖动打3条WARNING(attempt1/2/3),
|
||||||
|
# 重试成功不算故障——attempt 1/2 的"API call failed"和"Retrying"跳过
|
||||||
|
if "Retrying API call" in _line:
|
||||||
|
continue
|
||||||
|
import re as _re2
|
||||||
|
_att = _re2.search(r"attempt (\d+)/(\d+)", _line)
|
||||||
|
if _att and _att.group(1) != _att.group(2):
|
||||||
|
continue # 非最终次失败=重试中,跳过
|
||||||
_recent_errs.append({
|
_recent_errs.append({
|
||||||
"log": _lf.name, "time": _ts.strftime("%H:%M"),
|
"log": _lf.name, "time": _ts.strftime("%H:%M"),
|
||||||
"msg": _line[20:180],
|
"msg": _line[20:180],
|
||||||
|
|||||||
Reference in New Issue
Block a user