Hello,
I know this can be done with TVSB:
TVSB Example:
But is it possible to add thresholds to Lens:
The reason I want to use Lens over TVSB is just that in the TVSB example it considers "/" as "empty"
Hello,
I know this can be done with TVSB:
TVSB Example:
But is it possible to add thresholds to Lens:
The reason I want to use Lens over TVSB is just that in the TVSB example it considers "/" as "empty"
There are 3 possible outcome to represent a chart with a threshold over it:
Let's go in order.
This is the simplest solution: create a chart and then add a reference line layer and configure the threshold.
Now let's see the other two options, who require a combination of a stack chart type and the definition of multiple metrics per layer
This hack leverages the stacked nature of the chart, and it applies the threshold at the metric level.
In the pic above it is possible to see the 2 metrics defined: one for the metric below and another above the threshold.
Both metric have a formula with an ifelse
but the 2nd and 3rd arguments are respectively swapped:
ifelse( metric() >= THRESHOLD, 0, metric() )
ifelse( metric() >= THRESHOLD, metric(), 0 )
For instance in the pic above this is the below formula: ifelse( count() >= 150, 0, count() )
This is an evolution from the version above, I've seen it used from @VinceDS , and this is a nice trick to visualize only the portion above the threshold.
This time formulas as slightly different from the ones above as it needs to subtract the threshold values from the metric one:
ifelse( metric() >= THRESHOLD, THRESHOLD, metric() - THRESHOLD)
ifelse( metric() >= THRESHOLD, metric() - THRESHOLD, 0 )
@Marco_Liberati TIL! That is awesome with the if else..
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.