Host Variable not being passed from Alloy to Loki

Hi All,
Hoping you can help, this has been a day of frustration.

I have this relabel in my alloy config, i am getting the container variable. But for some reason i’m not seeing the hostname label appearing.

Any ideas what i am doing wrong please?

discovery.relabel “docker_scrape” {
targets = 


rule {
	source_labels = ["__meta_docker_container_name"]
	regex         = "/(.*)"
	target_label  = "container"
}
rule {
	source_labels = ["__journal__hostname"] 
	target_label  = "hostname"

}
}

You are trying to look for a labels that aren’t provided by the docker targets. Perhaps consider constants.hostname instead (see constants | Grafana Alloy documentation)