loki.source.journal "system" {
  forward_to = [loki.write.default.receiver]
  labels = {
    job = "systemd-journal",
    host = "beepi",
  }
}

local.file_match "varlog" {
  path_targets = [{"__path__" = "/var/log/*.log", job = "varlog", host = "beepi"}]
}

loki.source.file "varlog" {
  targets    = local.file_match.varlog.targets
  forward_to = [loki.write.default.receiver]
}

loki.write "default" {
  endpoint {
    url = "http://loki:3100/loki/api/v1/push"
  }
}