You can only use relabel_config if you know prior to each scrape the extra labels you want to add.
If you want to combine labels from two different metrics, then create a PromQL query that does the join, and when you have that working, put it into a recording rule. You can find examples of the join here: https://www.robustperception.io/how-to-have-labels-for-machine-roles https://www.robustperception.io/exposing-the-software-version-to-prometheus https://www.robustperception.io/left-joins-in-promql https://prometheus.io/docs/prometheus/latest/querying/operators/#many-to-one-and-one-to-many-vector-matches -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/158a4bc4-907e-4711-8c04-8150a92ec3ado%40googlegroups.com.

