Grafana/Prometheus - Merging key-value pairs from 2 different metrics in a single table.

Can someone help with joining 2 different metrics in Grafana/Prometheus? (Like we do in SQL query join)

I have 2 different metrics. in the following syntax

MetricA{repo=“repo1”, build_num=“123", build_date=“29-oct-2019T16:30”, build_id=“321", event_type=“commit”, event_state=“pass"} <DATE like this 29102019>

MetricB{repo=“repo1”, build_num=“123", build_date=“29-oct-2019T16:30”, build_id=“321", event_type=“commit”, event_state=“pass"} <Build Number like this 579>

In both the metrics (from above), there is only 2 difference.

One is - different metric name

Second is - at the end, after the curly brace, MetricA has the date and MetricB has build_number.

Other values inside the curly braces are the same. I mean, both key, value pairs are the same on both the metrics.

I want to bring these key-values from 2 different metrics in a single table. By adding one column for each common key-value and bringing a date (from MetricA) and build_number (M=from MetricB) in 2 separate columns (but in the same table).

Any help is appreciated. Thanks in advance !!!

Hi @nimmoadam, I have run into a similar problem. Did you end up finding a solution? Thank you.

You can try table transformation I was able to plot results in a table from 2 different metrics.

.HTH