1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{% set aggs = aggs|default([]) -%}
{
"title": "duration",
"type": "line",
"listeners": {},
"params": {
"addLegend": true,
"shareYAxis": true,
"addTooltip": true,
"smoothLines": false,
"scale": "linear",
"interpolate": "linear",
"times": [],
"addTimeMarker": false,
"defaultYExtents": false,
"setYExtents": false,
"yAxis": {},
"mode": "stacked"
},
"aggs": [
{% for agg in aggs %}
{
"id": {{agg.id }},
"type": "avg",
"schema": "metric",
"params": {
"field": "{{agg.field}}"
}
},
{% endfor %}
{
"id": {{ aggs|length + 1 }},
"type": "date_histogram",
"schema": "segment",
"params": {
"field": "start_date",
"interval": "auto",
"customInterval": "2h",
"min_doc_count": 1,
"extended_bounds": {}
}
}
]
}
|