fix(monitoring): admit only the services host to loki #828

Sammanfogat
supernaut sammanfogade 3 incheckningar från fix/loki-listener in i main 2026-10-19 22:53:41 +00:00
Ägare

Closes #732

Loki stays unauthenticated. Access is narrowed by network rules only.

  • Neutron SG: already admits only the services host /32 on 3100. No change.
  • nftables on the monitoring VM: 3100 was open to the whole subnet. Now only vault_services_host_private_ip.
  • Grafana reaches Loki over the container network, so it needs no rule.
  • Runbook documents the layers and how to verify.

Operator steps, in order:

  • (cd opentofu && tofu output -json private_ip | jq -r '.[0]')
  • ansible-vault edit group_vars/prod/vault.yml: add vault_services_host_private_ip with that value
  • ansible-playbook site.yml --check --diff --tags monitoring, review
  • Apply --tags monitoring (no tofu apply needed)
  • On the monitoring VM: sudo nft list table inet bitborg | grep 3100 shows the exact IP
  • Confirm ServicesHostLogsSilent does not fire and Grafana Explore still shows new logs
Closes #732 Loki stays unauthenticated. Access is narrowed by network rules only. - Neutron SG: already admits only the services host `/32` on 3100. No change. - nftables on the monitoring VM: 3100 was open to the whole subnet. Now only `vault_services_host_private_ip`. - Grafana reaches Loki over the container network, so it needs no rule. - Runbook documents the layers and how to verify. Operator steps, in order: - [ ] `(cd opentofu && tofu output -json private_ip | jq -r '.[0]')` - [ ] `ansible-vault edit group_vars/prod/vault.yml`: add `vault_services_host_private_ip` with that value - [ ] `ansible-playbook site.yml --check --diff --tags monitoring`, review - [ ] Apply `--tags monitoring` (no tofu apply needed) - [ ] On the monitoring VM: `sudo nft list table inet bitborg | grep 3100` shows the exact IP - [ ] Confirm `ServicesHostLogsSilent` does not fire and Grafana Explore still shows new logs
supernaut lade till 3 incheckningar 2026-10-19 19:10:31 +00:00
The SG already limits 3100 to the services host /32. nftables allowed
the whole subnet. Use the exact services host IP so both layers agree.
Grafana queries Loki over the container network and needs no rule.

Refs #732
An empty or placeholder vault_services_host_private_ip rendered an
invalid rule. Assert an IPv4 address before base runs, and make the
group var mandatory. Reword the nftables comment and rewrap the runbook.

Refs #732
fix(monitoring): correct the IPv4 regex escapes and nftables comment
Alla kontroller lyckades
ci / ci (pull_request) Successful in 9m42s
0ae048871f
Refs #732
supernaut sammanfogade incheckning c98adc7dc1 till main 2026-10-19 22:53:41 +00:00
supernaut tog bort grenen fix/loki-listener 2026-10-19 22:53:41 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!828
Ingen beskrivning angiven.