CosmosDB configuration

Hi,
Currently, I have the following config file for logstash.

input {
  jdbc {
	  #https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-record_last_run
    jdbc_connection_string => "jdbc:sqlserver://localhost:1433;database=CatalogDb;user=croos;password=12345"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"    
    jdbc_user => nil
    # The path to our downloaded jdbc driver
    jdbc_driver_library => "C:\Program Files (x86)\sqljdbc6.2\enu\sqljdbc4-3.0.jar"
    # The name of the driver class for SqlServer
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    # Query for testing purpose		
    schedule => "* * * * *"
    #last_run_metadata_path => "C:\Software\ElasticSearch\logstash-6.4.0\.logstash_jdbc_last_run"
    #record_last_run => true
    #clean_run => true
    statement => "  select * from Todos"		
  }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "croos_test"
    #document_id is a unique id, this has to be provided during syn, else we may get duplicate entry in ElasticSearch index.
    document_id => "%{id}"
  }

  stdout { 
    codec => rubydebug 
  }
}

Now I planed to replace Azure cosmos DB for SqlServer. Any sample configuration for CosmosDB connection?

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