Update README.md

This commit is contained in:
Karl 2015-05-19 14:49:54 +01:00
parent c349f6f617
commit c00d30bdfb

View File

@ -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 :*/ /* vim: set ts=4 sw=4 tw=0 :*/