Unable to sort logs on the basis of timestamp

grok filter:

filter {
grok {
match => { "message" => "[%{LOGLEVEL:Severity}]:[%{DATA:User_Name}]:[%{TIMESTAMP_ISO8601:event_time}]:[%{DATA:Session_ID}]:[%{DATA:Function_Name}]:[%{DATA:Event}]:[%{DATA:Activity_Status}]:[%{GREEDYDATA:message}]"
}

}

date {
match => ["timestamp", "dd/MM/yyyy HH:mm:ss"]
target => "@timestamp"
}

}

elasticsearch curl request:

curl -XGET "http://172.25.2.206:9200/elk_db/_search?size=1000&pretty" -H 'Content-Type: application/json' -d'

{

"sort": [
{ "event_time": {"order" : "asc"} }
],

"query": {
"bool": {
"must": [
{ "match": { "Session_ID": "323232" }}

  ]

}

}

}'

Mapping:

{"elk_db":{"mappings":{"doc":{"properties":{"@timestamp":{"type":"date"},"@version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"Activity_Status":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"Event":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"Function_Name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"Session_ID":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"Severity":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"User_Name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"beat":{"properties":{"hostname":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"event_time":{"type":"date","format":"yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"},"host":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"message":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"offset":{"type":"long"},"prospector":{"properties":{"type":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"source":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"tags":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"timestamp":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}

below are the sample logs
[DEBUG]:[test]:[09/05/2018 07:06:00]:[323232]:[uploadLogFile]:[PRE_DEPLOYMENT_CHECKS]:[323232]:[abcd]
[DEBUG]:[test]:[09/05/2018 07:06:00]:[323232]:[uploadLogFile]:[PRE_DEPLOYMENT_CHECKS]:[323232]:[abcs]
[INFO]:[test]:[09/05/2018 07:06:00]:[323232]:[getUnTrustedOkHttpClient]:[PRE_DEPLOYMENT_CHECKS]:[ajsjwqsqwsqw]
[INFO]:[test]:[09/05/2018 07:06:00]:[323232]:[getUnTrustedOkHttpClient]:[PRE_DEPLOYMENT_CHECKS]:[dwdwedwdwd]

What exactly is the issue? What do you mean by being unable to sort?

Those logs don't show anything useful, so I'm not sure what the issue is here :confused:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.