1 - unable to fetch values inside JSON.
2 - unable to map timestamp from data.
For all general issues, please provide the following details for fast resolution:
- Version:5.1.1
- Operating System: Mac Sierra
- Config File (if you have sensitive info, please remove it):
sample data
[debug] <0.545.0> <<"{\"user_id\":\"79\",\"timestamp\":\"2016-12-28T11:10:26Z\",\"operation\":\"ver3 - Requested for recommended,verified handle information\",\"data\":\"\",\"content_id\":\"\",\"channel_id\":\"\"}">>
input {
# beats {
# port => "5043"
# }
stdin {
}
}
filter{
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:syslogtimestamp} [%{SYSLOG5424SD:logtype}] <% . {BASE16FLOAT:processid}.0> <<%{QS:mydata}>>"}
}
json {
source => "mydata"
target => "parsedJson"
add_field => {
"user_id" => "%{[parsedJson][user_id]}}"
"operation" => "%{[parsedJson][operation]}}"
"data" => "%{[parsedJson][data]}}"
}
# remove_field=>["mydata"]
}
mutate {
add_field => {
"user_id" => "%{[parsedJson][user_id]}"
"operation" => "%{[parsedJson][operation]}"
"data" => "%{[parsedJson:data]}"
}
}
}
output {
stdout {}
elasticsearch {
hosts => [ "localhost:9200" ]
}
}
-
Sample Data:2016-12-28 00:16:40:53.290 [debug] <0.545.0> <<"{"user_id":"79","timestamp":"2016-12-28T11:10:26Z","operation":"ver3 - Requested for recommended,verified handle information","data":"","content_id":"","channel_id":""}">>
-
Steps to Reproduce:
second is timestamp not matching.