Skip to content

Commit 3667d0a

Browse files
committed
add mappings
1 parent a3a4261 commit 3667d0a

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"template": {
3+
"mappings": {
4+
"properties": {
5+
"v": {
6+
"type": "object",
7+
"enabled": false
8+
},
9+
"updated_at": {
10+
"type": "date",
11+
"format": "strict_date_optional_time||epoch_millis"
12+
}
13+
}
14+
},
15+
"_meta": {
16+
"description": "default mappings for the synthetics index template installed by x-pack",
17+
"managed": true
18+
},
19+
"version": ${xpack.stack.template.version},
20+
"deprecated": ${xpack.stack.template.deprecated}
21+
}

x-pack/plugin/core/template-resources/src/main/resources/[email protected]

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"index_patterns": ["agentless-*-*"],
33
"priority": 100,
44
"composed_of": [
5+
"agentless@mappings",
56
"agentless@settings"
67
],
78
"allow_auto_create": true,

x-pack/plugin/stack/src/main/java/org/elasticsearch/xpack/stack/StackTemplateRegistry.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public class StackTemplateRegistry extends IndexTemplateRegistry {
102102
//////////////////////////////////////////////////////////
103103
// Agentless components (for matching agentless-*-* indices)
104104
//////////////////////////////////////////////////////////
105+
public static final String AGENTLESS_MAPPINGS_COMPONENT_TEMPLATE_NAME = "agentless@mappings";
105106
public static final String AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME = "agentless@settings";
106107
public static final String AGENTLESS_INDEX_TEMPLATE_NAME = "agentless";
107108

@@ -204,6 +205,13 @@ private Map<String, ComponentTemplate> loadComponentTemplateConfigs() {
204205
TEMPLATE_VERSION_VARIABLE,
205206
ADDITIONAL_TEMPLATE_VARIABLES
206207
),
208+
new IndexTemplateConfig(
209+
AGENTLESS_MAPPINGS_COMPONENT_TEMPLATE_NAME,
210+
211+
REGISTRY_VERSION,
212+
TEMPLATE_VERSION_VARIABLE,
213+
ADDITIONAL_TEMPLATE_VARIABLES
214+
),
207215
new IndexTemplateConfig(
208216
AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME,
209217

0 commit comments

Comments
 (0)