▍ investor-db · ETL Health Dashboard alert

即時查詢(live,每次 request 直接打 Postgres,非快照) · 自動 60s 刷新
generated at 2026-06-08 02:07:39 UTC / 2026-06-08 10:07:39 TW · DB 43.156.32.176:32306/zeabur

關鍵指標

整體狀態
alert
殭屍 job
2
日K 卡舊 ticker
629 < 4d
AV 每日呼叫 ≈
3 / 108,000 (0.0%)
validate 狀態
alert

① ETL 排程健康(live ingest_runs)

UTC台灣Job / Stage頻率來源 AV/run最後開始狀態耗時 關鍵計數近10成功率逾期
1號 01:00 1號 09:00 macro 總經/商品/指數 macro 每月 AV ~29 06-01 01:00 ok 20s failed=4 · observations=96,729 100% (3) ok 169h
1號 01:30 1號 09:30 etf_profile ETF 透視 etf_profile 每月 AV 25 06-01 01:30 ok 4s failed=10 100% (3) ok 169h
02:00 10:00 corporate_actions 股息/拆股 corporate_actions 每日 AV ~tickers×2 06-08 02:00 running 40% (10) overdue 137h
03:00 11:00 earnings_calendar 財報曆 earnings_calendar 每日 AV 1 06-07 03:00 ok 2s rows_upserted=4,014 · rows_fetched=6,577 · rows_matched=4,014 100% (10) ok 23h
04:00 12:00 13f_daily · discover_institutions discover_institutions 每日 SEC 0 06-07 04:00 ok 2831s failed=0 100% (10) ok 21h
04:00 12:00 13f_daily · download_13f (1/7 輪替) download_13f 每日 SEC 0 06-07 04:47 error 27579s 70% (10) overdue 45h
04:00 12:00 13f_daily · parse_13f parse_13f 每日 SEC 0 06-06 04:57 ok 6501s parsed=12,824 · holdings=3,126,035 · failed=0 70% (10) overdue 43h
04:00 12:00 13f_daily · compute_13f_changes compute_13f_changes 每日 DB 0 06-06 06:46 ok 12350s rows_updated=29,670,988 90% (10) overdue 40h
06:00 14:00 filing · discover discover 每日 SEC 0 06-07 06:00 error 23212s 50% (10) overdue 43h
06:00 14:00 filing · download download 每日 SEC 0 06-06 07:27 ok 1118s downloaded=4,456 · failed=0 50% (8) overdue 42h
06:00 14:00 filing · parse parse 每日 SEC 0 06-06 07:45 ok 382s parsed=4,456 · trades=7,290 · sections=2,950 · failed=0 50% (10) overdue 42h
07:00 15:00 financials 三表 financials 每日(事件驅動) SEC 0 06-07 13:39 ok 6s failed=0 · income_rows=21 · balance_rows=21 · cash_flow_rows=10 · companies=1 100% (10) ok 12h
09:00 17:00 prices_hourly_retention 小時K清理 prices_hourly_retention 每日 DB 0 no runs
10:00 18:00 prices_daily 日K prices_daily 每日 AV ~tickers 06-07 10:00 running 37% (8) overdue 117h
16:00 00:00 compute_overview 估值自算 compute_overview 每日 DB 0 06-07 16:00 ok 106s tickers=9,349 · loaded=9,349 · skipped=0 · failed=0 100% (3) ok 10h
18:00 02:00 validate 新鮮度+不變量+AV抽樣 validate 每日 AV = av_calls 06-07 18:00 ok 91s 100% (5) 8h
22:00 06:00 prices 小時K prices 每日 AV ~tickers 06-07 22:00 running 60% (10) overdue 97h
23:00 07:00 options 期權 EOD options 每日 AV ~symbols 06-07 23:00 running 70% (10) overdue 71h
週日 14:00 週一 22:00 overview 估值快照/市值 overview 每週 AV ~9,300 06-07 14:00 running 60% (5) ok 113h
週六 08:00 週六 16:00 r2_retention 原始檔清理 r2_retention 每週 R2 0 06-06 08:00 ok 506s deleted=83,304 100% (3) ok 42h
綠 = 最後一筆 ok 且未逾期;黃 = running、或非命脈 stage 逾期/error;紅 = 命脈 stage(prices_daily/download/parse/financials)逾期/error。逾期 = 距上次成功 > 該 stage 門檻(daily≈30h)。「—」= 該 stage 無逾期門檻。

② 資料新鮮度(live MAX(date) / 表)

Dataset最新資料日lag(天)門檻列數狀態
prices_daily prices_daily 2026-06-07 1 ≤ 4 15,290,735 ok
prices_hourly prices_hourly 2026-06-06 2 ≤ 5 1,936,080 ok
options_eod options_eod 2026-06-05 3 ≤ 5 2,942,901 ok
filings filings 2026-06-06 2 ≤ 4 1,152,674 ok
macro_series macro_series 2026-05-29 10 ≤ 45 144,974 ok
prices_daily 卡舊 ticker: 629 檔最新日K早於 4 天前。其中大部分是 Alpha Vantage 不報價的工具(共同/封閉式 基金、權證、特別股、帶 ./- 的 ticker)= 資料源限制,非 bug;只有少數才是當天真的沒更新到。

③ 驗證(latest validation_runs)

自評狀態
alert
run_at
06-07 18:00 UTC
tickers_sampled
1
av_calls
2
duration
90,589ms
anomalies
13
異常嚴重度類別細節
stage_ran:corporate_actions warn freshness max_hours=30 · hours_since_ok=129.0
stage_ran:discover warn freshness max_hours=30 · hours_since_ok=34.6
stage_ran:download alert freshness max_hours=30 · hours_since_ok=34.2
stage_ran:parse alert freshness max_hours=30 · hours_since_ok=34.1
stage_ran:prices_daily alert freshness max_hours=30 · hours_since_ok=108.4
stage_ran:prices warn freshness max_hours=30 · hours_since_ok=88.5
stage_ran:options warn freshness max_hours=30 · hours_since_ok=62.5
stage_ran:download_13f warn freshness max_hours=30 · hours_since_ok=37.0
stage_ran:parse_13f warn freshness max_hours=30 · hours_since_ok=35.2
stage_ran:compute_13f_changes warn freshness max_hours=30 · hours_since_ok=31.8
financials_future_period warn invariant count=11 · max_allowed=0
overview_coverage warn invariant coverage=0.0001 · universe=9349 · with_market_cap=1
stuck_running alert invariant stuck_gt_6h=1

④ Alpha Vantage 用量(估算)+ 殭屍偵測

估算 = 各 AV stage 最近 24h 最新一筆 run 的「呼叫次數」加總。corporate_actions 每 ticker ×2 (DIVIDENDS+SPLITS);validate 用 validation_runs.av_calls 精確值;其餘 ×1。 這是估算值(stage 被 timeout 砍掉、summary 未寫時計 0)。上限 75/min×60×24 = 108,000/day。
合計嚴重偏低:5 個全宇宙 AV stage 最近有跑、但 summary 未寫 (仍 running 或被 timeout 砍)→ 呼叫量以 0 計入。真實 AV 用量遠高於下表合計;這通常與下方殭屍偵測同時出現。
Stagecount×估算 calls佔每日上限視覺依據
corporate_actions 2 0 0.0%
summary 缺 tickers(stage 未完成 / 被砍)→ 估 0
prices_daily 1 0 0.0%
summary 缺 tickers(stage 未完成 / 被砍)→ 估 0
prices 1 0 0.0%
summary 缺 tickers(stage 未完成 / 被砍)→ 估 0
options 1 0 0.0%
summary 缺 symbols(stage 未完成 / 被砍)→ 估 0
overview 1 0 0.0%
summary 缺 tickers(stage 未完成 / 被砍)→ 估 0
earnings_calendar 1 1 0.0%
全市場單發(固定 1 call)
validate 2 1 2 0.0%
精確值(validation_runs.av_calls)
合計 3 0.0% 最近 24h 真的有跑的 AV stage 才計入

殭屍 job(status='running' 且 started_at > 7h 前)

2 個殭屍:子行程被 timeout/SIGKILL 砍掉,ingest_runs 沒翻成 ok/error,留下永遠 'running' 的列(下次 scheduler 開機 sweep 會清,但代表那次該 stage 沒跑完)。
Stagestarted_at (UTC)已卡多久
prices_daily 2026-06-07 10:00:01 16.1h
overview 2026-06-07 14:00:04 12.1h
investor-db · ETL Health Dashboard(live) · 此頁每次 request 即時查 Postgres,數字為當下狀態 · 自動 60s 刷新。
唯讀連線(default_transaction_read_only=on)。仿 etl_dashboard.html 的 Terminal Green 配色,但為即時版。