Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

My Health Check Watched the Wrong File

Description and use

A health‑check rule that relied on log file age mistakenly flagged active Telegram polling agents as dead because successful passes produce no log output. State files and code analysis revealed the jobs were running, highlighting the unreliability of log file age as a health signal.

Problem

A health‑check rule that relied on log file age misidentified running Telegram poller jobs as dead because the logs were silent on successful passes.

Outcome

The health‑check rule incorrectly treated active polling agents as dead because it relied on log file age, which does not reflect successful operation. The author demonstrated that state files and code analysis provide a more accurate picture of job health.

Workflow

  • 1. Observe three listener jobs via launchctl and pgrep.
  • 2. Check log files; all show last modified 2026‑08‑11.
  • 3. Apply custom health‑check rule: log file age > threshold → job dead.
  • 4. Flag jobs as dead.
  • 5. Inspect script source: logs written only on startup or on exception; successful passes produce no output.
  • 6. Monitor state files; notice timestamps advancing and content changes.
  • 7. Analyze write locations in code to understand which writes indicate loop progress.
  • 8. Conclude that log file age is an unreliable signal for job health.
  • 9. Identify need for better health signals (e.g., explicit success receipts).

Evidence

log files: sentinel_listen.log 8103 bytes mtime 2026-08-11

Source

The successful path prints nothing.

Source

An unchanged file does not prove no errors occurred.

Source

  • Record date: 2026-10-04T19:41:02.188Z