# Joining two metrics

**URL:** <https://discuss.prometheus.io/t/joining-two-metrics/2064>\
**Category:** PromQL\
**Created:** [December 19, 2023, 9:21am UTC](https://discuss.prometheus.io/t/joining-two-metrics/2064 "2023-12-19T09:21:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhilash1](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Abhilash1](https://discuss.prometheus.io/u/Abhilash1)\
**Post date:** [December 19, 2023, 9:21am UTC](https://discuss.prometheus.io/t/joining-two-metrics/2064/1 "2023-12-19T09:21:29Z")

</div>

Hello Team,  
I have been trying to join two metrics, But whenever I add an operator, I get no data. Could someone help me figure it out?

> topk(5, stddev(container\_memory\_usage{k8s\_cluster\_name=“lab”}) by (k8s\_container\_name)) \* on(k8s\_node\_name) group\_left(support\_level) k8s\_cluster\_metadata{}

---

<div class="post-metadata">

**Author:** ![lchopfpt](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/lchopfpt/32/970_2.png) [@lchopfpt](https://discuss.prometheus.io/u/lchopfpt)\
**Post date:** [May 24, 2024, 5:21pm UTC](https://discuss.prometheus.io/t/joining-two-metrics/2064/2 "2024-05-24T17:21:13Z")

</div>

Thought I might try to help.  
I like to break these down. If you run just the query on the right side of the ‘\*’ look to see which labels are provided. In order to join, the same label must exist on both sides. Does k8s\_node\_name appear in the label list when running the rightside query?

If it does, then do the same with the left side of the query (k8s\_cluster\_metadata{}). Does it include k8s\_node\_name?
