Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- jdbc {
- jdbc_driver_library => "D:/Portal/logstash-6.1.1/lib/sqljdbc4.jar"
- jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
- jdbc_connection_string => "jdbc:sqlserver://myservername:1433;DatabaseName=mydbnme"
- jdbc_user => "*******"
- jdbc_password => "*******"
- statement => "SELECT * FROM dbo.ParentSummaryWidgetData_ES_UPGRADE"
- lowercase_column_names => "false"
- add_field => {"[@metadata][index_name]" => "parent_measure_code"}
- }
- }
- filter {
- }
- output {
- if [@metadata][index_name] == "parent_measure_code" {
- elasticsearch {
- template => "parent_measure_code_template.txt"
- template_name => "parent_measure_code"
- action => "index"
- hosts => ["localhost:9201"]
- index => "parent_measure_code"
- document_id => "%{id}"
- workers => 1
- }
- stdout { codec => rubydebug }
- }
- }
Add Comment
Please, Sign In to add comment