# Logstash file input mix up

**URL:** <https://discuss.elastic.co/t/logstash-file-input-mix-up/248942>\
**Category:** Logstash\
**Created:** [September 17, 2020, 8:34am UTC](https://discuss.elastic.co/t/logstash-file-input-mix-up/248942 "2020-09-17T08:34:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![logben](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@logben](https://discuss.elastic.co/u/logben)\
**Post date:** [September 17, 2020, 8:34am UTC](https://discuss.elastic.co/t/logstash-file-input-mix-up/248942/1 "2020-09-17T08:34:55Z")

</div>

Hello!

I read two Windows file shares with DNS logs with the following two seperate configuration files:

**DNS-Server 1:**

```auto
input {
        file {
              path => "/var/log/logstash/dns-share-pdc/dns.log"
              tags => "dns"
              mode => "tail"
              sincedb_path => "/var/log/logstash/dns-pdc-log"
             }
}

filter { if "dns" in [tags] {
       if [message] =~ /^\r/ {
       drop {}
       }

       mutate { gsub => [
                        "message", "\s\(\d+\)", " ",
                        "message", "\(\d+\)\r", "\r" ,
                        "message", "\(\d+\)", "."
                        ]
              }
       }

}

output {
if "dns" in [tags] {
      file {
           path => "/var/log/logstash/dns-import/pdc/pdc-dns-%{+YYYY-MM-dd}.log"
          
      }
   }
}

```

**DNS-Server 2:**

```auto
input {
        file {
              path => "/var/log/logstash/dns-share-gdc/dns.log"
              tags => "dns"
              mode => "tail"
              sincedb_path => "/var/log/logstash/dns-gdc-log"
             }
}

filter { if "dns" in [tags] {
       if [message] =~ /^\r/ {
       drop {}
       }

       mutate { gsub => [
                        "message", "\s\(\d+\)", " ",
                        "message", "\(\d+\)\r", "\r" ,
                        "message", "\(\d+\)", "."
                        ]
              }
       }
}
output {
if "dns" in [tags] {

      file {
           path => "/var/log/logstash/dns-import/gdc/gdc-dns-%{+YYYY-MM-dd}.log"
      }
  }
}

```

Server 1 works fine, but the strange thing is, that instead of getting the logs of Server 2 as configured above, I get a copy of the logs of Server 1 in the output file of Server 2. Yes, I have double checked the mounted Windows file shares. I did not mount two times the same share by accident. What is causing the mix up? Thanks in advance!

Cheers, Ben

---

<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:** [September 17, 2020, 1:58pm UTC](https://discuss.elastic.co/t/logstash-file-input-mix-up/248942/2 "2020-09-17T13:58:49Z")

</div>

See [this](https://discuss.elastic.co/t/entries-duplication/247448/2) thread.

---

<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:** [October 15, 2020, 1:58pm UTC](https://discuss.elastic.co/t/logstash-file-input-mix-up/248942/3 "2020-10-15T13:58:49Z")

</div>

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