Hello all,
I'm firstly using log stash and got some issue when parsing the JSON log on the message field into multiple field for visualizing in the Kibana dashboard.
Below is my message log appear in Elasticsearch
message
{ "requestId":"0ea45178-0134-4728-b7a3-63d5383a460e", "ip": "10.52.63.99", "responseStatus":"200", "xrayTraceId":"""","requestTime":"14/Aug/2021:05:42:49 +0000", "httpMethod":"POST","resourcePath":"/V2/device-services/deviceapi/login", "stage": "V2", "protocol":"HTTP/1.1", "responseLength":"64", "headers": "", "deviceId": "" }
And there is my logstash.conf:
input {
cloudwatch_logs {
log_group => "API-Gateway-AccessLog"
region => "ap-south-1"
type => "apiaccesslog"
start_position => beginning
codec => "json"
}
}
filter {
json {
source => "message"
}
}
output {
stdout {
codec => rubydebug { metadata => true }
}
amazon_es {
hosts => "https://search-test--xyz.us-east-1.es.amazonaws.com"
index => "api-accesslog-"
}
}
Please help me to solve the issue, thank you in advance.