I am trying to set up grafana alloy to send oracle logs to my loki server. My loki server is connected to Grafana so i can view the logs. the Loki server is just an on-prem server not in a docker or Kubernetes. my loki is running on rocky linux and seems to be working properly as i can send windows logs to it and it works fine.
The error i am getting in my alloy journalctl is listed below:
Apr 23 20:33:23 alloy[605148]: ts=2025-04-24T00:33:23.027630019Z level=error msg=“final error sending batch” component_path=/ component_id=loki.write.grafana_loki3 com>
I have no labels configures and not sure if i need any or really how i can do that. Sorry i’m new to alloy. My alloy config looks like this:
logging {
level = "debug"
format = "logfmt"
}
livedebugging {
enabled = true
}
local.file_match "local_files" {
path_targets = [{__path__ = "/u01/app/oracle/diag/rdbms/ftxe02/FTXE02/trace/alert_FTXE02.log"}]
// sync_period = "5s"
}
local.file_match "local_files2" {
path_targets = [{__path__ = "/u01/app/oracle/diag/rdbms/ftae02/FTAE02/trace/alert_FTAE02.log"}]
// sync_period = "5s"
}
local.file_match "local_files3" {
path_targets = [{__path__ = "/u01/app/oracle/diag/tnslsnr/ltdora01/listener/alert/log.xml"}]
// sync_period = "5s"
}
loki.source.file "log_scrape" {
targets = local.file_match.local_files.targets
forward_to = [loki.write.grafana_loki3.receiver]
// tail_from_end = true
}
loki.source.file "log_scrape2" {
targets = local.file_match.local_files2.targets
forward_to = [loki.write.grafana_loki3.receiver]
// tail_from_end = true
}
loki.source.file "log_scrape3" {
targets = local.file_match.local_files3.targets
forward_to = [loki.write.grafana_loki3.receiver]
// tail_from_end = true
}
loki.write "grafana_loki3" {
endpoint {
url = "http://<ip_of_loki_server>:3100/api/v1/push"
}
}
I even tried adding loki.write “grafana_loki” and loki.write “grafana_loki2” then mapping the corrosponding loki.source.file to the correct loki.write
I was getting a 404 page not found so i removed it and kept with 1 loki.write.
Any help on this would be greatly appreciated as i have been spending way too much time trying to figure this out. Thanks