Inherits logstash jdbc config

Hi,

I have 6 differents logstash config file to synchronize 6 Oracle tables with their given elastic index.

I was wondering if it was possible to inherit common JDBC config so I do not have to repeat myself in all those files. Here an example of what I would like to be inherited from a common file :

File 1 :

    jdbc {
    	jdbc_validate_connection => true
    	jdbc_driver_library => "C:\dev\logstash-6.3.2\bin\ojdbc\ojdbc8.jar"
    	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
    	jdbc_connection_string => "jdbc:oracle:thin:@ORACLE_SERVER:1521/ORACLE_DB"
    	jdbc_user => "ORACLE_SCHEMA"
    	jdbc_password => "${db_password}"	
    	statement_filepath => "C:\dev\logstash-6.3.2\config\insert_address.sql"
		
		use_column_value => true
		tracking_column => "alias_for_id"
		last_run_metadata_path => "c:\userindent preformatted text by 4 spaces> "id"
	last_run_metadata_path => "c:\users\ggingras\.logstash-street-last-run-add"
	
	#run every minute
	schedule => "* * * * *"
	clean_run => true
}

File 2:

jdbc {
	jdbc_validate_connection => true
	jdbc_driver_library => "C:\dev\logstash-6.3.2\bin\ojdbc\ojdbc8.jar"
	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
	jdbc_connection_string => "jdbc:oracle:thin:@ORACLE_SERVER:1521/ORACLE_DB"
	jdbc_user => "ORACLE_SCHEMA"
	jdbc_password => "${db_password}"		
	statement_filepath => "C:\dev\logstash-6.3.2\config\insert_street.sql"
	
	use_column_value => true
	tracking_column => "id"
	last_run_metadata_path => "c:\users\ggingras\.logstash-street-last-run-add"
	
	#run every minute
	schedule => "* * * * *"
	clean_run => true
}

Can I inherit the following lines from a common file :

jdbc_validate_connection => true
jdbc_driver_library => "C:\dev\logstash-6.3.2\bin\ojdbc\ojdbc8.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@ORACLE_SERVER:1521/ORACLE_DB"
jdbc_user => "ORACLE_SCHEMA"
jdbc_password => "${db_password}"		

Thanks

Gaetan

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