forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add commands index template definition (#413)
* Add commands index template definition * Change oreder_id data type
- Loading branch information
Showing
5 changed files
with
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
- name: command | ||
title: Wazuh commands | ||
short: Wazuh Inc. custom fields. | ||
description: > | ||
This index stores information about the Wazuh's commands. These commands can be sent to agents or Wazuh servers. | ||
type: group | ||
group: 2 | ||
fields: | ||
- name: source | ||
type: keyword | ||
level: custom | ||
description: > | ||
Origin of the request. | ||
- name: user | ||
type: keyword | ||
level: custom | ||
description: > | ||
The user that originated the request. | ||
- name: target | ||
type: keyword | ||
level: custom | ||
description: > | ||
Wazuh Server Cluster name to send the command to. | ||
- name: type | ||
type: keyword | ||
level: custom | ||
description: > | ||
The requested action type. One of 'agent_group', 'agent', 'wazuh_server'. | ||
- name: action.type | ||
type: keyword | ||
level: custom | ||
description: > | ||
The actual requested action. One of Agent groups, Agent, Server cluster. | ||
- name: action.args | ||
type: keyword | ||
level: custom | ||
description: > | ||
Array of command arguments, starting with the absolute path to the executable. | ||
- name: action.version | ||
type: keyword | ||
level: custom | ||
description: > | ||
Version of the command's schema. | ||
- name: timeout | ||
type: short | ||
level: custom | ||
description: > | ||
Time window in which the command has to be sent to its target. | ||
- name: status | ||
type: keyword | ||
level: custom | ||
description: > | ||
Status within the Command Manager's context. One of 'pending', 'sent', 'success', 'failure'. | ||
- name: result.code | ||
type: short | ||
level: custom | ||
description: > | ||
Status code returned by the target. | ||
- name: result.message | ||
type: keyword | ||
level: custom | ||
description: > | ||
Result message returned by the target. | ||
- name: result.data | ||
type: keyword | ||
level: custom | ||
description: > | ||
Result data returned by the target. | ||
- name: request_id | ||
type: short | ||
level: custom | ||
description: > | ||
Unique identifier generated by the Command Manager. Auto-incremental. | ||
- name: order_id | ||
type: short | ||
level: custom | ||
description: > | ||
Unique identifier generated by the Command Manager. Auto-incremental within the same Command Request ID. |
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,4 @@ | ||
{ | ||
"dynamic": "strict", | ||
"date_detection": false | ||
} |
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,8 @@ | ||
--- | ||
name: command | ||
fields: | ||
base: | ||
fields: | ||
tags: [] | ||
command: | ||
fields: "*" |
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,20 @@ | ||
{ | ||
"index_patterns": [ | ||
".commands*" | ||
], | ||
"order": 1, | ||
"settings": { | ||
"index": { | ||
"hidden": true, | ||
"number_of_shards": "1", | ||
"number_of_replicas": "0", | ||
"refresh_interval": "5s", | ||
"query.default_field": [ | ||
"command.source", | ||
"command.target", | ||
"command.status", | ||
"command.type" | ||
] | ||
} | ||
} | ||
} |
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,22 @@ | ||
{ | ||
"index_patterns": [ | ||
".commands*" | ||
], | ||
"priority": 1, | ||
"template": { | ||
"settings": { | ||
"index": { | ||
"hidden": true, | ||
"number_of_shards": "1", | ||
"number_of_replicas": "0", | ||
"refresh_interval": "5s", | ||
"query.default_field": [ | ||
"command.source", | ||
"command.target", | ||
"command.status", | ||
"command.type" | ||
] | ||
} | ||
} | ||
} | ||
} |