Custom Output log to elasticsearch

Hi,
I have json format strings into the .log files. And I need that filebeat insert that json strings as individual logs into a custom elastic search index. That index needs to have the same structure that the json format string. For example in my .log file I have
-----example.log
'''''''''''''''''''''''''''''''''''
{"example":"test1"}
{"example":"test2"}
'''''''''''''''''''''''''''''''''''
And In ElasticSearch i have an index filebeat-example-logs that has the following structure
''''''''''''''''''''
{
example:""
}
'''''''''''''''''''
So filebeat detects a new entry into example.log file and inserted exactly the same into the filebeat-example-logs index.

Thanks!

Please take a look at docs and elasticsearch pipelines. Pipelines will help you to properly parse your input data.

1 Like

Thanks! I am going to read the docs

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.