We have our JDBC input working well, and we're trying to see if we can log our SQL statement with the query result.
Here is our config:
input {
jdbc {
jdbc_driver_library => "/usr/share/java/mysql.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/db_name"
jdbc_user => "username"
jdbc_password => "password"
schedule => "* * * * *"
statement => "SELECT NOW()"
}
}
We tried adding:
add_field => {
"statement" => "%{statement}"
}
But this doesn't seem to work