Hi ,
I'm trying to convert epoch time to human date.
In my json file I tried to put the value of the field with "" and without "".
I saw some answers about this in the web but in my case it doesn't work.
The name of the field I want to change is startTime.
This is my conf file:
input {
file{
path => ["/tmp_31.json"]
type => "json"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter{
grok {
match => [ 'message', '(?"TestName":.*"Agent":"[^"]+")' ]
}
date {
match => [ "startTime", "UNIX" ]
}
json {
source => "message"
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
host => "xx.xxx.xx.xx"
protocol => "http"
index => "index_client"
}
}
BR,
Chen