From c00d30bdfb4a5e7980c6778165f97a9823a3df23 Mon Sep 17 00:00:00 2001 From: Karl Date: Tue, 19 May 2015 14:49:54 +0100 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 37067fe..540628f 100644 --- a/README.md +++ b/README.md @@ -56,4 +56,20 @@ output { } ``` +### Postgres +With thanks to [@roflmao](https://github.com/roflmao) +``` +input +{ + stdin { } +} +output { + jdbc { + driver_class => 'org.postgresql.Driver' + connection_string => 'jdbc:postgresql://hostname:5432/database?user=username&password=password' + statement => [ "INSERT INTO log (host, timestamp, message) VALUES(?, CAST (? AS timestamp), ?)", "host", "@timestamp", "message" ] + } +} +``` + /* vim: set ts=4 sw=4 tw=0 :*/