From 710d9d4fecb2517c93095ee819ff9f7712368d15 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Tue, 21 Jul 2026 09:24:26 -0700 Subject: [PATCH] Agents push to Loki over the mesh IP, not host loopback A containerized Alloy agent can't reach the host's 127.0.0.1, so even the beta-local agent must push to beta's wg0 address (10.10.0.2:3100), not 127.0.0.1. Fix the beta example in the README and the agent compose header. --- README.md | 5 +++-- alloy/docker-compose.agent.yml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5841582..53c3878 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,9 @@ docker exec -u git forgejo admin auth add-oauth \ ```bash cd thermograph-observability/alloy -# beta pushes to local Loki; prod & desktop push over the mesh: -# beta: LOKI_URL=http://127.0.0.1:3100/loki/api/v1/push ALLOY_NODE=beta +# Every node (beta included) pushes to Loki over the mesh IP — a containerized +# agent can't reach the host's 127.0.0.1, but it can reach beta's wg0 address: +# beta: LOKI_URL=http://10.10.0.2:3100/loki/api/v1/push ALLOY_NODE=beta # prod: LOKI_URL=http://10.10.0.2:3100/loki/api/v1/push ALLOY_NODE=prod # desktop: LOKI_URL=http://10.10.0.2:3100/loki/api/v1/push ALLOY_NODE=dev ALLOY_NODE=prod LOKI_URL=http://10.10.0.2:3100/loki/api/v1/push \ diff --git a/alloy/docker-compose.agent.yml b/alloy/docker-compose.agent.yml index 9e3efdd..341f9ca 100644 --- a/alloy/docker-compose.agent.yml +++ b/alloy/docker-compose.agent.yml @@ -5,8 +5,8 @@ # Per-node config comes from the environment (an .env file next to this, or # exported before `up`): # ALLOY_NODE this node's label: prod | beta | dev -# LOKI_URL push endpoint. On beta: http://127.0.0.1:3100/loki/api/v1/push -# Elsewhere (over wg0): http://10.10.0.2:3100/loki/api/v1/push +# LOKI_URL push endpoint. All nodes push over the mesh: +# http://10.10.0.2:3100/loki/api/v1/push # # Deploy on a node: # ALLOY_NODE=prod LOKI_URL=http://10.10.0.2:3100/loki/api/v1/push \