Thore CimbalandClaude Opus 5 9a106151f1 monitoring: a read error must not erase the CVE timeline (management #0082)
The exporter pruned first_seen on every scrape, keeping only what it had just
seen. A report that failed to parse - a file being written, a brief I/O error -
was skipped by a silent `continue`, so its findings never entered seen_keys and
their first-seen timestamps were deleted for good. Nothing reported it, and
"first seen" simply restarted at now.

Pruning is now limited to targets whose report was actually read this round.
Proven both ways against a throwaway results directory rather than by reasoning:
make one report unreadable and its entry survives while read_errors counts 1; fix
the other report but drop its finding and that entry is pruned as before. The
distinction is the point - the old behaviour was not too aggressive, it was
indiscriminate.

Two numbers now leave the exporter: trivy_reports_total and
trivy_report_read_errors, with alerts on both. They cover what TrivyScanStale
cannot reach by construction - a target that never produced a report has no series
for time() to compare against, so it stays quiet no matter how long it has been
broken.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 12:00:00 +00:00
2026-08-02 14:46:04 +02:00

threadnet-operating

Der Betriebs-/Monitoring-Stack für den Operating-Host CFGMON: Prometheus, Loki, Grafana, Alloy, Alertmanager und der CVE-Exporter — vollständig als Code, ein docker compose up -d stellt ihn auf einem frischen Host wieder her.

monitoring/README.md ist die eigentliche Betriebsanleitung (Deployment, Config-Fallen, Alerting, CVE-Pipeline).

Wo was liegt

Pfad Inhalt
monitoring/ der Stack: Compose, Prometheus, Loki, Grafana, Alertmanager, Alloy
monitoring/cve/ CVE-Exporter (Trivy-Scan → Prometheus-Metriken), ADR-0003
monitoring/grafana/ Datasources und Dashboards als Code

Offene Punkte

Kein Backlog in diesem Repo. Offene Punkte sind Issues im management-Projekt (ADR-0005) — sie betreffen meist mehrere Hosts, eine Liste je Repo würde auseinanderlaufen. Für diesen Stack einschlägig sind unter anderem #8 Remote-Write und Loki ohne Auth, #9 Grafana-Credentials und #10 Gitea-Backups off-host; Bestand und Historie zum Host stehen in hosts/cfgmon.md.

Kanonisch ist git.lab (ADR-0001, ADR-0002). Von außerhalb des Labs ist derselbe Stand über den Push-Mirror sorb/management lesbar — dorthin aber nie pushen, der Mirror überschreibt.

S
Description
No description provided
Readme
236 KiB
Languages
Python 94.2%
Shell 5.8%