-
Notifications
You must be signed in to change notification settings - Fork 538
Closed
Labels
Description
What's wrong?
I'm trying to use Alloy to parse logs from Nomad allocations and forward them to Loki. Everything works at first, but then Alloy never picks up new log files as they are created.
Steps to reproduce
- Have a nomad client, running allocs.
- Deploy alloy with
local.file_matchto glob all of the log files - Wait for a new log file to be created, alloy does not pull log lines from the new file
System information
Ubuntu 22.04.2 LTS (GNU/Linux 6.2.0-1015-aws x86_64)
Software version
version v1.8.2 (branch: HEAD, revision: 48d0d88)
Configuration
local.file_match "nomad_logs" {
path_targets = [
{__path__ = "/var/lib/nomad/alloc/*/alloc/logs/*.stdout.*", __path_exclude__="/var/lib/nomad/alloc/**/*.fifo"},
{__path__ = "/var/lib/nomad/alloc/*/alloc/logs/*.stderr.*", __path_exclude__="/var/lib/nomad/alloc/**/*.fifo"},
]
}
loki.source.file "nomad_logs" {
targets = local.file_match.nomad_logs.targets
forward_to = [loki.write.loki_writer.receiver]
}
Logs
journalctl -u grafana-alloy -g "service-foo.stdout.65"
-- No entries --
Reactions are currently unavailable