Hi All,
I'm trying to visualise the statusCode in Kibana and try and get it as a filter. So I originally tried setting filters in logstash with json and mutate however that didn't get me the desired filter. Finally I just wanted to get the data to be visible in Kibana and changed my logstash config as
filter {
grok {
match => { "message" => "%{GREEDYDATA:request}" }
}
json{
source => "request"
target => "logEntry"
}
}
3 sample log file entries:
{"@message":"Client REQUEST","@timestamp":"2017-04-07T14:18:38+0000","@fields":{"data":{"uri":"/status","headers":{"connection":"Keep-Alive","user-agent":"Load Balancer Agent","x-ms-lb-host":"xxx.xx.xx.xx:xxxx","x-ms-lb-monitorstatus":"Up","host":"xxx.xx.xx.xx:xxxx"},"body":{}},"logLevel":"debug","logId":320511,"level":"debug"}}
{"@message":"Client REQUEST","@timestamp":"2016-10-04T09:43:30+0100","@fields":{"uri":"/test/blah/","user-agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8","host":"my.server.1","logId":20642,"level":"info"}}
{"@message":"Client RESPONSE:","@timestamp":"2016-10-04T09:43:30+0100","@fields":{"statusCode":200,"logId":20642,"level":"info"}}
I would have expected to see logEntry.@fields.statusCode in Kibana but I do not. However I do see logEntry.@fields.data.uri.
I'm new to this and stuck here and really need some help or pointers to documentation on how to configure the filter so that I can get the filters statusCode, uri logId
My ultimate aim is to be able to plot on a graph all my different statusCode, uri logId on to Kibana dashboard. What am I doing wrong here? What filter setting should I be using?
Any help or tips will be greatly appreciated