-
Notifications
You must be signed in to change notification settings - Fork 23
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
Command manager timeseries index model #565
Command manager timeseries index model #565
Comments
We decided to add the Wazuh-indexer updatesThe ECS definitions of the Command index pattern{
"index_patterns": [
".commands*"
],
"mappings": {
"date_detection": false,
"dynamic": "strict",
"properties": {
"@timestamp": {
"type": "date"
},
"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"
}
}
},
"delivery_timestamp": {
"type": "date"
}
}
},
"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"
}
}
}
Wazuh-indexer-plugins updatesAdded Updated Command created with a POST request to the command-manager API {
"took": 32,
"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": "fZuAdJMBy-t6tcAPACYT",
"_score": 1.0,
"_source": {
"agent": {
"groups": [
"groups000"
]
},
"command": {
"source": "Engine",
"user": "TestUser",
"target": {
"type": "agent",
"id": "TestTarget"
},
"action": {
"name": "restart",
"args": [
"/test/path/fake/args"
],
"version": "v4"
},
"timeout": 30,
"status": "PENDING",
"order_id": "fJuAdJMBy-t6tcAPACYT",
"request_id": "e5uAdJMBy-t6tcAPACYS"
},
"@timestamp": 1732826365971,
"delivery_timestamp": 1732826395971
}
}
]
}
} |
Updated timestamp and deliveryTimestamp to be of type |
Description
In order to schedule the management of the commands by the Command Manager plugin, we need to add a
@timestamp
field to the index data model. This field is part of the ECS.This field will be initialized by the plugin. In other words, the value of the field depicts the exact moment on which the command is indexed. We'll also include a field to store the result of
delivery_timestamp = timestamp + timeout
.Functional requirements
@timestamp
field.delivery_timestamp
field.Implementation restrictions
date_time_no_millis
format. See Full date formats.Plan
@timestamp
to the index data model (wazuh-indexer/ecs + generator)The text was updated successfully, but these errors were encountered: