loki.relabel "journal" {
  forward_to = []

  rule {
    source_labels = ["__journal__systemd_unit"]
    target_label  = "unit"
  }
}

loki.source.journal "read"  {
  forward_to    = [loki.write.endpoint.receiver]
  relabel_rules = loki.relabel.journal.rules
  labels        = {component = "macmini"}
}

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