Hi, I have a db table in sql server which logs the errors and maintains in a table. I want to be able to send it to elastic search after parsing it through logstash. Now the problem is the server points to a different port number while logstash tries to establish a connection on default 1433.
Here is how my logstash config looks like.
input {
jdbc {
jdbc_driver_library => "C:\confidential\sqljdbc_6.0\enu\jre8\sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://s1wew.abccorp.netnet,20486;user=dummyuname;password=dummypasswpord;"
jdbc_user => ""
jdbc_password => ""
statement => "SELECT *
FROM [EMEAData].[dbo].[ServicesTransactionErrorLog]"
}
}
filter {
}
output {
stdout { codec => rubydebug }
elasticsearch {
hosts => "127.0.0.1"
index => "logstash=-%{+YYYY.MM.dd}"
}
}