Skip to content

Commit a3a4261

Browse files
committed
Update index templates
1 parent 50431a9 commit a3a4261

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"template": {
3+
"settings": {
4+
"index": {
5+
"hidden": true,
6+
"number_of_shards": 1,
7+
"number_of_replicas": 1
8+
}
9+
}
10+
},
11+
"_meta": {
12+
"description": "default settings for the agentless index template installed by x-pack",
13+
"managed": true
14+
},
15+
"version": ${xpack.stack.template.version},
16+
"deprecated": ${xpack.stack.template.deprecated}
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"index_patterns": ["agentless-*-*"],
3+
"priority": 100,
4+
"composed_of": [
5+
"agentless@settings"
6+
],
7+
"allow_auto_create": true,
8+
"_meta": {
9+
"description": "default agentless template installed by x-pack",
10+
"managed": true
11+
},
12+
"version": ${xpack.stack.template.version},
13+
"deprecated": ${xpack.stack.template.deprecated}
14+
}

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ public class StackTemplateRegistry extends IndexTemplateRegistry {
9999
public static final String SYNTHETICS_ILM_POLICY_NAME = "synthetics@lifecycle";
100100
public static final String SYNTHETICS_INDEX_TEMPLATE_NAME = "synthetics";
101101

102+
//////////////////////////////////////////////////////////
103+
// Agentless components (for matching agentless-*-* indices)
104+
//////////////////////////////////////////////////////////
105+
public static final String AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME = "agentless@settings";
106+
public static final String AGENTLESS_INDEX_TEMPLATE_NAME = "agentless";
107+
102108
///////////////////////////////////
103109
// Kibana reporting template
104110
///////////////////////////////////
@@ -198,6 +204,13 @@ private Map<String, ComponentTemplate> loadComponentTemplateConfigs() {
198204
TEMPLATE_VERSION_VARIABLE,
199205
ADDITIONAL_TEMPLATE_VARIABLES
200206
),
207+
new IndexTemplateConfig(
208+
AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME,
209+
210+
REGISTRY_VERSION,
211+
TEMPLATE_VERSION_VARIABLE,
212+
ADDITIONAL_TEMPLATE_VARIABLES
213+
),
201214
new IndexTemplateConfig(
202215
KIBANA_REPORTING_COMPONENT_TEMPLATE_NAME,
203216
@@ -285,6 +298,13 @@ protected Map<String, ComponentTemplate> getComponentTemplateConfigs() {
285298
TEMPLATE_VERSION_VARIABLE,
286299
ADDITIONAL_TEMPLATE_VARIABLES
287300
),
301+
new IndexTemplateConfig(
302+
AGENTLESS_INDEX_TEMPLATE_NAME,
303+
304+
REGISTRY_VERSION,
305+
TEMPLATE_VERSION_VARIABLE,
306+
ADDITIONAL_TEMPLATE_VARIABLES
307+
),
288308
new IndexTemplateConfig(
289309
KIBANA_REPORTING_INDEX_TEMPLATE_NAME,
290310

0 commit comments

Comments
 (0)