Skip to content

Commit

Permalink
Add states-inventory-processes index template definition (#401)
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-processes index

* Fix indentation issue in subset.yml

* Add process.tty as a custom field

* Update states-inventory-processes index template definition

* Remove events generators

* Remove duplicated code

* Remove hidden flag on index template

---------

Co-authored-by: Álex Ruiz <[email protected]>
  • Loading branch information
f-galland and AlexRuiz7 committed Sep 12, 2024
1 parent eb56fa8 commit 0eaca57
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ecs/states-inventory-processes/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-processes/fields/mapping-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dynamic": "strict",
"date_detection": false
}
42 changes: 42 additions & 0 deletions ecs/states-inventory-processes/fields/subset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: wazuh-states-inventory-processes
fields:
base:
fields:
"@timestamp": {}
tags: []
agent:
fields:
id: {}
groups: {}
process:
fields:
pid: {}
name: ""
parent:
fields:
pid: {}
command_line: ""
args: ""
user:
fields:
id: ""
real_user:
fields:
id: ""
saved_user:
fields:
id: ""
group:
fields:
id: ""
real_group:
fields:
id: ""
saved_group:
fields:
id: ""
start: {}
thread:
fields:
id: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"index_patterns": ["wazuh-states-inventory-processes*"],
"order": 1,
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0",
"refresh_interval": "5s",
"query.default_field": [
"agent.id",
"agent.groups",
"process.name",
"process.pid",
"process.command_line"
]
}
}
}
20 changes: 20 additions & 0 deletions ecs/states-inventory-processes/fields/template-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"index_patterns": ["wazuh-states-inventory-processes*"],
"priority": 1,
"template": {
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0",
"refresh_interval": "5s",
"query.default_field": [
"agent.id",
"agent.groups",
"process.name",
"process.pid",
"process.command_line"
]
}
}
}
}

0 comments on commit 0eaca57

Please sign in to comment.