I'm using,
- filebeat version 5.0
- elasticsearch version 5.0
- kibana version 5.0
I have a log file with below format
{"timestamp":"2016-11-10 06:06:11","severity":"INFO","service": "login request","trace":"1e2rexxxxxxxx","span": "1e2rexxxxxxxx","exportable":"false","pid": "10144","thread": "http-nio-9200-exec-2","class":"org.apache.http.wire","logData": "some data"}
{"timestamp":"2016-11-10 06:06:11","severity":"DEBUG","service": "order request","trace":"1e3rexxxxxxxx","span": "1e3rexxxxxxxx","exportable":"false","pid": "10144","thread": "http-nio-9200-exec-2","class":"org.apache.http.wire","logData": "some more data"}
And I have created the index as below using the curl command.
curl -XPUT http://10.44.2.48:9200/toastconnector -d '
{
"mappings" : {
"default" : {
"properties" : {
"timestamp": { "type": "date", "format": "yyyy-MM-dd HH:mm:ss" },
"severity": { "type": "string", "index": "not_analyzed" },
"service": { "type": "string", "index": "not_analyzed" },
"trace": { "type": "string", "index": "not_analyzed" },
"span": { "type": "string", "index": "not_analyzed" },
"exportable": { "type": "string", "index": "not_analyzed" },
"pid": { "type": "string", "index": "not_analyzed" },
"thread": { "type": "string", "index": "not_analyzed" },
"class": { "type": "string", "index": "not_analyzed" },
"logData": { "type": "string", "index": "not_analyzed" }
}
}
}
}
';
I have a requirement to filter/search any 'service' (e.g. login request) within a certain date and time frame and I want it to be configured in my dashboard as well. When I try to configure index pattern in Kibana with the check box 'Index contains time-based events' option enabled, I get only the default @timestamp field (which I assume shows the index created date time) on 'Time-field name', but not the timestamp field I have in my log file. How can I do configure to pick the timestamp in my log file?