title: Logstash Error - Unknown setting '"hosts"' for elasticsearch
body: <p>I am trying to load data from oracle to elastic using logstash.</p>
  
  <p>Elastic 7.0.1
  Logstash 7.0.1</p>
  
  <p>logstash.conf:</p>
  
  <pre><code>input {
      jdbc {
          # The path to our downloaded jdbc driver
          jdbc_driver_library =&gt; "/home/foobar/apps/elastic/ojdbc7.jar"
          # Postgres jdbc connection string to our database, mydb
          jdbc_connection_string =&gt; "jdbc:oracle:thin:@localhost:1521:xe"
          # The user we wish to execute our statement as
          jdbc_user =&gt; "scott"
          jdbc_password =&gt; "tiger"
          # The name of the driver class for Postgresql
          jdbc_driver_class =&gt; "Java::oracle.jdbc.driver.OracleDriver"
          # our query
          statement =&gt; "select log_id,log_name,log_type from log_test where rownum &lt; 1000"
      }
  }
  output {
      stdout { codec =&gt; json_lines }
      elasticsearch {
          "hosts" =&gt; "localhost:9200"
          "index" =&gt; "logtest"
          "document_type" =&gt; "data"
          "document_id" =&gt;"%{log_id}"
      }
  }
  </code></pre>
  
  <p>Run command:</p>
  
  <pre><code>/home/foobar/apps/elastic/logstash-7.0.1/bin/logstash --path.settings /home/foobar/apps/elastic/logstash-7.0.1/ -f ./logstash-jdbc.conf
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
  Could not find log4j2 configuration at path /home/foobar/apps/elastic/logstash-7.0.1/log4j2.properties. Using default config which logs errors to the console
  [WARN ] 2019-05-15 09:32:58.564 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
  [INFO ] 2019-05-15 09:32:58.587 [LogStash::Runner] runner - Starting Logstash {"logstash.version"=&gt;"7.0.1"}
  [ERROR] 2019-05-15 09:33:05.738 [Converge PipelineAction::Create&lt;main&gt;] elasticsearch - Unknown setting '"document_type"' for elasticsearch
  [ERROR] 2019-05-15 09:33:05.738 [Converge PipelineAction::Create&lt;main&gt;] elasticsearch - Unknown setting '"hosts"' for elasticsearch
  [ERROR] 2019-05-15 09:33:05.738 [Converge PipelineAction::Create&lt;main&gt;] elasticsearch - Unknown setting '"index"' for elasticsearch
  [ERROR] 2019-05-15 09:33:05.750 [Converge PipelineAction::Create&lt;main&gt;] agent - Failed to execute action {:action=&gt;LogStash::PipelineAction::Create/pipeline_id:main, :exception=&gt;"LogStash::ConfigurationError", :message=&gt;"Something is wrong with your configuration.", :backtrace=&gt;["/home/foobar/apps/elastic/logstash-7.0.1/logstash-core/lib/logstash/config/mixin.rb:86:in `config_init'", "/home/foobar/apps/elastic/logstash-7.0.1/logstash-core/lib/logstash/outputs/base.rb:60:in `initialize'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:232:in `initialize'", "org/logstash/config/ir/compiler/OutputDelegatorExt.java:48:in `initialize'", "org/logstash/config/ir/compiler/OutputDelegatorExt.java:30:in `initialize'", "org/logstash/plugins/PluginFactoryExt.java:239:in `plugin'", "org/logstash/plugins/PluginFactoryExt.java:137:in `buildOutput'", "org/logstash/execution/JavaBasePipelineExt.java:50:in `initialize'", "/home/foobar/apps/elastic/logstash-7.0.1/logstash-core/lib/logstash/java_pipeline.rb:23:in `initialize'", "/home/foobar/apps/elastic/logstash-7.0.1/logstash-core/lib/logstash/pipeline_action/create.rb:36:in `execute'", "/home/foobar/apps/elastic/logstash-7.0.1/logstash-core/lib/logstash/agent.rb:325:in `block in converge_state'"]}
  [INFO ] 2019-05-15 09:33:06.178 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=&gt;9600}
  [INFO ] 2019-05-15 09:33:11.085 [LogStash::Runner] runner - Logstash shut down.
  </code></pre>
  
  <p><strong>More Curious about errors:</strong></p>
  
  <pre><code>[ERROR] elasticsearch - Unknown setting '"document_type"' for elasticsearch
  [ERROR] elasticsearch - Unknown setting '"hosts"' for elasticsearch
  [ERROR] elasticsearch - Unknown setting '"index"' for elasticsearch
  [ERROR] elasticsearch - Unknown setting '"document_id"' for elasticsearch
  [ERROR] agent - Failed to execute action 
  </code></pre>
  
  <p>It worked with logstash 6.5 but not working since i upgraded to 7.0.1.</p>
  
  <p>Any help would be appreciated. </p>