Skip to content

Commit

Permalink
add mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
orestisfl committed Jan 8, 2025
1 parent a3a4261 commit c4eb0fa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"template": {
"mappings": {
"properties": {
"v": {
"type": "object",
"enabled": false
},
"updated_at": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
}
}
},
"_meta": {
"description": "default mappings for the agentless index template installed by x-pack",
"managed": true
},
"version": ${xpack.stack.template.version},
"deprecated": ${xpack.stack.template.deprecated}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"index_patterns": ["agentless-*-*"],
"priority": 100,
"composed_of": [
"agentless@mappings",
"agentless@settings"
],
"allow_auto_create": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public class StackTemplateRegistry extends IndexTemplateRegistry {
//////////////////////////////////////////////////////////
// Agentless components (for matching agentless-*-* indices)
//////////////////////////////////////////////////////////
public static final String AGENTLESS_MAPPINGS_COMPONENT_TEMPLATE_NAME = "agentless@mappings";
public static final String AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME = "agentless@settings";
public static final String AGENTLESS_INDEX_TEMPLATE_NAME = "agentless";

Expand Down Expand Up @@ -204,6 +205,13 @@ private Map<String, ComponentTemplate> loadComponentTemplateConfigs() {
TEMPLATE_VERSION_VARIABLE,
ADDITIONAL_TEMPLATE_VARIABLES
),
new IndexTemplateConfig(
AGENTLESS_MAPPINGS_COMPONENT_TEMPLATE_NAME,
"/[email protected]",
REGISTRY_VERSION,
TEMPLATE_VERSION_VARIABLE,
ADDITIONAL_TEMPLATE_VARIABLES
),
new IndexTemplateConfig(
AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME,
"/[email protected]",
Expand Down

0 comments on commit c4eb0fa

Please sign in to comment.