Hi Everyone
i need to replace @timestamp with the timestamp from log file(message). still i can't mention complete message format. i can use like starts with timestamp. i tried below code
grok {
match => { "message" => ["^{timestamp}"] }
}
date {
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
target => "@timestamp"
}
}
This is the output i got
{"tags":["_grokparsefailure"],"message":["<158>2019-01-07 05:00:31 UTC","User.Info","192.156.15.13","\"Jan 6 22:26:55 PA-200.tdc.crsg 1","2019/01/06 22:26:54","001606074152","TRAFFIC","end","1","2019/01/06 22:26:54","145.123.15.23","10.2.2.3","117.6.162.63","192.156.15.13","WAN-LAN","","","ms-rdp","vsys1","untrust","trust","ethernet1/3","ethernet1/4","Kiwi Syslog","2019/01/06 22:26:54","64750","1","57890","3389","57890","3389","0x400050","tcp","allow","3705","1708","1997","18","2019/01/06 22:26:35","4","any","0","361598833","0x0","VN","IN","0","10","8","tcp-rst-from-client","0","0","0","0","","PA-200","from-policy\" "],"@timestamp":"2019-01-28T12:29:34.379Z"}
The output i required is
{"tags":["_grokparsefailure"],"message":["<158>2019-01-07 05:00:31 UTC","User.Info","192.156.15.13","\"Jan 6 22:26:55 PA-200.tdc.crsg 1","2019/01/06 22:26:54","001606074152","TRAFFIC","end","1","2019/01/06 22:26:54","145.123.15.23","10.2.2.3","117.6.162.63","192.156.15.13","WAN-LAN","","","ms-rdp","vsys1","untrust","trust","ethernet1/3","ethernet1/4","Kiwi Syslog","2019/01/06 22:26:54","64750","1","57890","3389","57890","3389","0x400050","tcp","allow","3705","1708","1997","18","2019/01/06 22:26:35","4","any","0","361598833","0x0","VN","IN","0","10","8","tcp-rst-from-client","0","0","0","0","","PA-200","from-policy\" "],"@timestamp":"2019-01-07 05:00:31 UTC"}
can anyone help me regrading this pls
Thanks.