-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make command.action.args
field object-type
#209
Merged
Merged
Conversation
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
Closed
4 tasks
QU3B1M
approved these changes
Jan 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Event is correctly created through the API (using the event_generator)
% python command/event-generator/event_generator.py --protocol http
How many events do you want to generate? 1
Do you want to inject the generated data into your indexer/command manager? (y/n) y
Enter the IP of your Indexer (default: '127.0.0.1'):
Enter the port of your Indexer (default: '9200'):
Username (default: 'admin'):
Password (default: 'admin'):
% curl -sku admin:admin http://127.0.0.1:9200/.commands/_search
{"took":4,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":1,"relation":"eq"},"max_score":1.0,"hits":[{"_index":".commands","_id":"Ix-UUJQBOo9D19TxUCav","_score":1.0,"_source":{"agent":{"groups":["groups000"]},"command":{"source":"Users/Services","user":"user97","target":{"type":"agent","id":"target8"},"action":{"name":"update","args":{"arg1":"/path/to/executable/arg9"},"version":"v5"},"timeout":91,"status":"pending","order_id":"Ih-UUJQBOo9D19TxUCat","request_id":"IR-UUJQBOo9D19TxUCat"},"@timestamp":"2025-01-10T14:18:04Z","delivery_timestamp":"2025-01-10T14:19:35Z"}}]}}
AlexRuiz7
approved these changes
Jan 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documents can be indexed:
{
"commands": [
{
"source": "Engine",
"user": "user53",
"target": {
"id": "target4",
"type": "agent"
},
"action": {
"name": "restart",
"args": {
"arg1": "/path/to/executable/arg6"
},
"version": "v4"
},
"timeout": 30
},
{
"source": "Engine",
"user": "user53",
"target": {
"id": "target4",
"type": "agent"
},
"action": {
"name": "restart",
"args": {
"sint89": "eiusmod amet aliqua",
"arg1": "/path/to/executable/arg6"
},
"version": "v4"
},
"timeout": 30
},
{
"source": "Engine",
"user": "user53",
"target": {
"id": "target4",
"type": "agent"
},
"action": {
"name": "restart",
"args": {
"in1_": true,
"reprehenderit__d5": -45080236.87230298,
"inc3_": "exercitation labore Duis consectetur",
"eu4": -32233289.355662987,
"nulla2": "irure mollit labore nostrud ex",
"arg1": "/path/to/executable/arg6"
},
"version": "v4"
},
"timeout": 30
},
{
"source": "Engine",
"user": "user53",
"target": {
"id": "target4",
"type": "agent"
},
"action": {
"name": "restart",
"args": {
"sed_70": 30155352.64732185,
"elit54": -85199652,
"utefa": "ea deserunt magna do enim",
"ea579": true,
"arg1": "/path/to/executable/arg6"
},
"version": "v4"
},
"timeout": 30
}
]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the commands template to make
command.action.args
field object-type, accommodating for various data types aside from arraysIssues Resolved
wazuh/wazuh-indexer#618