From d36d659e160ed930ddf4531bc992f679e4bed50f Mon Sep 17 00:00:00 2001 From: Massimo Sporchia Date: Wed, 12 Apr 2017 12:59:15 +0200 Subject: [PATCH] Added new example and driver_jar_path parameter Maybe it's just me, but I kept wondering how to add static strings. Added the driver_jar_path, just in case --- examples/sql-server.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/examples/sql-server.md b/examples/sql-server.md index af8109e..2f9e6af 100644 --- a/examples/sql-server.md +++ b/examples/sql-server.md @@ -8,8 +8,24 @@ input } output { jdbc { + driver_jar_path => '/opt/sqljdbc42.jar' connection_string => "jdbc:sqlserver://server:1433;databaseName=databasename;user=username;password=password" statement => [ "INSERT INTO log (host, timestamp, message) VALUES(?, ?, ?)", "host", "@timestamp", "message" ] } + +} +``` +Another example, with mixed static strings and parameters +``` +input +{ + stdin { } +} +output { +jdbc { + driver_jar_path => '/opt/sqljdbc42.jar' + connection_string => "jdbc:sqlserver://server:1433;databaseName=databasename;user=username;password=password" + statement => [ "INSERT INTO log (host, timestamp, message, comment) VALUES(?, ?, ?, 'static string')", "host", "@timestamp", "message" ] + } } ```