i am trying to use FileBeat directly parse the log file and send to elastic search. here is the example of the data
2018-01-06 20:13:22 sending the number 7496 to outchannel
2018-01-06 20:13:22 sending the number 7496 to inchannel
2018-01-06 20:13:23 sending the number 7497 to outchannel
2018-01-06 20:13:23 sending the number 7497 to inchannel
2018-01-06 20:13:24 sending the number 7498 to outchannel
2018-01-06 20:13:24 sending the number 7498 to inchannel
2018-01-06 20:13:25 sending the number 7499 to outchannel
2018-01-06 20:13:25 sending the number 7499 to inchannel
2018-01-06 20:13:26 sending the number 7500 to outchannel
2018-01-06 20:13:26 sending the number 7500 to inchannel
so i use the grok pipeline and the data can load to elasticsearch and below is the output
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 7.06019,
"hits": [
{
"_index": "mlsbeat-6.1.0-2018.01.06",
"_type": "doc",
"_id": "AWDLmoWt8ZoYLzM4Ts54",
"_score": 7.06019,
"_source": {
"@timestamp": "2018-01-06T13:13:08.176Z",
"offset": 235527,
"beat": {
"hostname": "gene-VirtualBox",
"name": "gene-VirtualBox",
"version": "6.1.0"
},
"prospector": {
"type": "log"
},
"source": "/home/devops/mls-log.log",
"message": "2018-01-06 20:05:01 sending the number 7000 to outchannel ",
"rttype": "outchannel ",
"timestamp": "2018-01-06 20:05:01",
"trackingid": "7000"
}
},
{
"_index": "mlsbeat-6.1.0-2018.01.06",
"_type": "doc",
"_id": "AWDLmoWt8ZoYLzM4Ts55",
"_score": 7.00971,
"_source": {
"@timestamp": "2018-01-06T13:13:08.176Z",
"offset": 235585,
"beat": {
"hostname": "gene-VirtualBox",
"name": "gene-VirtualBox",
"version": "6.1.0"
},
"prospector": {
"type": "log"
},
"source": "/home/devops/mls-log.log",
"message": "2018-01-06 20:05:01 sending the number 7000 to inchannel ",
"rttype": "inchannel ",
"timestamp": "2018-01-06 20:05:01",
"trackingid": "7000"
}
}
]
}
}
the @timestamp by default is the system time, but acutally i want to use the timestamp in the timestamp, in Kibana can not choose timestamp when create the index pattern hence not able to show in the dashboard. i understand the reason is that timestamp is string type not a date . is there anyway can easily convert it to date type without using logstash?