Running logstash pipeline is not working

input {
  jdbc {
	id => "my_plugin_id"
    jdbc_connection_string => "jdbc:sqlserver://abc.database.windows.net:1433;databaseName=db;"
    jdbc_driver_library => ""
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_user => "admin"
    jdbc_password => "123"
    statement => "SELECT [Id]
      ,[ISBN10]
      ,[ISBN13]
      ,[Title]
      ,[Author]
      ,[Category]
	  .....
      ,[Title] +' '+[Category] +' '+[Author] as full_text
        FROM [BookDetailsMaster]"
  }
}

filter {
  mutate {
    convert => ["suggested_price_new","float"]
	  convert => ["used_very_good_price","float"]
	  convert => ["used_good_price","float"]
  }
}

output {
  elasticsearch {
    hosts => ["https://abc.eastus.cloudapp.azure.com:443"]
    user => "elastic"
    password => "ajsadksdfasdf"
    index => "my_index"
    document_id => "%{id}%"
  }
}

this is basic conf file im using jdbc drive
this works fine when i run

logstash.bat -f sql_load.conf

i tried to put in pipelines file to run

# Example of two pipelines:
#
 - pipeline.id: banan-elastic-population
   pipeline.workers: 1
   pipeline.batch.size: 1
   path.config: "C:/Elastic/logstash-7.10.2-windows-x86_64/logstash-7.10.2/bin/banan-all.cfg"
#   config.string: "input { generator {} } filter { sleep { time => 1 } } output { stdout { codec => dots } }"

its giving following error

[2021-02-05T17:16:02,637][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2021-02-05T17:16:02,999][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2021-02-05T17:16:07,937][INFO ][logstash.runner          ] Logstash shut down.
[2021-02-05T17:16:07,957][ERROR][org.logstash.Logstash    ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

is my pipeline spec correct? im on win10

It is telling you that it did not find a configuration file in path.config.

i got it but i have mentioned cfg file

path.config: "C:/Elastic/logstash-7.10.2-windows-x86_64/logstash-7.10.2/bin/banan-all.cfg"

which works when i run

logstash.bat -f banan-all.cfg

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