Why is my conf not running

Hi,
I'm using this line to input data
/etc/logstash/conf.d# /usr/share/logstash/bin/logstash -f mySql.conf --deb --debug-config
Now here is my config

file: simple-out.conf

input {
jdbc {
# Postgres jdbc connection string to our database, mydb
jdbc_connection_string => "jdbc:mysql://localhost:3306/tweets"
# The user we wish to execute our statement as
jdbc_user => "root"
# The path to our downloaded jdbc driver
jdbc_driver_library => "/etc/elasticsearch/elasticsearch-jdbc-2.3.3.1/lib/mysql-connector-java-5.1.38.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_user => "root"
jdbc_password => "Derp"
# our query
statement => "SELECT * from tweets"
}
}

filter{
mutate{
convert => {
"ID" => "integer"
"AUTHOR" => "string"
"RETWEET_COUNT" => "integer"
"FAVORITE_COUNT" => "integer"
"FOLLOWERS_COUNT" => "integer"
"FRIENDS_COUNT" => "integer"
"BODY" => "string"
"STOCK_PRICE" => "float"
"STOCK_CLOSE" => "float"
"STOCK_HIGH" => "float"
"STOCK_LOW" => "float"
"STOCK_OPEN" => "float"
"STOCK_VOLUME" => "integer"
"SENTIMENT" => "float"
}
}
}

output {
elasticsearch { hosts => ["localhost:9200"] user => elastic password => changeme }
stdout { codec => rubydebug }
}

But everytime I go to run the conf file I get no output, i see it run via the TOP command and it uses 300%cpu for about 20 seconds and stops, where have I gone wrong?

Thanks

I think that for psql you will need a different jdbc driver , instead of the mysql one: https://jdbc.postgresql.org/download.html

Its class should be org.postgresql.Driver and the connection string jdbc:postgresql://host:port/database

Please check https://jdbc.postgresql.org/documentation/94/ for further details regarding psql jdbc driver

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