Curl post command issue

Error:

1)

curl -H ‘Content-Type:  application/x-ndjson’ -XPOST ‘localhost:9200/bank/account/_bulk?pretty’ –data-binary @accounts.json

Working: (remove the space after “Content-Type:”)

http not support error

curl -H ‘Content-Type: application/x-ndjson’ -XPOST ‘localhost:9200/bank/account/_bulk?pretty’ –data-binary @accounts.json

correct syntax for windows  (change single quote to double quote)

curl -H ‘Content-Type:application/x-ndjson’ -XPOST ‘http://localhost:9200/bank/account/_bulk?pretty’ –data-binary @C:\BDS\KibanaData\accounts.json

right:

curl -H “Content-Type:application/x-ndjson” -XPOST “http://localhost:9200/bank/account/_bulk?pretty” –data-binary @C:\BDS\KibanaData\accounts.json

and it works!

 

 

How to run Confluent from Windows

  1. Start ZooKeeper Server. From confluent-3.0.1\bin\windows directory run below command. zookeeper-server-start.bat ..\..\etc\kafka\zookeeper.properties
  2. Start Kafka Server. kafka-server-start.bat ..\..\etc\kafka\server.properties
  3. Start Schema Registry: schema-registry-start.bat ..\..\etc\schema-registry\schema-registry.properties
  4. Start producer. kafka-console-producer.bat –broker-list localhost:9092 –topic text.test
  5. Start Consumer. kafka-console-consumer.bat –topic text.test –from-beginning –zookeeper localhost:2181
  6. Then start pumping messages from producer and you should receive it on consumer.

Logstash config setting using jdbc input and output

input {
jdbc {

#input configuration
jdbc_driver_library => “C:\DV\adapters\mysql_conn_8.0.12\mysql-connector-java-8.0.12.jar”
jdbc_driver_class => “com.mysql.jdbc.Driver”
jdbc_connection_string => “jdbc:mysql://localhost:3306/sakila”
jdbc_user => “root”
jdbc_password => “password”
statement => “select * from customer”

}

}

output {
elasticsearch {
index => “customer”
document_type => “customer”

#using customer_id from the customer table as the document id
document_id => “%{customer_id}”
hosts => “localhost:9200”
}
}