Skip to content

Commit e359ffd

Browse files
committed
feat: add url.path as keyword and rollup index with rollover policy
1 parent 9746c61 commit e359ffd

File tree

4 files changed

+117
-5
lines changed

4 files changed

+117
-5
lines changed

workflow-cli/configuration-opensearch/ecs_nrm_1.0/url_aggregate.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
},
3434
"doc_values": true,
3535
"type": "wildcard"
36+
},
37+
"path": {
38+
"fields": {
39+
"keyword": {
40+
"ignore_above": 1024,
41+
"type": "keyword"
42+
}
43+
},
44+
"doc_values": true,
45+
"type": "wildcard"
3646
}
3747
}
3848
}

workflow-cli/configuration-opensearch/index_template/accessrollup.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,19 @@
1919
}
2020
}
2121
},
22-
"url_full_keyword": {
23-
"type": "keyword"
22+
"url_path_keyword": {
23+
"properties": {
24+
"terms": {
25+
"type": "keyword"
26+
}
27+
}
2428
},
2529
"url_domain": {
26-
"type": "keyword"
30+
"properties": {
31+
"terms": {
32+
"type": "keyword"
33+
}
34+
}
2735
},
2836
"event_outcome_count": {
2937
"type": "long"

workflow-cli/configuration-opensearch/state_management_policy/nrm-type-access-external-policy.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
},
6262
{
6363
"terms": {
64-
"source_field": "url.full.keyword",
65-
"target_field": "url_full_keyword"
64+
"source_field": "url.path.keyword",
65+
"target_field": "url_path_keyword"
6666
}
6767
},
6868
{
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"policy": {
3+
"policy_id": "nrm-type-accessrollup-rollover-policy",
4+
"description": "NRM access external accessrollup rollover policy",
5+
"schema_version": 1,
6+
"last_updated_time": 1628803063474,
7+
"error_notification": null,
8+
"default_state": "rollover",
9+
"states": [
10+
{
11+
"name": "rollover",
12+
"actions": [
13+
{
14+
"rollover": {
15+
"min_index_age": "1d"
16+
}
17+
}
18+
],
19+
"transitions": [
20+
{
21+
"state_name": "force_merge_standby",
22+
"conditions": {
23+
"min_index_age": "36d"
24+
}
25+
}
26+
]
27+
},
28+
{
29+
"name": "force_merge_standby",
30+
"actions": [],
31+
"transitions": [
32+
{
33+
"state_name": "force_merge",
34+
"conditions": {
35+
"cron": {
36+
"cron": {
37+
"expression": "* 19-23,0-6 * * *",
38+
"timezone": "America/Vancouver"
39+
}
40+
}
41+
}
42+
}
43+
]
44+
},
45+
{
46+
"name": "force_merge",
47+
"actions": [
48+
{
49+
"timeout": "12h",
50+
"retry": {
51+
"count": 60,
52+
"backoff": "exponential",
53+
"delay": "1m"
54+
},
55+
"force_merge": {
56+
"max_num_segments": 1
57+
}
58+
}
59+
],
60+
"transitions": [
61+
{
62+
"state_name": "warm",
63+
"conditions": {
64+
"min_index_age": "40d"
65+
}
66+
}
67+
]
68+
},
69+
{
70+
"name": "warm",
71+
"actions": [
72+
{
73+
"timeout": "12h",
74+
"retry": {
75+
"count": 60,
76+
"backoff": "exponential",
77+
"delay": "1m"
78+
},
79+
"warm_migration": {}
80+
}
81+
],
82+
"transitions": []
83+
}
84+
],
85+
"ism_template": [
86+
{
87+
"index_patterns": [
88+
"nrm-accessrollup-*"
89+
],
90+
"priority": 0
91+
}
92+
]
93+
}
94+
}

0 commit comments

Comments
 (0)