-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the creation of the FIM index template and index (#58)
* Add index template to plugin * Create index template on plugin load * Remove hidden flag * Update states-fim index template --------- Signed-off-by: Álex Ruiz <[email protected]> Co-authored-by: Álex Ruiz <[email protected]>
- Loading branch information
Showing
2 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
plugins/wazuh-indexer-setup/src/main/resources/index-template-fim.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"index_patterns": [ | ||
"wazuh-states-fim*" | ||
], | ||
"mappings": { | ||
"date_detection": false, | ||
"dynamic": "strict", | ||
"properties": { | ||
"agent": { | ||
"properties": { | ||
"groups": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"id": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
"file": { | ||
"properties": { | ||
"attributes": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"gid": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"group": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"hash": { | ||
"properties": { | ||
"md5": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"sha1": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"sha256": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
"inode": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"mode": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"mtime": { | ||
"type": "date" | ||
}, | ||
"name": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"owner": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"path": { | ||
"fields": { | ||
"text": { | ||
"type": "match_only_text" | ||
} | ||
}, | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"size": { | ||
"type": "long" | ||
}, | ||
"target_path": { | ||
"fields": { | ||
"text": { | ||
"type": "match_only_text" | ||
} | ||
}, | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"type": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"uid": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
"registry": { | ||
"properties": { | ||
"key": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
}, | ||
"value": { | ||
"ignore_above": 1024, | ||
"type": "keyword" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"order": 1, | ||
"settings": { | ||
"index": { | ||
"number_of_replicas": "0", | ||
"number_of_shards": "1", | ||
"query.default_field": [ | ||
"agent.id", | ||
"agent.groups", | ||
"file.name", | ||
"file.path", | ||
"file.target_path", | ||
"file.group", | ||
"file.uid", | ||
"file.gid" | ||
], | ||
"refresh_interval": "5s" | ||
} | ||
} | ||
} |