Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- jdbc {
- # Postgres jdbc connection string to our database, mydb
- jdbc_connection_string => "jdbc:postgresql://xxx:5432/xxx"
- # The user we wish to execute our statement as
- jdbc_user => "xxx"
- jdbc_password => "xxx"
- # The path to our downloaded jdbc driver
- jdbc_driver_library => "/usr/share/java/postgresql-jdbc4.jar"
- # The name of the driver class for Postgresql
- jdbc_driver_class => "org.postgresql.Driver"
- # Schedule for input
- #schedule => "5 * * * *"
- # our query
- statement => "select planet.id, planet.x || ':' || planet.y || ':' || planet.z coords, planet.x, planet.y, planet.z ,planetname,rulername,race,planet.size,planet.score,planet.value$
- }
- }
- output {
- elasticsearch {
- hosts => [ "localhost:9200" ]
- index => "universe"
- document_type => "planet"
- document_id => "%{id}"
- template => "/etc/logstash/universe_template.json"
- template_name => "universe_elastic"
- template_overwrite => true
- manage_template => true
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement