You can not use conditionals within a plugin. Instead create multiple elasticsearch plugins with the correct config within conditionals.
Another option is to set a field that holds the prefix based on the conditionals and then use this in the index name specification within a single Elasticsearch output plugin.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.