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 :*/