-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdownsample.yml
67 lines (66 loc) · 1.84 KB
/
downsample.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
requires:
serverless: false
stack: true
---
setup:
- do:
indices.create:
index: downsample_index
body:
settings:
number_of_shards: 1
number_of_replicas: 0
index:
mode: time_series
routing_path: [ metricset, k8s.pod.uid ]
time_series:
start_time: "2021-04-28T00:00:00Z"
end_time: "2021-04-29T00:00:00Z"
mappings:
properties:
"@timestamp":
type: date
metricset:
type: keyword
time_series_dimension: true
k8s:
properties:
pod:
properties:
uid:
type: keyword
time_series_dimension: true
network:
properties:
tx:
type: long
time_series_metric: gauge
rx:
type: long
time_series_metric: gauge
sent:
type: long
time_series_metric: counter
received:
type: long
time_series_metric: counter
# Make the downsample downsample_index index read-only
- do:
indices.put_settings:
index: downsample_index
body:
index.blocks.write: true
---
teardown:
- do:
indices.delete:
index: downsample_index
---
'indices.downsample':
- do:
indices.downsample:
index: downsample_index
target_index: target
body: { "fixed_interval": "1h" }
- is_true: acknowledged