CluPilotCloud/app/Services
nexxo c1e81808a7 feat(traffic): meter the monthly allowance, show it, throttle instead of blocking
Customers can now see what they have used and what is left, and the service
slows down rather than stopping when the allowance is gone — a slow Nextcloud
gets a top-up, a dead one gets a cancellation.

- instance_traffic keeps one row per instance per month. Proxmox counters are
  cumulative since the VM last started, so usage is the difference between two
  samples, and a counter that went backwards means a restart, not a refund.
- Outbound is what counts: inbound is free at our providers and egress is what
  Hetzner's 20 TB per server applies to.
- CollectInstanceTraffic samples every 15 minutes, warns once per threshold
  (80/95 %) rather than on every run, and at 100 % limits the VM's NIC via
  Proxmox — released again as soon as the customer tops up or the month rolls
  over.
- The dashboard gets a full-width band (it throttles the service, so it is not
  a tile among tiles) with the top-up offer right next to the warning.
- Bytes are formatted in SI units now: allowances are computed in SI, so
  dividing by 1024 made a 1000 GB plan read as "931 GB".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 23:33:47 +02:00
..
Dns feat(engine-b): 15-step customer pipeline + DNS/Traefik services 2026-07-25 11:50:26 +02:00
Maintenance fix(admin): catch racing ledger insert and re-fetch (idempotent under concurrency) 2026-07-25 16:31:43 +02:00
Monitoring feat(monitoring): Uptime Kuma support via a REST bridge + resilient monitoring policy 2026-07-25 20:04:58 +02:00
Proxmox feat(traffic): meter the monthly allowance, show it, throttle instead of blocking 2026-07-25 23:33:47 +02:00
Ssh fix(engine): long SSH command timeout; wg peer removal on privileged worker 2026-07-25 11:01:02 +02:00
Traefik fix(engine-b): write Traefik route to the serving host over SSH, not locally 2026-07-25 12:55:24 +02:00
Traffic feat(traffic): meter the monthly allowance, show it, throttle instead of blocking 2026-07-25 23:33:47 +02:00
Wireguard fix(vpn): give the QR code the specified four-module quiet zone 2026-07-25 22:40:54 +02:00