# Pass multiple inputs in logstash config. file

**URL:** <https://discuss.elastic.co/t/pass-multiple-inputs-in-logstash-config-file/180293>\
**Category:** Logstash\
**Created:** [May 9, 2019, 6:57am UTC](https://discuss.elastic.co/t/pass-multiple-inputs-in-logstash-config-file/180293 "2019-05-09T06:57:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantkhokhar](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@hemantkhokhar](https://discuss.elastic.co/u/hemantkhokhar)\
**Post date:** [May 9, 2019, 6:57am UTC](https://discuss.elastic.co/t/pass-multiple-inputs-in-logstash-config-file/180293/1 "2019-05-09T06:57:12Z")

</div>

Is this the right way to give multiple input..because i am not geeting logs on kibana. due to this i have to restart logstash after some interval continuously.

> input {  
> beats {  
> port =\> 5044  
> }  
> }
> 
> input {  
> cloudwatch\_logs {  
> log\_group =\> ["/aws/rds/instance/trips3m-prod-master/slowquery"]  
> region =\> "us-east-1"  
> type=\> "rds"  
> }  
> }
> 
> input {  
> cloudwatch\_logs {  
> log\_group =\> ["/aws/rds/instance/trips3m-read-private-new/slowquery"]  
> region =\> "us-east-1"  
> type=\> "rds\_slave"  
> }  
> }
> 
> output {  
> elasticsearch {  
> hosts =\> ["[http://0.0.0.0:9200](http://0.0.0.0:9200/)"]  
> index =\> "%{[@metadata][indexname]}-%{+YYYY.MM.dd}"  
> }

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [May 9, 2019, 7:10am UTC](https://discuss.elastic.co/t/pass-multiple-inputs-in-logstash-config-file/180293/2 "2019-05-09T07:10:08Z")

</div>

> [@hemantkhokhar](#):
>
> input {

Only use `input` once.

```
input {
  beats {
    port => 5044
  }
  cloudwatch_logs {
    log_group => ["/aws/rds/instance/trips3m-prod-master/slowquery"]
    region => "us-east-1"
    type=> "rds"
  }
  cloudwatch_logs {
    log_group => ["/aws/rds/instance/trips3m-read-private-new/slowquery"]
    region => "us-east-1"
    type=> "rds_slave"
  }
}

filter {}

output {
  elasticsearch {
    hosts => ["http://0.0.0.0:9200"]
    index => "%{[@metadata][indexname]}-%{+YYYY.MM.dd}"
  }
}

```

---

<div class="post-metadata">

**Author:** ![hemantkhokhar](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@hemantkhokhar](https://discuss.elastic.co/u/hemantkhokhar)\
**Post date:** [May 9, 2019, 8:11am UTC](https://discuss.elastic.co/t/pass-multiple-inputs-in-logstash-config-file/180293/3 "2019-05-09T08:11:30Z")

</div>

thanks @A_B its a good approach.

---

<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:** [June 6, 2019, 8:11am UTC](https://discuss.elastic.co/t/pass-multiple-inputs-in-logstash-config-file/180293/4 "2019-06-06T08:11:38Z")

</div>

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