It's probably something obvious but I don't seem to find a solution for joining 2 vectors in prometheus.
sum(
rabbitmq_queue_messages{queue=~".*"}
) by (queue)
*
on (queue) group_left max(
label_replace(
kube_deployment_labels{label_daemon_name!=""},
"queue",
"$1",
"label_daemon_queue_name",
"(.*)"
)
) by (deployment, queue)
Below a picture of the output of the two separate vectors.
Group left has the many on the left, so you've got the factors to the *
the wrong way around. Try it the other way.