Logstash mssql config

This is the error im getting when i run this code

C:\elk\logstash\bin>logstash -f ..\conf\mmsdb.conf
Sending Logstash's logs to C:/elk/logstash/logs which is now configured via log4
j2.properties
[2017-06-26T19:21:42,653][ERROR][logstash.agent           ] Cannot create pipeli
ne {:reason=>"Expected one of #, {, \", ', } at line 6, column 1 (byte 268) after input {\n    jdbc_driver_library => \"c:\\elk\\logstash\\lib\\sqljdb

Code

input {
    jdbc {
    jdbc_driver_library => "c:\elk\logstash\lib\sqljdbc42.jar"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver://heheheh:6613;integratedSecurity=false;domain=dummy;user=user;password=passwd;databaseName=lol"
    statement => "SELECT top 1000 * FROM table with (nolock) WHERE CREATE_DATE >= '2017-06-26 20:31:30.050'"
    schedule => "*/1 * * * * "
    last_run_metadata_path => "c:\elk.logstash_jdbc_last_run"
    }
    }

    filter {
    }

    output {
    elasticsearch {
    host => "localhost"
    index => "mms"
    document_id => "%{id}"
    }
    stdout { codec => rubydebug }
    }

Hmm. Your configuration looks okay. Maybe you have a non-printable garbage character somewhere? Try deleting or commenting out lines to see if you can narrow things down. You can also look at the file in a hex editor so you can see exactly what the file contains.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.