A path as default for an env variable in config not detected


(Christian Stockhaus) #1

Hallo,

how do i correctly define a default value for an env variable substituion in a pipeline configuration?

I have tried with %{fdc.path.tool_cluster_dict:/etc/logstash/tool_cluster_dict.json} but he says the file doesn't exist. But i can copy the path from the config and do a cat on this path. (The permissions are set so everyone can read the file)

filter {
    translate {
      # This setting must be a path
      # File does not exist or cannot be opened %{fdc.path.tool_cluster_dict:/etc/logstash/tool_cluster_dict.json}
      dictionary_path => "%{fdc.path.tool_cluster_dict:/etc/logstash/tool_cluster_dict.json}"
      ...
    }
  }

Thanks in advance
Shaoran


(Magnus B├Ąck) #2

Environment variables are referenced via ${env}, not %{env}.


(Christian Stockhaus) #3

ok thats embarrassing


(system) #4

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