logstash-output-jdbc/examples/postgres.md
2015-12-30 12:05:05 +00:00

357 B

Example: Postgres

With thanks to @roflmao

input
{
	stdin { }
}
output {
	jdbc {
		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" ]
	}
}