Repository navigation
Conversation
The worker AMI never installed concourse_logs.yaml: it was added inside the web-only branch of deploy.py, so vector on workers ran with host metrics and no log source. The spot-watch, lifecycle-hook, preflight and drain lines it was written to retain never left the instance, and the ASG churn diagnosis had to be reconstructed from CloudTrail. Plain-text lines (the helper scripts, the reaper, some concourse.service output) also landed without an environment field, because it was only set when .message parsed as JSON. Set it unconditionally, and record which node type emitted a line since both now share application=concourse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped, both node types supply the required environment variables, and no blocking issues were identified.
0 open findings
What changed in this PR
Enables Concourse worker journald logs to reach Loki, improving visibility into worker lifecycle events.
Changes:
- Installs the log configuration on both node types while keeping metrics web-only.
- Adds environment metadata to plain-text and JSON logs.
- Adds
node_applicationto distinguish web and worker logs.
| File | Description |
|---|---|
| src/bilder/images/concourse/templates/vector/concourse_logs.yaml | Applies metadata consistently and identifies the node type. |
| src/bilder/images/concourse/deploy.py | Installs the shared log configuration on workers and web nodes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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 are the relevant tickets?
N/A
Description (What does it do?)
Concourse worker AMIs never installed the vector journald config, so nothing logged on a worker reached Loki. That covers spot-watch, lifecycle-hook, preflight and the drain they invoke. The ASG churn behind #6412 had to be reconstructed from CloudTrail instead.
concourse_logs.yamlon both node types. It was only added inside the web-node branch ofdeploy.py.concourse_metrics.yamlstays web-only.environment(andlabels) on every line, not only on lines whose.messageparses as JSON. Plain-text lines (the helper scripts, the reaper, someconcourse.serviceoutput) shipped without it.node_application(concourse-web/concourse-worker, fromAPPLICATIONin/etc/default/vector). Both node types share theapplication="concourse"stream, so this field is what tells a web line from a worker line.Implementation details
Vector itself was already running on workers with credentials and
ENVIRONMENTresolved. The worker user data writes/etc/default/vector, and QA Mimir has vector host metrics labelledapplication="concourse-worker", environment="operations-qa". Only the log source was missing.The
include_unitsnames are correct as written: vector appends.serviceto a unit name that has no suffix. The helper scripts log viasystemd-cat, which attributes each line to the calling unit; the reaper on the web nodes uses the same pattern and its lines arrive. The drain script runs as a child of spot-watch and lifecycle-hook, so its lines land under those two units.Before this change,
sum by (unit) (count_over_time({application="concourse"} | json unit="_SYSTEMD_UNIT" [7d]))on QA (and[24h]on Production) returned onlyconcourse.serviceandconcourse-worker-reaper.service.How can this be tested?
vector validate --no-environmenton the new config andvector vrlagainst a plain-text event and a JSON event, both intimberio/vector:0.47.0-debian. Both events come out withenvironment,labelsandnode_applicationset.sum by (unit, env) (count_over_time({application="concourse"} | json unit="_SYSTEMD_UNIT", env="environment" [24h])). It should listconcourse-worker-spot-watch.service,concourse-worker-lifecycle-hook.serviceandconcourse-worker-preflight.service, each withenvset.Additional Context
Workers now also ship their own
concourse.servicelines. The existing INFO drop only applies to lines that parse as JSON, so plain-textlevel=infostderr from the worker (e.g. containerd) would pass through, all on one shared stream. That volume can't be measured before a worker runs this AMI. After the QA roll I'll check ingest split bynode_application, and add a plain-text filter if it's significant.🤖 Generated with Claude Code