8a795142026-05-11tick 4: fire-and-forget classify on new rows (5min per-process rate limit, env-var disable, server single-flight)
c57181c2026-05-11tick 3: launchd plist-driven .err.log tailing (97 com.steve.* jobs watched, refresh every 10min, 200 cap, 100MB skip)
495181c2026-05-11tick 2: heartbeat log every 10 quiet cycles, skip self in pm2 scan
f20012e2026-05-11initial scaffold — pm2 + launchd failure collector for CNCP (tick 1: data only, no classifier)
Authors
Steve15
Agents used
none detected
Skills used
/cncp-failure-collector2
/failures2
Creative ideas + design notes
Commits with substantial prose (≥120 chars) — the rationale behind each move.
bba7324 · 2026-05-29 · fix(collector): bump execSync maxBuffer to prevent pm2 jlist ENOBUFS death
The mac2 collector died 2026-05-15 11:37 in a 'pm2 jlist failed: spawnSync
/bin/sh ENOBUFS' spiral — pm2 jlist output exceeded execSync's 1MB default
maxBuffer on a busy box, so readPm2() threw every cycle and the process
exited (never resurrected, froze the CNCP mac2 failure ledger for 14 days).
Set maxBuffer 64MB on pm2 jlist and 16MB on the log-tail call.
064993f · 2026-05-11 · tick 9: cross-platform — also runs on Kamatera, host-tagged failures
Changes:
- COLLECTOR_HOST env var added (default os.hostname()); all POSTs include host field
- IS_LINUX flag added; buildLaunchdWatchlist() bails on Linux
- scanLinuxLogs() new — tails LINUX_LOG_PATHS (nginx error log + syslog by default),
posts only on meaningful lines (error|fatal|crit|emerg|alert|panic|segfault)
- install-kamatera.sh — idempotent installer for the Kamatera box (CNCP_URL
points at Mac2 over Tailscale 100.65.187.120; CNCP-reachable preflight)
- ecosystem.config.js: COLLECTOR_HOST='mac2'
- README untouched
Verified end-to-end 2026-05-11:
Mac2 pm2/cncp-failure-collector host=mac2 → http://127.0.0.1:3333
Kamatera pm2/cncp-failure-collector host=kamatera → http://100.65.187.120:3333 (tailnet)
Both visible in CNCP /api/failures with distinct host tags; dedup keyed on host
+ source + processName so cross-machine same-name failures don't collide.
File tree
7 files tracked. Click any to browse the source at HEAD.