Hi!
I try to organize a simple schema to transfer logs (only, without metrics!) from tomcat server to Loki+Grafana on Linux.
Initially I configured alloy to collect and send linux logs to Loki and it’s working normally.
After I tried to add section for Tomcat, but after sending first batch to Loki, it doesn’t send anymore. I don’t see any error in alloy log messages.
Only glue, that I could found, is position file is empty: “positions: {}”
I use slightly modified example from here.
local.file_match "logs_integrations_tomcat_linux" {
path_targets = [{
__address__ = "localhost",
__path__ = "/{var,opt,usr/local}/{log,*tomcat*}/{*custom*}/{*tomcat*,logs}/catalina.out",
instance = "server_name",
job = "integrations/tomcat",
}]
}
loki.source.file "logs_integrations_tomcat_linux" {
targets = local.file_match.logs_integrations_tomcat_linux.targets
forward_to = [loki.write.grafana_logs.receiver]
}
If someone could give an advice or at least say, where could I check more?