Alloy prometheus.exporter.unix labels

Hi!,
I am trying to move from node-exporter too Grafana alloy prometheus.exporter.unix.
I did a basic config and I see that Alloy get the same metrics as node-exporter but the lables seems be missing.
for example:
node-exporeter metric:

node_memory_Inactive_bytes{__tenant_id__="k8s",cluster="aks-xxx-xxx-xxx",container="node-exporter",endpoint="metrics",instance="xx.xx.xx.xx:9100",job="node-exporter",kubernetes_io_hostname="aks-xxx-34294780-vmss00000b",namespace="monitoring",node="aks-xxx-34294780-vmss00000b",pod="prometheus-node-exporter-gzzpb",service="prometheus-node-exporter"}

and the same metric from Alloy:

node_memory_Inactive_bytes{__tenant_id__="k8s",exporter="alloy_node_exporter_k8s",instance="aks-xx-xx-xxx-4c92bacf-cast000000",job="integrations/unix"}

My alloy.config:

prometheus.exporter.unix "k8s" {}

prometheus.scrape "k8s" {
    targets    = prometheus.exporter.unix.k8s.targets
    forward_to = [prometheus.remote_write.k8s.receiver]
}

prometheus.remote_write "k8s" {
  endpoint {
    url = "http://grafana-mimir-gateway/api/v1/push"
    headers = {
      "X-Scope-OrgID" = "k8s",
    }
  }
  external_labels = {"exporter" = "alloy_node_exporter_k8s"}
}

I attempted to use discovery.kubernetes and relabel with labelmap, but I couldn’t get the expected results.

How can I make prometheus.exporter.unix metrics in Alloy with Kubernetes metadata (e.g., node, namespace, pod, etc.), similar to what I was getting from node-exporter?

Any suggestions or working config examples would be greatly appreciated!

Thanks!

Hi. Have you seen this new documentation topic? Monitor Linux servers with Grafana Alloy | Grafana Alloy documentation This is a complete example using prometheus.exporter.unix