1

I have multiple series for stats.counters.app.view.isbn.fetch.found.{yes,no}.$service. I want to calculate the failure rate per $service.

  • #A reduceSeries(mapSeries(group(#B, #C), 0), 'asPercent', 1, 'none', 'total')
  • #B aliasSub(groupByNode(stats.counters.app.view.isbn.fetch.found.*.*.rate, 8, "sumSeries"), "^(.*)$", "\1.total")
  • #C aliasSub(groupByNode(stats.counters.app.view.isbn.fetch.found.no.*.rate, 8, "sumSeries"), "^(.*)$", "\1.none")

However, this results in an error. From all possible variants I tried, this one feels the most correct, but it still fails.

kelunik
  • 203
  • 2
  • 13

1 Answers1

3

I think I got it. It can be solved using groupByNode.

  • #A groupByNode(group(#B, #C), 0, 'asPercent')
  • #B aliasSub(groupByNode(stats.counters.app.view.isbn.fetch.found.yes.*.rate, 8, "sumSeries"), "^(.*)$", "\1.yes")
  • #C aliasSub(groupByNode(stats.counters.app.view.isbn.fetch.found.no.*.rate, 8, "sumSeries"), "^(.*)$", "\1.no")
kelunik
  • 203
  • 2
  • 13