# Logstash 6.2 multiple input confused

**URL:** <https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636>\
**Category:** Logstash\
**Created:** [August 16, 2018, 7:07am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636 "2018-08-16T07:07:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [August 16, 2018, 7:07am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/1 "2018-08-16T07:07:13Z")

</div>

env：logstash 6.2

I touch two config files in /etc/logstash/conf.d , eg：a.conf b.conf

a.conf input from kafka, setting type is 'aa'

b.conf input from file, setting type is 'bb'

Both output are same ES

The question is the data from aa's input into bb's output

eg： index\_day write into ES index bb

My confuse that why aa.conf and bb.conf are not standalone like nginx!!!

aa.conf

```auto
input {
  kafka {
        bootstrap_servers => "kafka0:19092,kafka1:19093,kafka2:19094"
        topics => ["aa"]
        codec => "json"
        type => "aa"
        group_id => "aa"
        consumer_threads => 2

  }
}

filter {

  grok {
        match => ["message" , "(20%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY:day} %{TIME:time})\s+%{LOGLEVEL:level}"]
  }

  mutate {
       add_field => ["log_time","20%{year}-%{month}-%{day} %{time}"]
  }

  date {
        match => ["log_time","yyyy-MM-dd HH:mm:ss.SSS"]
        target => "@timestamp"
  }

  ruby {
        code => ["event.set('index_day', event.get('@timestamp').time.localtime.strftime('%Y.%m.%d'))"]
  }

  mutate {
       remove_field => ["[beat][name]","[beat][version]","@version","offset","tmptime","log_time","year","month","day","time"]
  }

}

output {
  if [type] == "aa" {
      elasticsearch {
        codec => plain{ charset => "UTF-8" }
        hosts => "http://es1:9200"
        index => "%{[fields][log_topic]}-%{index_day}"
      }
  }
}

```

bb.conf

```auto
input {
  file {
      path => ["/data/bba/mobile/*"]
      start_position => "beginning"
      type => "bb"
      codec=> multiline {
         pattern => "^\[([0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3})\]([0-9]{4}-[0-9]{2}-[0-9]{2})"
         negate => true
         what => "previous"
      }
  }
}

filter {

     grok {
           match => ["message" , "\[%{TIME:time}\](20%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY:day} %{HOUR}:%{MINUTE}:%{SECOND}) %{LOGLEVEL}" ]
     }

     mutate {
          add_field => ["log_time","20%{year}-%{month}-%{day} %{time}"]
     }

     date {
           match => ["log_time","yyyy-MM-dd HH:mm:ss.SSS"]
           target => "@timestamp"
     }

}

output {

  if [type] == "bb" {
    elasticsearch {
      codec => plain{ charset => "UTF-8" }
      hosts => "http://es1:9200"
      index => "bb"
    }
  }

}

```

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [August 16, 2018, 7:20am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/2 "2018-08-16T07:20:02Z")

</div>

It looks like you want the [Multiple Pipelines](https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html) feature, which is used a bit differently.

When multiple files are placed in the conf.d directory, they are concatenated together and run as a single pipeline.

---

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [August 16, 2018, 7:49am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/3 "2018-08-16T07:49:03Z")

</div>

Thank you for your reply!!!

I settting it following in /etc/logstash/logstash.yml ,but it is not working neither cant writing data to ES:

```auto
pipeline.id: aa
path.config: "/etc/logstash/conf.d/aa.conf"

pipeline.id: bb
path.config: "/etc/logstash/conf.d/bb.conf"

```

---

<div class="post-metadata">

**Author:** ![nniikkoollaaii](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nniikkoollaaii/32/34791_2.png) [@nniikkoollaaii](https://discuss.elastic.co/u/nniikkoollaaii)\
**Post date:** [August 16, 2018, 8:47am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/4 "2018-08-16T08:47:49Z")

</div>

> [@Haitianisgood](#):
>
> The question is the data from aa's input into bb's output

Have a look at the [pipeline-to-pipeline communication feature](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#pipeline-to-pipeline).  
You can send aa's input to bb's pipeline and send it to ES in bb's output

---

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [August 16, 2018, 8:59am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/5 "2018-08-16T08:59:32Z")

</div>

Thank you for your reply!!!

I don't want to send aa's input into bb's output! I need them to be standalone!

The question is the data from aa's input into bb's output result in confused!

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [August 16, 2018, 2:28pm UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/6 "2018-08-16T14:28:23Z")

</div>

The docs that I linked call out that `pipelines.yml` is a separate config file.

You will also want to be careful of syntax (note the indentation and the yaml list items):

```auto
- pipeline.id: aa
  path.config: "/etc/logstash/conf.d/aa.conf"
- pipeline.id: bb
  path.config: "/etc/logstash/conf.d/bb.conf"

```

---

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [August 17, 2018, 3:25am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/7 "2018-08-17T03:25:06Z")

</div>

Thank you for your reply again!

but it is still not working

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [August 19, 2018, 3:23pm UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/8 "2018-08-19T15:23:53Z")

</div>

My best guess is that your `pipelines.yml` either isn't in the config directory, or isn't readable by the user under which Logstash is running.

What do your logs say is happening? You may need to enable debug-level logging (by adding `--log.level debug` command-line flag or by setting `log.level: debug` in your `logstash.yml`).

---

<div class="post-metadata">

**Author:** ![Haitianisgood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haitianisgood/32/33563_2.png) [@Haitianisgood](https://discuss.elastic.co/u/Haitianisgood)\
**Post date:** [August 20, 2018, 8:06am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/9 "2018-08-20T08:06:04Z")

</div>

Thank you very much for your reply again!

I am sorry! I make a mistake! 🙁 I modify a wrong config file!

---

<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:** [September 17, 2018, 8:06am UTC](https://discuss.elastic.co/t/logstash-6-2-multiple-input-confused/144636/10 "2018-09-17T08:06:21Z")

</div>

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