feat(osint): alert when the analyst stops writing briefs #90
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/osint-analyst-freshness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
deploy/osint-news-summarizerwrote noarticle_summariesrows from 2026-11-25 03:31 UTC to 2026-12-04 whilearticlesstayed fresh (61.5k rows, newest within minutes). Nothing noticed: container Running, restarts 0, log = INFO batch lines + INFO 404s. The nearest signal the cluster had (kube_deployment_status_replicas_available) is green for a wedged loop, so detection has to come from the data, not the pod.The app has no
/metrics(GET /metrics→ 404 onosint-app), so this adds a small read-only Postgres exporter.What
apps/base/osint/analyst-exporter.yaml— ConfigMap (stdlib HTTP server) + Deployment + Service + ServiceMonitor, namespaceosint,:9187/metrics:osint_analyst_last_success_timestamp_secondsmax(article_summaries.batch_timestamp)osint_ingest_last_article_timestamp_secondsmax(articles.timestamp)osint_analyst_exporter_upIt runs the already-pinned summarizer image (the only one here with python3 + psycopg2), so no new image build;
runAsNonRoot(uid 1000), read-only rootfs, dropped caps, 10m/64Mi. On a DB error it keeps the last good values and flipsupto 0, so the timestamps keep ageing instead of the series vanishing.osint_analyst_map_calls_total{status}is deliberately not added: map calls are not persisted anywhere and parsing them out of logs would be a second, fragile pipeline.apps/base/osint/networkpolicy.yaml— one port-scoped ingress rule,monitoring→9187. No other monitoring → osint path is opened.monitoring/controllers/home/osint-analyst.yaml—PrometheusRule, warning, default Telegram receiver:OsintAnalystStale:time() - osint_analyst_last_success_timestamp_seconds > 3600for 30m, plus anabsent()arm so a dead exporter/ServiceMonitor cannot read as healthy.OsintIngestAliveButNoBrief: summary age > 2h and newest article < 2h old, for 10m — the exact ingest-fine/analyst-dark shape.Verification
Pushed live after merge; firing + resolution evidence goes in the task completion note.