# ES output using ILM settings "Malformed escape pair at index"

**URL:** <https://discuss.elastic.co/t/es-output-using-ilm-settings-malformed-escape-pair-at-index/178117>\
**Category:** Logstash\
**Created:** [April 23, 2019, 8:59pm UTC](https://discuss.elastic.co/t/es-output-using-ilm-settings-malformed-escape-pair-at-index/178117 "2019-04-23T20:59:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justinw/32/40277_2.png) [@justinw](https://discuss.elastic.co/u/justinw)\
**Post date:** [April 23, 2019, 8:59pm UTC](https://discuss.elastic.co/t/es-output-using-ilm-settings-malformed-escape-pair-at-index/178117/1 "2019-04-23T20:59:25Z")

</div>

Hi,

Using logstash 6.7, I'm switching from daily rotated indices to ILM, and am seeing an error when trying to template the ILM settings.

Error

```auto
java.net.URISyntaxException: Malformed escape pair at index 0: %{dest}-6.7.1

```

Config

```auto
input {
  stdin { }
}

filter {
  mutate {
    add_field => { "dest" => "stdout" }
  }
}

output {
  elasticsearch {
    hosts => ["${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}"]
    user => "${ELASTICSEARCH_USERNAME:}"
    password => "${ELASTICSEARCH_PASSWORD:}"
    ....
    ilm_enabled => "true"
    ilm_rollover_alias => "%{dest}-${LOGSTASH_VERSION:6.X}"
    ilm_pattern => "000001"
    ilm_policy => "%{dest}-${LOGSTASH_VERSION:6.X}"
    manage_template => false
  }
}

```

Previously I had

```auto
...
    index => "%{dest}-${LOGSTASH_VERSION:6.X}-%{+YYYY.MM.dd}"
...

```

Are the ilm settings (such as ilm\_rollover\_alias) not allowed to use variables?

Thanks,  
Justin

---

<div class="post-metadata">

**Author:** ![justinw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justinw/32/40277_2.png) [@justinw](https://discuss.elastic.co/u/justinw)\
**Post date:** [May 1, 2019, 11:42pm UTC](https://discuss.elastic.co/t/es-output-using-ilm-settings-malformed-escape-pair-at-index/178117/2 "2019-05-01T23:42:09Z")

</div>

Bumping this. Can anyone confirm or deny this?

Thanks, Justin

---

<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:** [May 29, 2019, 11:42pm UTC](https://discuss.elastic.co/t/es-output-using-ilm-settings-malformed-escape-pair-at-index/178117/3 "2019-05-29T23:42:24Z")

</div>

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