Send logs from Alloy to Loki

I can’t get Alloy to send logs from my local windows machine to Grafana cloud. I have Alloy running and the Alloy tab in Grafana cloud says it’s connected but I don’t see any information when I create a Loki data source connection and attempt to query. The Alloy UI says everything is healthy, here is the Alloy config

local.file_match “local_files” {
path_targets = [{“path” = “/d/test/logs/*.log”}]
sync_period = “5s”
}

loki.source.file “log_scrape” {
targets = local.file_match.local_files.targets
forward_to = [loki.write.grafana_cloud_loki.receiver]
tail_from_end = true
}

loki.write “grafana_cloud_loki” {
endpoint {
url = “https://…grafana.net/loki/api/v1/push”

basic_auth {
  username = "..."
  password = "..."
}

}
}

I don’t use Windows personally, so I could be wrong, but I’d try changing your path to maybe something like this

local.file_match “local_files” {
  path_targets = [{“path” = “D:\\test\logs\*.log”}]
  sync_period = “5s”
}

Otherwise your configuration looks correct to me. Maybe also check Alloy logs and see if there is anything interesting in there.