Logstash - jdbc retry multiple ips

Hi

i'm connecting to my database via scan name and my scan name resolve to 3 IPs
but the issue is sometimes 1 or 2 IPs get unavailable
my question how i can set the connection to retry all IPs as below

jdbc_connection_string => "jdbc:oracle:thin:@ip1:0000"
if not available retry 
jdbc_connection_string => "jdbc:oracle:thin:@ip2:0000"
if not available retry 
jdbc_connection_string => "jdbc:oracle:thin:@ip3:0000" 

thanks

The syntax for an Oracle JDBC connection string is

"jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)
(port=1521)(host=prodHost)))(connect_data=(INSTANCE_NAME=Foo)))"

So I think you should try

jdbc_connection_string => "jdbc:oracle:thin:@(description=(address_list=
(address=(protocol=tcp)(port=1521)(host=ip1))
(address=(protocol=tcp)(port=1521)(host=ip2))
(address=(protocol=tcp)(port=1521)(host=ip3))
)(connect_data=(INSTANCE_NAME=Foo)))"

See this page for information about the FAILOVER and LOAD_BALANCE options, one of which you probably want.

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