# Logstash query no output data

**URL:** https://discuss.elastic.co/t/logstash-query-no-output-data/174174
**Category:** Logstash
**Created:** [March 27, 2019, 4:42pm UTC](https://discuss.elastic.co/t/logstash-query-no-output-data/174174 "2019-03-27T16:42:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hustlercoder](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@hustlercoder](https://discuss.elastic.co/u/hustlercoder)
#### Post date: [March 27, 2019, 4:42pm UTC](https://discuss.elastic.co/t/logstash-query-no-output-data/174174/1 "2019-03-27T16:42:01Z")

</div>

Hi there i had some trouble with my logstash configuration.Basically i create a conf file with a basic jdbc connection to a postgresql database.  
I also had other 3 files...4 in total...2 works 2 no...but i cant explain why.  
input {  
jdbc {  
type=\>"temp\_products"  
jdbc\_connection\_string =\> "jdbc:postgresql://ip/DB"  
jdbc\_user =\> "user"  
jdbc\_password =\> "pass"  
jdbc\_validate\_connection =\> true  
jdbc\_driver\_library =\> "/usr/share/logstash/postgresql\_42\_2\_5.jar"  
jdbc\_driver\_class =\> "org.postgresql.Driver"  
statement=\> "select \* from product\_template where id=95181"  
}  
}  
output {  
if [type]=="temp\_products"{  
stdout { codec =\> json\_lines }  
}  
}  
When i run logstash the query run..i can se the log about the execution in console but no result no output as defined in the output section.

---

<div class="post-metadata">

### Author: ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)
#### Post date: [March 28, 2019, 1:14pm UTC](https://discuss.elastic.co/t/logstash-query-no-output-data/174174/2 "2019-03-28T13:14:24Z")

</div>

Please post all 4 configs, stating which works and which does not.

---

<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 25, 2019, 1:20pm UTC](https://discuss.elastic.co/t/logstash-query-no-output-data/174174/3 "2019-04-25T13:20:30Z")

</div>

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