Is it possible to set the MySql Session or Global variable in logstash input configuration file?


(Jose Lopez) #1

I want to set a MySql session variable through logstash input configuration file.
For example :

input {
jdbc {
jdbc_driver_library => "D:\logstash\lib\mysql-connector-java-5.1.35.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => ""
jdbc_user => "root"
jdbc_password => "root"
statement => "SET SESSION optimizer_switch='block_nested_loop=off'"
type => "a"
}
jdbc {
jdbc_driver_library => "D:\logstash\lib\mysql-connector-java-5.1.35.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "****"
jdbc_user => "root"
jdbc_password => "root"
statement => "SELECT * from table1"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
}
jdbc {
jdbc_driver_library => "D:\logstash\lib\mysql-connector-java-5.1.35.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "
"
jdbc_user => "root"
jdbc_password => "root"
statement => "SET SESSION optimizer_switch='block_nested_loop=on'"
type => "a"
}
}


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.