Logstash environment filter plugin

Hi .
I have been trying to know the purpose of environment filter for a while But at last it came with no effect in my data index in elastic search
Can anyone tell me the purpose of environment filter and what the mistake in my config file.?
Here the config looks like ,

  environment {
  add_metadata_from_env => { "target_env" => "$HOME" }

os : ubuntu18.04
logstash : 6.7

Thanks in advance .

That should be

add_metadata_from_env => { "target_env" => "HOME" }

Personally I don't see any point in installing the environment filter when every filter supports environment variable references

mutate { add_field => { "[@metadata][target_env]" => "${HOME}" } }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.