I am new to ES 2.1 and Logstash. I was using _river before for fetching records from SQL and can handle multiple queries and indexes in it.
Now I am using Logstash 2.1 and ES 2.1. The issue is, I am not able to deal with multiple sql queries indexes.
So far I have done this in logstash config file and ftech the data from single sql view and populated single index in elasticsearch.
input {
jdbc {
jdbc_driver_library => "/opt/logstash/lib/sqljdbc4-2.0.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string =>"jdbc:sqlserver://104.130.221.76:1433;databaseName=D***S"
jdbc_user => "d************r"
jdbc_password => "D********r"
schedule => " * * * *"
statement => "SELECT * FROM Test2"
}
}
filter {
}
output {
elasticsearch {
hosts => "1**.***.***.***0"
index => "dallas-orders"
document_type => "dallas_report"
document_id => "%{uid}"
}
}
Please help me to deal with multiple sql views and multiple es index. Hope my question clear. Looking forward for the positive response.