I have set up my kibana and Elastic.
I am getting my logs from Fluentbit.
My main app log, which is JSON, is sent by Fluent with other meta fields like this:
{
"containerId": "foo",
"clusterId" : "bar",
"source" : "stderr",
"log" : "{ type: error, "msg": "cannot connect to redis" }" // My JSON-FORMATTED LOG GOES HERE
}
I want to be able to extract fields "type" and "msg" from JSON (which is treated as string in ES) and level those with the rest of fields. This enables me to set filters and indexing properly for them.
How should I approach this?
Things I've tried:
In Data view I tried to add a field log.type (considering dot-notation works) but it doesn't work.
In Index Management, I tried to update field mappings but it doesn't allow me editing the index's fields mapping (I have full privileges).
I am looking to have my list of logs to include "type" and "msg" as distinct columns: searchable and filtertable.