I am currently writing a custom java plugin for Logstash.
One of the input settings is an array.
This array might be set in another field within the logstash event.
so basically I want to be able to do this:
#array_field=> ["aa","bb"]
my_plugin{
roles=> {array_field}
}
On the back end in my java code I handle the input config using this
private static final PluginConfigSpec<List<Object>> ROLES_CONFIG = PluginConfigSpec.arraySetting(roles);
So I want array_field to be passed as an array (not a string) into the roles plugin setting parameter. But I don't now how.
It seems like "array_field" just gets passed in as a string literal when I try and my plugin throws error about how it's expecting an array not a string. Is there a way in Logstash to pass array_field's content as an array into my plugin?