1

我无法用我的 postgresql-9.5.4-1-windows-x64 配置我的 logstash-2.3.2。这是我的 log-config.conf 文件

    input {
    jdbc {
        # Postgres jdbc connection string to our database, mydb
        jdbc_connection_string => "jdbc:postgresql://localhost:5432/ambule"
        # The user we wish to execute our statement as
        jdbc_user => "postgres"
        # The path to our downloaded jdbc driver
        jdbc_driver_library => "C:\Users\Administrator\Downloads\postgresql-9.4-1201-jdbc41.jar"
        # The name of the driver class for Postgresql
        jdbc_driver_class => "org.postgresql.Driver"
        # our query
        statement => "SELECT * from table1"
    }
}
output {
    stdout { codec => json_lines }
}

我收到 错误

4

1 回答 1

2

我猜异常本身就在jdbc_connection_string. 如果你有这样的东西怎么办:

jdbc_connection_string => "jdbc:postgresql://host:port/database?user=username"

-------------------------------------------------- --------------------------------------------------^ 尝试添加用户

似乎它已从doc中遗漏了。希望能帮助到你!

于 2017-02-08T05:02:26.660 回答