# Logstash config file interpolation issue

**URL:** <https://discuss.elastic.co/t/logstash-config-file-interpolation-issue/175662>\
**Category:** Logstash\
**Created:** [April 6, 2019, 4:28am UTC](https://discuss.elastic.co/t/logstash-config-file-interpolation-issue/175662 "2019-04-06T04:28:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![human39](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/human39/32/43586_2.png) [@human39](https://discuss.elastic.co/u/human39)\
**Post date:** [April 6, 2019, 4:28am UTC](https://discuss.elastic.co/t/logstash-config-file-interpolation-issue/175662/1 "2019-04-06T04:28:31Z")

</div>

I'm having an issue that I'm finally giving up on and I need to ask for some help.

Here is what I'm doing:

```
    ...
    geoip {
        source => "[system][auth][ssh][ip]"
        target => "[system][auth][ssh][geoip]"
    }

    memcached {
        hosts => ["ip.add.re.ss:11211"]
        get => {
            "%{[system][auth][ssh][ip]}" => "[company][ip_reputation][source]"
        }
        add_tag => ["ip_reputation_hit"]
    }
    ...

```

The idea is that I'm looking up ip's in a memcached "db" to see if they match reputation lists right before indexing, but that's not the issue: The issue is that it's sending a literal `%{[system][auth][ssh][ip]}` to the memcached server, confirmed with a `tcpdump`. I included the geoip block to show that I do have `[system][auth][ssh][ip]` configured.

The most confusing part is that I'm not able to recreate the issue in testing. I created the following test config:

```
input {
  stdin {
    codec => json
  }
}
filter {

  mutate {
    copy => ["ip", "[system][auth][ssh][ip]"]
  }

  memcached {
     hosts => ["ip.ad.dre.ss:11211"]
     get => {
        "%{[system][auth][ssh][ip]}" => "[company][ip_reputation][source]"
     }
     add_tag => "ip_reputation_hit"
  }

}
output {
  stdout {
     codec => rubydebug
  }
}

```

and if I test it with the input `{ "ip" : "1.1.1.1" }`, it works as I would expect it to using the same version of logstash (6.5.4) I'm using in production.

I hope this is something simple that I'm just overlooking. Thanks for looking!

---

<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 4, 2019, 4:28am UTC](https://discuss.elastic.co/t/logstash-config-file-interpolation-issue/175662/2 "2019-05-04T04:28:38Z")

</div>

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