Get Hostname and IP to Loki vía Alloy

Hey! I’m trying to send the /var/log/* logs of a machine to Loki vía Alloy, but I can’t seem to make it work with the hostname and the IP being sent. This is the config I’m using. Any help would be appreciated!

local.file_match “logs” {
path_targets = [
{path = “/var/log/*”},
]
}

loki.source.file “tmpfiles” {
targets = local.file_match.logs.targets
forward_to = [loki.relabel.default.receiver]
}

loki.relabel “default” {
forward_to = [loki.write.local.receiver]

rule {
source_labels = [“hostname”]
target_label = “hostname”
}

rule {
source_labels = [“__syslog_connection_ip_address”]
target_label = “address”
}
}

loki.write “local” {
endpoint {
url = “http://loki_instance:3100/loki/api/v1/push”
}
}

Can you see the labels in alloy:port/metrics?
Is there anything in debug log?