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

527 B

Example: Mysql

With thanks to @jMonsinjon

input
{
	stdin { }
}
output {
	jdbc {
		connection_string => "jdbc:mysql://HOSTNAME/DATABASE?user=USER&password=PASSWORD"
		statement => [ "INSERT INTO log (host, timestamp, message) VALUES(?, CAST (? AS timestamp), ?)", "host", "@timestamp", "message" ]
	}
}