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

**URL:** <https://discuss.elastic.co/t/a-path-as-default-for-an-env-variable-in-config-not-detected/119926>\
**Category:** Logstash\
**Created:** [February 15, 2018, 7:03am UTC](https://discuss.elastic.co/t/a-path-as-default-for-an-env-variable-in-config-not-detected/119926 "2018-02-15T07:03:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)\
**Post date:** [February 15, 2018, 7:03am UTC](https://discuss.elastic.co/t/a-path-as-default-for-an-env-variable-in-config-not-detected/119926/1 "2018-02-15T07:03:32Z")

</div>

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)

```auto
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

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 15, 2018, 7:54am UTC](https://discuss.elastic.co/t/a-path-as-default-for-an-env-variable-in-config-not-detected/119926/2 "2018-02-15T07:54:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)\
**Post date:** [February 15, 2018, 9:06am UTC](https://discuss.elastic.co/t/a-path-as-default-for-an-env-variable-in-config-not-detected/119926/3 "2018-02-15T09:06:50Z")

</div>

ok thats embarrassing

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 15, 2018, 9:07am UTC](https://discuss.elastic.co/t/a-path-as-default-for-an-env-variable-in-config-not-detected/119926/4 "2018-03-15T09:07:08Z")

</div>

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