-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path10_basic.yml
90 lines (81 loc) · 1.72 KB
/
10_basic.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
requires:
serverless: false
stack: true
---
setup:
- do:
indices.put_index_template:
name: my-template
body:
index_patterns: [logs-*]
template:
mappings:
properties:
'@timestamp':
type: date
data_stream: {}
- do:
indices.create_data_stream:
name: logs-foobar
- is_true: acknowledged
---
teardown:
- do:
indices.delete_data_stream:
name: logs-foobar
---
'ILM':
- do:
ilm.put_lifecycle:
policy: "my_lifecycle"
body: |
{
"policy": {
"phases": {
"warm": {
"min_age": "1000s",
"actions": {
"forcemerge": {
"max_num_segments": 10000
}
}
},
"hot": {
"min_age": "1000s",
"actions": { }
}
}
}
}
- is_true: acknowledged
- do:
indices.reload_search_analyzers:
index: logs-foobar
- length: { reload_details: 1}
- do:
ilm.get_lifecycle:
policy: "my_lifecycle"
- match: { my_lifecycle.version: 1 }
- do:
ilm.explain_lifecycle:
index: logs-foobar
- is_true: 'indices'
- do:
ilm.get_status:
policy: "my_lifecycle"
- is_true: 'operation_mode'
- do:
ilm.start: {}
- is_true: 'acknowledged'
- do:
ilm.stop: {}
- is_false: 'dry_run'
- do:
ilm.remove_policy:
index: logs-foobar
- is_false: 'has_failures'
- do:
ilm.delete_lifecycle:
policy: "my_lifecycle"
- is_true: acknowledged