Skip to content

Commit

Permalink
Add states-inventory-packages index template definition (#399)
Browse files Browse the repository at this point in the history
* Add stateless index template definition

Event generator is pending

* Update to 8.11.0

* Adding template mappings and settings for states-inventory-packages index

* Fix indentation issue in subset.yml

* Remove event generators

* Remove duplicated code con ECS generator

* Add custom fields for states-inventory-packages

* Remove hidden flag on index template

---------

Co-authored-by: Álex Ruiz <[email protected]>
  • Loading branch information
f-galland and AlexRuiz7 authored Sep 12, 2024
1 parent 4f14474 commit eb56fa8
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ecs/states-inventory-packages/fields/custom/agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: agent
title: Wazuh Agents
short: Wazuh Inc. custom fields.
type: group
group: 2
fields:
- name: groups
type: keyword
level: custom
description: >
The groups the agent belongs to.
4 changes: 4 additions & 0 deletions ecs/states-inventory-packages/fields/mapping-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dynamic": "strict",
"date_detection": false
}
21 changes: 21 additions & 0 deletions ecs/states-inventory-packages/fields/subset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: wazuh-states-inventory-packages
fields:
base:
fields:
"@timestamp": {}
tags: []
agent:
fields:
id: {}
groups: {}
package:
fields:
architecture: ""
description: ""
installed: {}
name: ""
path: ""
size: {}
type: ""
version: ""
19 changes: 19 additions & 0 deletions ecs/states-inventory-packages/fields/template-settings-legacy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"index_patterns": ["wazuh-states-inventory-packages*"],
"order": 1,
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0",
"refresh_interval": "5s",
"query.default_field": [
"agent.id",
"agent.groups",
"package.architecture",
"package.name",
"package.version",
"package.type"
]
}
}
}
21 changes: 21 additions & 0 deletions ecs/states-inventory-packages/fields/template-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"index_patterns": ["wazuh-states-inventory-packages*"],
"priority": 1,
"template": {
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0",
"refresh_interval": "5s",
"query.default_field": [
"agent.id",
"agent.groups",
"package.architecture",
"package.name",
"package.version",
"package.type"
]
}
}
}
}

0 comments on commit eb56fa8

Please sign in to comment.