# Concatenate log

**URL:** <https://discuss.elastic.co/t/concatenate-log/275968>\
**Category:** Logstash\
**Created:** [June 15, 2021, 9:18am UTC](https://discuss.elastic.co/t/concatenate-log/275968 "2021-06-15T09:18:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cassiopee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cassiopee/32/88597_2.png) [@cassiopee](https://discuss.elastic.co/u/cassiopee)\
**Post date:** [June 15, 2021, 9:18am UTC](https://discuss.elastic.co/t/concatenate-log/275968/1 "2021-06-15T09:18:15Z")

</div>

hello,

I have a beats log, who are concatenate and special characters.  
I wanted request one of this field but I supposed my request is blocked because a bad syntax.

````auto
{
          "user" => {
          "name" => "AD-WSUS$",
        "domain" => "BUBODEV",
            "id" => "S-1-5-18"
    },
          "host" => {
                 "mac" => [
            [0] "xxx"
        ],
                "name" => "AD-wsus.bubodev.local",
                  "os" => {
                "type" => "windows",
              "family" => "windows",
                "name" => "Windows Server 2019 Standard",
              "kernel" => "xxxx",
             "version" => "10.0",
               "build" => "1xxx",
            "platform" => "windows"
        },
            "hostname" => "AD-wsus",
        "architecture" => "x86_64",
                  "ip" => [
            [0] "xxxx",
            [1] "xxxx"
        ],
                  "id" => "xxxx"
    },``` 

my request look like :

`if [host.ip] {
        memcached {
            hosts => ["xxx:11211"]
            namespace => "misp-ip"
            get => { "%{[host.ip]}" => "[enrich][tmp]" }
`
with apache log it's work properly but in this case not.
````

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 15, 2021, 2:14pm UTC](https://discuss.elastic.co/t/concatenate-log/275968/2 "2021-06-15T14:14:24Z")

</div>

What is your question?

---

<div class="post-metadata">

**Author:** ![cassiopee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cassiopee/32/88597_2.png) [@cassiopee](https://discuss.elastic.co/u/cassiopee)\
**Post date:** [June 15, 2021, 2:48pm UTC](https://discuss.elastic.co/t/concatenate-log/275968/3 "2021-06-15T14:48:58Z")

</div>

I want correct syntax to request my field IP log

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 15, 2021, 3:05pm UTC](https://discuss.elastic.co/t/concatenate-log/275968/4 "2021-06-15T15:05:35Z")

</div>

You do not have a [host.ip] field, in logstash that would be a field with a period in its name. You have a [host][ip] field which is an array, so you would reference the first item in it using [host][ip][0]

---

<div class="post-metadata">

**Author:** ![cassiopee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cassiopee/32/88597_2.png) [@cassiopee](https://discuss.elastic.co/u/cassiopee)\
**Post date:** [June 16, 2021, 9:18am UTC](https://discuss.elastic.co/t/concatenate-log/275968/5 "2021-06-16T09:18:07Z")

</div>

> [@cassiopee](#):
>
> `[host.ip] `

It still can't get the request even with that :

```auto

filter {
      grok {
        match => { "[host][ip]" => "%{IPV4:clientip}" }
      }
        mutate {
  remove_tag => ["beats_input_codec_plain_applied"]
         }
 if [clientip] {
        memcached {
                hosts => ["127.0.0.1:11211"]
                namespace => "misp-ip"
                get => {"%{[clientip]}" => "[enrich][tmp]" }
        }
        if [enrich][tmp] {
            ruby { path => "/etc/logstash/process_ioc.rb" }
            mutate { remove_field => ["[enrich]" ] }
         }
   }
 }

```

I don't understand why it doesn't make request.

---

<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:** [July 14, 2021, 9:18am UTC](https://discuss.elastic.co/t/concatenate-log/275968/6 "2021-07-14T09:18:53Z")

</div>

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