[ERROR][logstash.filters.aggregate][main]Aggregate exception occurred {:error=>#<NoMethodError: undefined method `+' for nil:NilClass>

Hi,

I think the logs are very clear in that case: You cannot join fields together if they do not exist (are nil).

There seem to be multiple different errors in the pipeline, but I took the following message as example:

undefined method +' for nil:NilClass>, :code=>"\n map['frontieralias'] = event.get('[@metadata][frontier_alias]');`....

The complete code seems to be:

  aggregate {
    task_id => "%{queryid}"
    code =>"
      map['frontieralias'] = event.get('[@metadata][frontier_alias]');
      map['alias_query'] = map['fullquery']+10.chr+event.get('alias_data');
      map['fullquery'] = map['alias_query']+' frontier_alias '+map['frontieralias'].to_s;
    "
    map_action => "create_or_update"
  }

Maybe I did not understand your pipeline completely, but I couldn't find a place where you set frontier_alias``to the map - you are only reading it so I guess this is the reason for the error.

Best regards
Wolfram