Not able to create the filter with correct pattern

input file -

filter using like below. Something worked when I used 5.2 now I am with 7.2. I am getting warning saying "[WARN ] 2019-10-30 17:19:02.329 [[main]>worker49] split - Only String and Array types are splittable. field:apps is of type = Hash" and nothing is ingested in Elasticsearch.

filter {
json {
source => "message"
split { field => "[apps]" }
split { field => "[apps][app]" }

As it says, [apps] is not an array so you cannot do this. Remove that line.

However, that should not prevent the event being indexed. Are there any errors in the elasticsearch logs?

Hi Badger,

Issue is resolved by removing the first [apps] and data is correctly loading with the following changes.

filter {
json {
source => "message"}
split { field => "[apps][app]" }
split { field => "[apps][app][resourceRequests]" }

Now I have a problem
I want to load only few values to elasticsearch output.. How to specify that specific values?
Reason : I am getting huge data as part of resource Requests and it is the big hurdle to load the data, so I want to cut it down while loading.

filter worked -
split {remove_field => ""}

I want to remove multiple fields, which is not working..

split {remove_field => ["","","","","","command","","","tags"]}

Actually, I have a lot of data to parse. This particular logstash script not loading. Not able to find any log...even logstash also not showing anything

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