Using median (percetiles 50) in timelion


(Alvaro del Castillo) #1

For getting the metric average time series in timelion, it is pretty easy:

.es(metric='avg:time_to_close_days')

which is equivalent to:

 "aggs": {
        "1": {
          "avg": {
            "field": "time_to_close_days"
          }
        }
      }

but howto get the median of a metric, which must be equivalent to:

 "aggs": {
        "1": {
          "percentiles": {
            "field": "time_to_close_days",
            "percents": [
              50
            ],
            "keyed": false
          }
        }
      }

(Alvaro del Castillo) #2

(system) #3