Ruby filter double event.set not index the content

Hi,
With Logstasth --> 7.5.1

The problem is when ia put:
event.set('[jolokia][metrics][threadpool][webcontainer][activecount]', item['current'])
event.set('[jolokia][metrics][threadpool][webcontainer][highwatermark]',

But I put only one and then it's workfine.

code => "
message_array = event.get('[jolokia][metrics][threadpool][webcontainer][stats][statistics]')
if message_array.each_with_index {|item, index|
logger.info('the file-suffix is:', 'value' => index.to_s)
logger.info('item:', 'value' => item)
logger.info('item[name]:', 'value' => item['name'])
if item['name'] == 'ActiveCount'
logger.info('ActiveCount', 'value' => item['current'])
logger.info('highWaterMark', 'value' => item['highWaterMark'])
event.set('[jolokia][metrics][threadpool][webcontainer][activecount]', item['current'])
event.set('[jolokia][metrics][threadpool][webcontainer][highwatermark]', item['highWaterMark'])

   end
   if item['name'] == 'PoolSize'
      logger.info('PoolSize', 'value' => item['current'])
      event.set('[jolokia][metrics][threadpool][webcontainer][poolsize]', item['current'])
   end


   }
  end
"

Error is:
[2020-01-31T12:17:29,752][WARN ][logstash.outputs.elasticsearch][main] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"fortuny.metricbeat.2020.01", :_type=>"_doc", :routing=>nil}, #LogStash::Event:0x24b1d5dc], :response=>{"index"=>{"_index"=>"fortuny.metricbeat.2020.01", "_type"=>"_doc", "_id"=>"tEJR-28BWdp4Tf2y9BIO", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Limit of total fields [1000] in index [fortuny.metricbeat.2020.01] has been exceeded"}}}}

I solved, thanks

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