From 345ada47bb65fd0460c7745b71b3c2396a35db9d Mon Sep 17 00:00:00 2001 From: f-galland Date: Fri, 25 Oct 2024 15:06:32 -0300 Subject: [PATCH] Add command's index template --- .../resources/index-template-commands.json | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 plugins/setup/src/main/resources/index-template-commands.json diff --git a/plugins/setup/src/main/resources/index-template-commands.json b/plugins/setup/src/main/resources/index-template-commands.json new file mode 100644 index 0000000..3614c17 --- /dev/null +++ b/plugins/setup/src/main/resources/index-template-commands.json @@ -0,0 +1,104 @@ +{ + "index_patterns": [ + ".commands*" + ], + "mappings": { + "date_detection": false, + "dynamic": "strict", + "properties": { + "agent": { + "properties": { + "groups": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "command": { + "properties": { + "action": { + "properties": { + "args": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "order_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "request_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "result": { + "properties": { + "code": { + "type": "short" + }, + "data": { + "ignore_above": 1024, + "type": "keyword" + }, + "message": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "source": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "target": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "timeout": { + "type": "short" + }, + "user": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "order": 1, + "settings": { + "index": { + "hidden": true, + "number_of_replicas": "0", + "number_of_shards": "1", + "query.default_field": [ + "command.source", + "command.target.type", + "command.status", + "command.action.name" + ], + "refresh_interval": "5s" + } + } +}