Timelion split multiple times
Asked Answered
A

1

9

Is there any possibility to split multiple times in timelion?

Currently I use an expression like this:

.es(q='name:*jvm*', metric=avg:mean, split=name.keyword:10)
  .label(regex='.*whatever\.(.*) >.*', label=$1)

resulting in a timeseries diagram.

If I would like to add a second application, I'd just add another expression with an additional AND in the es query and split like this:

.es(q='name:*jvm* AND app:one', metric=avg:mean, split=name.keyword:10)
  .label(regex='.*whatever\.(.*) >.*', label='one-$1'),
.es(q='name:*jvm* AND app:two', metric=avg:mean, split=name.keyword:10)
  .label(regex='.*whatever\.(.*) >.*', label='two-$1')

Isn't it possible to do this in a single expression?

Auvergne answered 12/11, 2018 at 11:14 Comment(0)
F
7

you can apply split multiple times inside .es().

Try this:

.es(q='name:*jvm*', metric=avg:mean, split=app.keyword:10, split=name.keyword:10)
  .label(regex='.*whatever\.(.*) >.*', label='$1-$2')
Fingerbreadth answered 6/6, 2019 at 12:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.