My monitoring tool lied to me and secretly deleted all past data integrity issues
说明与用途
监控脚本错误地删除了所有未解决的数据缺口,导致历史记录丢失。修复后加入扫描范围检查,防止历史记录被误删。
问题
A custom monitoring script silently cleared unresolved data gaps, causing loss of historical issue records.
结果
The fix prevented silent deletion of unresolved data gaps, ensuring accurate monitoring and alerting.
工作流
- Scan each bot’s data store to list missing dates.
- Load unresolved_issues.json.
- Compare current missing dates with unresolved issues.
- If new missing dates exist, notify Slack and add to JSON.
- If a previously unresolved issue is not in current missing dates, check expected_first; if the issue date is newer than expected_first, consider it resolved; otherwise keep it.
- Save updated unresolved_issues.json.
- Run the script continuously.
- Monitor Slack notifications for anomalies.
- Implement fail‑safe logic to avoid clearing unresolved issues when scan range is uncertain.
证据
If an issue is in unresolved_issues.json but not found in the current scan, assume it's "resolved" and remove it from the list.
The monitoring tool now checks this expected_first. Only if an unresolved issue date in unresolved_issues.json is newer than expected_first does it consider it "resolved."
- 记录日期: 2026-09-05T17:14:55.096Z