homek8s/monitoring/controllers/home/kustomization.yaml
Sirius DevOps e4b1ac59a9 feat(osint): alert when the analyst stops writing briefs
The 2026-11-25..12-04 outage was invisible: deploy/osint-news-summarizer
stayed Running with restarts 0 and INFO batch lines while article_summaries
froze for nine days, and the scraper kept articles fresh (61.5k rows, newest
within minutes). The app has no /metrics endpoint, so add a small read-only
Postgres exporter and two Prometheus rules.

- osint-analyst-exporter (ns osint): stdlib HTTP server on :9187 serving
  osint_analyst_last_success_timestamp_seconds (max article_summaries.
  batch_timestamp), osint_ingest_last_article_timestamp_seconds (max
  articles.timestamp) and osint_analyst_exporter_up. Runs the pinned
  summarizer image (python3 + psycopg2), non-root, read-only rootfs,
  clusterIP Service + ServiceMonitor (release=kube-prometheus-stack).
- NetworkPolicy: one port-scoped ingress rule, monitoring -> :9187. Nothing
  else in monitoring can reach osint.
- monitoring/controllers/home/osint-analyst.yaml: OsintAnalystStale
  (>1h, 30m, warning, with an absent() arm so a dead exporter cannot read as
  healthy) and OsintIngestAliveButNoBrief (articles <2h old while summaries
  >2h old, 10m, warning). Both route through the default Telegram receiver.
2026-12-04 23:18:20 -05:00

43 lines
1.7 KiB
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: monitoring
resources:
- namespace.yaml
- repository.yaml
- release.yaml
- httproute.yaml
- gateway-probe.yaml
- garage.yaml
- prune-alerts.yaml
# Flow-loss gate + material-loss alerts for the Hubble sensor (audit F10).
- hubble-loss-gate.yaml
# Rosenpass unit-state + PSK-rotation alerts for Link A (rpi <-> siriussec).
# Series come from a host textfile exporter (infrastructure/networking/rosenpass/),
# so silently missing data is itself an alert.
- rosenpass.yaml
# Analyst freshness: OsintAnalystStale + OsintIngestAliveButNoBrief, built on
# the osint-analyst-exporter timestamps (card t_22334588).
- osint-analyst.yaml
# Nightly consistent sqlite snapshot of Grafana's dashboards/alerts/users.
- grafana-backup.yaml
# Egress lockdown for that backup pod: DNS + the backup host only, so no
# run-time package fetch (card t_9d0428d8).
- grafana-backup-networkpolicy.yaml
- dashboards
# Secrets, SOPS/age-encrypted in git (decrypted by the `monitoring`
# Kustomization; key = flux-system/sops-age). See docs/secrets-sops.md.
- secret-grafana-admin.sops.yaml
- secret-grafana-secret-key.sops.yaml
- secret-alertmanager-telegram.sops.yaml
- secret-cluster-backup-ssh.sops.yaml
# Registry pull credential for this namespace. Added because grafana-backup
# now runs an image from the in-cluster Forgejo registry instead of
# python:3.12-alpine from Docker Hub (card t_9d0428d8).
- secret-forgejo-pull.sops.yaml
configMapGenerator:
- name: kube-prometheus-stack-values
files:
- values.yaml=values.yaml
configurations:
- kustomizeconfig.yaml