I have Logon & Logoff events coming from winlogbeat. I looking for a way to match the LogonID field between those events, and than calculate the timestamp time difference. Could this be achieved without using logstash filters?
For example: how can I combine this 3 queries and return the timestamp as well? than maybe I can calculate the difference.
GET /winlogbeat-7.14.0-2022.02.03-000001/_search
{
"query": {
"match_all": {}
},
"aggs": {
"bulks": {
"terms": {
"field": "winlog.event_data.TargetLogonId",
"size": 10
},
"aggs": {
"orders": {
"top_hits": {
"size": 10
}
}
}
}
}
}
GET /winlogbeat-7.14.0-2022.02.03-000001/_search
{
"query":{
"match" : {
"winlog.event_id":"4624"
}
}
}
GET /winlogbeat-7.14.0-2022.02.03-000001/_search
{
"query":{
"match" : {
"winlog.event_id":"4634"
}
}
}