I have tried various configs including the one below:
mutate {
add_field => {
"BRAND_VERSION_NAME" => "BRAND_VERSION_%{Region}_%{Language}"
"BRAND_VERSION" => "'${%{BRAND_VERSION_NAME}}'"
}
}
BRAND_VERSION_NAME does contain the correct environment variable name but the variable name just gets printed for BRAND_VERSION (Rather than the contents of the environment variable)
That's because I think you are adding them within the same add_field function, so technically the field does not exist yet when processing. Try splitting it out into a different mutate filter to test first. Also do you need the "$" in the brand_version field name?
Thank you for the reply. I tried separating out the adds as hown below but the result is still the same:
add_field => {
"BRAND_VERSION_NAME" => "BRAND_VERSION_%{Region}_%{Language}"
}
add_field => {
"BRAND_VERSION" => "'${%{BRAND_VERSION_NAME}}'"
}
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.