0

I have metrics that look like this:

myMetric{client="A",server="1",otherlabel="W"} 10
myMetric{client="A",server="2",otherlabel="X"} 21
myMetric{client="B",server="1",otherlabel="Y"} 32
myMetric{client="B",server="4",otherlabel="Z"} 43

I'm trying to find this data:

myMetric{client="A",servers="1,2"} 31
myMetric{client="B",servers="1,4"} 75

Is this even possible? The data's there, I just can't figure out how to write the query.

aayore
  • 663
  • 5
  • 12

1 Answers1

0

That's not possible, however:

sum without(server, otherLabel)(myMetric)

will give you that with just the client label.

brian-brazil
  • 31,678
  • 6
  • 93
  • 86
  • Thank you! I'm currently doing a `sum(myMetric) by (client)`, but then I'm not able to correlate the servers. :/ – aayore Nov 07 '18 at 15:59