Find a file
Katie Kloss 0ed90c1d56
Some checks failed
/ build-image (push) Failing after 35s
/ build-binary (amd64, freebsd) (push) Successful in 3m6s
/ build-binary (amd64, darwin) (push) Successful in 1m43s
/ build-binary (amd64, linux) (push) Successful in 1m42s
/ build-binary (arm64, darwin) (push) Successful in 2m10s
/ build-binary (arm64, freebsd) (push) Successful in 1m12s
/ build-binary (arm64, linux) (push) Successful in 3m1s
ci: add build matrix for other OSes/arches.
2025-11-16 07:52:26 -05:00
.buildkite Fix buildkite build. 2018-08-21 10:33:31 -05:00
.forgejo/workflows ci: add build matrix for other OSes/arches. 2025-11-16 07:52:26 -05:00
deploy Update allocation_follower.json.tpl 2018-04-10 16:29:48 -05:00
.gitignore cleanup code. 2018-03-14 19:29:45 -05:00
allocationFollower.go fix(allocationFollower): actually, just use an env variable. 2025-11-12 18:58:08 -05:00
build.sh Add better logging to nomad follower and try resetting log pipeline periodically. Add buildkite support 2018-08-21 10:28:25 -05:00
Containerfile build: update container to run as non-root. 2025-11-14 20:47:37 -05:00
followedAllocation.go Add task group to save file key to prevent collisions. 2019-10-14 14:14:18 +00:00
followedTask.go Fix issue with panic in recovering savepoint. 2019-10-15 15:33:45 +00:00
go.mod build: fix module name. 2025-11-12 18:29:15 -05:00
go.sum chore: migrate from vendor/ to a module 2025-11-12 18:03:48 -05:00
LICENSE Initial commit 2018-03-13 08:34:14 -05:00
logger.go Move logging code into a separate file. 2019-10-13 16:25:06 +00:00
README.md Update README.md 2018-04-27 13:08:30 -05:00
service.go Add retries to setup + change output chan responsibility. 2019-10-21 13:14:31 +00:00
vaultTokenBackend.go Handle dead letters by nesting in followers output logs. 2019-10-13 16:20:39 +00:00

nomad_follower

Log forwarder for aggregating allocation logs from nomad worker agents.

Running the application

Run the application on each worker in a nomad cluster. nomad_follower will follow all allocations on the worker and tail the allocation logs to the aggregate log file.

docker pull devopsintralox/nomad_follower:latest

docker run -v log_folder:/log -e LOG_FILE="/logs/nomad-forwarder.log" devopsintralox/nomad_follower:latest

nomad_follower will stop following completed allocations and will start following new allocations as they become available.

nomad_follower can be deployed with nomad in a system task group along with a log collector. The aggregate log file can then be shared with the log collector by writing the aggregate log file into the shared allocation folder.

nomad_follower formats log entries as json formatted logs. It will convert string formatted logs to json formatted logs by passing the log entry in the message key.

nomad_follower adds a service_name key that contains the listed service names for a task.

Using nomad_follower prevents the cluster operator from having to run a log collector in every task group for every task on a worker while still allowing nomad to handle the logs for each allocation.