Advertisement
Guest User

Untitled

a guest
May 24th, 2017
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.12 KB | None | 0 0
  1.     input {
  2.     jdbc {
  3.         # Postgres jdbc connection string to our database, mydb
  4.         jdbc_connection_string => "jdbc:postgresql://xxx:5432/xxx"
  5.         # The user we wish to execute our statement as
  6.         jdbc_user => "xxx"
  7.         jdbc_password => "xxx"
  8.        # The path to our downloaded jdbc driver
  9.         jdbc_driver_library => "/usr/share/java/postgresql-jdbc4.jar"
  10.         # The name of the driver class for Postgresql
  11.         jdbc_driver_class => "org.postgresql.Driver"
  12.         # Schedule for input
  13.         #schedule => "5 * * * *"
  14.         # our query
  15.         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$
  16.    }
  17.    }
  18.  
  19.    output {
  20.    elasticsearch {
  21.        hosts => [ "localhost:9200" ]
  22.        index => "universe"
  23.        document_type => "planet"
  24.        document_id => "%{id}"
  25.        template => "/etc/logstash/universe_template.json"
  26.        template_name => "universe_elastic"
  27.        template_overwrite => true
  28.        manage_template => true
  29.    }
  30.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement