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?

Franz Ebner
  • 4,951
  • 3
  • 39
  • 57

1 Answers1

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')
samblake
  • 1,517
  • 3
  • 16
  • 33
axiom
  • 406
  • 1
  • 4
  • 16