logstash-output-jdbc/examples/mysql.md
Karl Southern 707c005979 Tests.
2016-05-03 15:28:01 +01:00

575 B

Example: Mysql

With thanks to @jMonsinjon

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