to work. If you are using a date filter then make sure you put the mutate before the date filter if you really want the current year (year it is processed in) rather than the year that the line was logged at.
what i try to do is in the output instead of putting an if and several elasticsearch output plugin, i could use just one like:
output {
elasticsearch {
hosts => ["host1"]
user => '${es_usr}'
password => '${es_pwd}'
index => "%{[@metadata][prefix]}-%{[@metadata][date_part]}"
}
}
then some indexes are stored in daily way others weekley others monthly and changing [@metadata][date_part] i get it more generic and less repetitions of elasticsearch {....} in the output.
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.