Trying to visulaize the working of a dead letter queue but getting error while creating index

This is my logstash configuration

input {
  file{
    path => "C:\Elastic Stack\logstash-8.12.0\config\sample-data-dlq.json"
    start_position => "beginning"
    sincedb_path => "NUL"
    codec => "json"
  }
}
filter{
  json{
    source => "message"
  }
}
output { 
  elasticsearch {
    hosts => ["https://127.0.0.1:9200"]
    index => "test.dlq"
    user => "elastic"
    password => "elastickaran"
    ssl_certificate_verification => false
  }
  stdout {
    codec => rubydebug
  }
}

this the sample json data

[
    {"age": 30, "full_name": "John Doe", "gender": "Male"},
    {"age": 25, "full_name": "Jane Smith", "gender": "Female"},
    {"age": 40, "full_name": "Alex Johnson", "gender": "Male"},
    {"age": 22, "full_name": "Emily Davis", "gender": "Female"},
    {"age": 35, "full_name": "Michael Brown", "gender": "Male"},
    {"age": 28, "full_name": "Olivia White", "gender": "Female"},
    {"age": 45, "full_name": "William Lee", "gender": "Male"},
    {"age": 27, "full_name": "Sophia Miller", "gender": "Female"},
    {"age": 32, "full_name": "Daniel Wilson", "gender": "Male"},
    {"age": 26, "full_name": "Grace Turner", "gender": "Female"},
    {"age": false, "full_name": "Matthew Harris", "gender": "Male"},
    {"age": true, "full_name": "Ella Carter", "gender": "Female"},
    {"age": true, "full_name": "James Anderson", "gender": "Male"},
    {"age": true, "full_name": "Ava Robinson", "gender": "Female"},
    {"age": true, "full_name": "Christopher Taylor", "gender": "Male"},
    {"age": false, "full_name": "Mia Wright", "gender": "Female"},
    {"age": false, "full_name": "Joseph Evans", "gender": "Male"},
    {"age": false, "full_name": "Lily Harris", "gender": "Female"},
    {"age": true, "full_name": "Benjamin Reed", "gender": "Male"},
    {"age": true, "full_name": "Chloe Johnson", "gender": "Female"}
]

The problem is that this conf logstash file is not creating index or either you can say not sending data to elasticsearch

Since you are using Windows, change back slashes to forward slashes:
path => "C:/Elastic Stack/logstash-8.12.0/config/sample-data-dlq.json"

Speaking of data, the age has the numeric and the boolean type., is that OK?

yeah , @Rios thanks for the reply and also greatly thankfull for the solution it worked and

i am doing that so when logstash starts to read the integer value after all the integer value is completed then it will encounter boolean value and send the data to the dead_letter_queue and process the data again from the dead_letter_queue to the elasticsearch

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