0

Technically, Prometheus doesn’t have the concept of joining series like SQL, for example, has. However, series can be combined in Prometheus by using an operator on them

Series A

sum(rate(rpc_request_duration_seconds_bucket{instance=~"10.43.1.244"}[1m]))

Series B

sum(rate(rpc_request_duration_seconds_bucket{instance=~"10.43.1.245"}[1m]))

What is the best way to Join these two series uning prometheous

anish
  • 6,884
  • 13
  • 74
  • 140
  • Does this answer your question? [How can I 'join' two metrics in a Prometheus query?](https://stackoverflow.com/questions/44461801/how-can-i-join-two-metrics-in-a-prometheus-query) – kaios Apr 15 '22 at 08:33

1 Answers1

1

These are the same metrics. Why would you use join? You can use aggregation sum like you did and filter using regex.

Something like this (I didn't test the regex)

sum(rate(rpc_request_duration_seconds_bucket{instance=~"10\.43\.1\.24[45]"}[1m]))
Sergio Santiago
  • 1,316
  • 1
  • 11
  • 19