Skip to content

feat(observability): register gandalf's ingest token (#1651) - #1693

Merged
Gerrrt merged 2 commits into
mainfrom
gerrrt/register-gandalf-token
Nov 23, 2026
Merged

Gerrrt merged 2 commits into
mainfrom
gerrrt/register-gandalf-token

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What changed

Registers gandalf's ingest token so its metrics-only agent (#1651, ADR-0126) can push through the ingest proxy. The four edits add-monitored-device.md First, the host's token asks for, all keyed INGEST_TOKEN_GANDALF (the hostname upper-cased, as deploy-agent.sh looks it up):

  • secrets/observability.sops.yaml: the token value (added with the age key).
  • stacks/observability/Caddyfile: "Bearer {$INGEST_TOKEN_GANDALF}" gandalf agent in the proxy's allowlist.
  • stacks/observability/compose.yaml: the caddy INGEST_TOKEN_GANDALF env guard.
  • scripts/render-config.sh COMPOSE_VARS and scripts/seed-validation-env.sh: the name and a throwaway validation value.

Why

The range host is metrics-only (logs.alloy is left off), but it still needs a token the proxy accepts, or every metric push gets a 401. It has to be in the repo, not just on the live host, because the monitoring host converges on main.

Refs #1651.

Blast radius

The monitoring host's ingest proxy only — one more accepted token. make up (or a converge) recreates the proxy with it. No other service changes.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • The credential lives in secrets/*.sops.yaml

Verification

  • make validate passes. Not run (no docker on this Mac). What ran:
    • python3 scripts/check_compose_vars.py: OK — the guard, the SOPS key and the seed all line up (52 guarded values).
    • python3 scripts/check_docs.py: docs OK.
    • ./scripts/lint.sh: yamllint, ruff, shellcheck, actionlint pass; ansible-lint fails on the known local runner error (no Ansible here); docker-only tools skipped.
  • Deployed to the lab and confirmed working. make up on the monitoring host, then the agent deploy, are the remaining Monitor gandalf now that it stays on #1651 steps.
  • Docs updated (the runbook already carries the deploy command)

🤖 Generated with Claude Code

Gerrrt and others added 2 commits November 23, 2026 12:44
…to follow)

The four non-secret edits add-monitored-device.md asks for, so gandalf's
metrics-only agent can push through the ingest proxy: the Caddyfile map line,
the caddy compose guard, and the COMPOSE_VARS/seed entries — all
INGEST_TOKEN_GANDALF (upper-cased, as deploy-agent.sh looks it up). The SOPS
secret INGEST_TOKEN_GANDALF is added separately with the age key; until it is,
check_compose_vars flags the guard, by design.

Refs #1651.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the ingest-token registration change, though full validation and deployment remain pending.

No open issues 🎉

What changed in this PR

Registers gandalf’s ingest token so its metrics-only agent can authenticate through the observability proxy, supporting the monitoring work in #1651.

Changes:

  • Adds the encrypted token and registers it in Caddy’s allowlist.
  • Wires INGEST_TOKEN_GANDALF through Compose, configuration rendering, and validation seed data.

Full validation and deployment remain pending.

File Description
stacks/​observability/​compose.yaml Requires and passes the token to Caddy.
stacks/​observability/​Caddyfile Accepts the token under the gandalf agent identity.
secrets/​observability.sops.yaml Stores the encrypted token and updates SOPS metadata.
scripts/​seed-validation-env.sh Supplies a placeholder token for validation.
scripts/​render-config.sh Includes the token in rendered Compose variables.

Review effort: Balanced

@Gerrrt
Gerrrt enabled auto-merge (squash) November 23, 2026 20:57
@Gerrrt
Gerrrt merged commit 9769260 into main Nov 23, 2026
10 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/register-gandalf-token branch November 23, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants