# Add Multiple input plugins in Logstash

**URL:** https://discuss.elastic.co/t/add-multiple-input-plugins-in-logstash/123585
**Category:** Logstash
**Created:** [March 12, 2018, 3:44pm UTC](https://discuss.elastic.co/t/add-multiple-input-plugins-in-logstash/123585 "2018-03-12T15:44:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zakkhan](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zakkhan](https://discuss.elastic.co/u/zakkhan)
#### Post date: [March 12, 2018, 3:44pm UTC](https://discuss.elastic.co/t/add-multiple-input-plugins-in-logstash/123585/1 "2018-03-12T15:44:55Z")

</div>

I need to add two different input plugins in logstash i.e. Filebeat and jdbc but only jdbc is working. I am not sure is this the right way i am adding both of them? Please let me know what to do in this kind of scenario:

input {  
beats{  
port=\> "5044"  
}  
jdbc {  
jdbc\_driver\_library =\> "C:\Program Files\Microsoft JDBC Driver 6.0 for SQL Server\sqljdbc\_6.0\enu\jre8\sqljdbc42.jar"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
jdbc\_connection\_string =\> "jdbc:sqlserver://myserverName:PortName;user=IntegrationUser;password=AHCS@12345;database=QAEsbExceptionDb;"  
jdbc\_user =\> "myuser"  
jdbc\_password =\> "mypassword"  
statement =\> "SELECT \* FROM [Fault]"  
type =\> "esblogs"  
}  
}

filter {  
if [type] == "log"{  
grok{  
match =\>{"message"=\>"%{TIMESTAMP\_ISO8601:logtime} -[0-9]{2}:[0-9]{2} [%{LOGLEVEL:LogLevel}"}  
add\_field =\> ["Received\_at", "%{@timestamp}"]  
remove\_field =\> ["@version", "offset", "tags"]  
}  
date{  
match =\> ["logtime", "YYYY-MM-dd HH:mm:ss.SSS"]  
target =\> "@timestamp"  
}  
}  
}

output {  
elasticsearch{  
hosts =\> "localhost:9200"  
index =\> "%{type}"  
document\_type =\> "doc"  
}  
}

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [March 12, 2018, 9:46pm UTC](https://discuss.elastic.co/t/add-multiple-input-plugins-in-logstash/123585/2 "2018-03-12T21:46:40Z")

</div>

This looks okay. Are you sure Filebeat is successfully sending any events to Logstash? For debugging purposes I suggest you temporarily replace the elasticsearch output with a `stdout { codec => rubydebug }` output that just dumps all events to stdout.

---

<div class="post-metadata">

### Author: ![zakkhan](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zakkhan](https://discuss.elastic.co/u/zakkhan)
#### Post date: [March 13, 2018, 1:48pm UTC](https://discuss.elastic.co/t/add-multiple-input-plugins-in-logstash/123585/3 "2018-03-13T13:48:25Z")

</div>

You are right! Basically my filebeat wasn't in sync with logstash pipeline. Now both inputs are working fine.

---

<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: [April 10, 2018, 1:48pm UTC](https://discuss.elastic.co/t/add-multiple-input-plugins-in-logstash/123585/4 "2018-04-10T13:48:59Z")

</div>

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