forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquery.txt
44 lines (44 loc) · 920 Bytes
/
query.txt
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
GET /heartbeat-*/_search?size=0
{
"query": {
"match": {
"monitor.id": "localhost"
}
},
"aggs": {
"dateHist": {
"auto_date_histogram": {
"field": "@timestamp",
"buckets": 10
},
"aggs": {
"location": {
"terms": {
"field": "observer.geo.name",
"missing": "N/A"
},
"aggs": {
"css": {
"terms": {
"field": "monitor.continuous_status_segment",
"order": {"_key": "asc"}
},
"aggs": {
"up": {
"sum": {
"field": "summary.up"
}
},
"down": {
"sum": {
"field": "summary.down"
}
}
}
}
}
}
}
}
}
}