Repository navigation
feat(observability): register gandalf's ingest token (#1651) - #1693
Merged
Merged
Conversation
…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>
There was a problem hiding this comment.
🟢 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_GANDALFthrough 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Registers
gandalf's ingest token so its metrics-only agent (#1651, ADR-0126) can push through the ingest proxy. The four editsadd-monitored-device.mdFirst, the host's token asks for, all keyedINGEST_TOKEN_GANDALF(the hostname upper-cased, asdeploy-agent.shlooks it up):secrets/observability.sops.yaml: the token value (added with the age key).stacks/observability/Caddyfile:"Bearer {$INGEST_TOKEN_GANDALF}" gandalf agentin the proxy's allowlist.stacks/observability/compose.yaml: the caddyINGEST_TOKEN_GANDALFenv guard.scripts/render-config.shCOMPOSE_VARSandscripts/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.secrets/*.sops.yamlVerification
make validatepasses. 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.make upon the monitoring host, then the agent deploy, are the remaining Monitor gandalf now that it stays on #1651 steps.🤖 Generated with Claude Code