# How to upload json.file via logstash into elasticserch? What I did wrong?

**URL:** <https://discuss.elastic.co/t/how-to-upload-json-file-via-logstash-into-elasticserch-what-i-did-wrong/331377>\
**Category:** Logstash\
**Created:** [April 30, 2023, 6:31pm UTC](https://discuss.elastic.co/t/how-to-upload-json-file-via-logstash-into-elasticserch-what-i-did-wrong/331377 "2023-04-30T18:31:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleksiiorel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oleksiiorel/32/118205_2.png) [@oleksiiorel](https://discuss.elastic.co/u/oleksiiorel)\
**Post date:** [April 30, 2023, 6:31pm UTC](https://discuss.elastic.co/t/how-to-upload-json-file-via-logstash-into-elasticserch-what-i-did-wrong/331377/1 "2023-04-30T18:31:03Z")

</div>

json.file

```auto

[
  {
    "sku":"00000290",
"categories":"1_brands,1_restaurant_equipment,2_brand_rm_gastro,2_food_holding_and_warming_equipment,3_steam_heaters_and_buffets,4_bain_marie_heaters,categoryE7E7163",
"family":"TV",
"box_height_estimate_boolean":"1"
},
{
"sku":"00003165",
"categories":"1_brands,1_spare_parts,2_brand_rm_gastro,2_product_type,3_planetary_mixers_spare_parts_and_accessories,4_panetary_mixer_bowls,categoryE7E7163",
"family":"Blender",
"box_height_estimate_boolean":"1"
}
]

```

logstash:

```auto
input{
  file {
    type => "json"
    path => "C:/json-file.json" 
    start_position => "beginning"
    sincedb_path => "NUL"
  }	  
}
 filter {
      json {
        source => "message"
      }
    }

output{
  elasticsearch {
    hosts => "http://localhost:9200"
    index => "original-data"
    user => "elastic"
    password => "b==KITDnO6dxMapRJ7BH" 
  }
stdout{}
}

```

ERROR MESSAGE:  
Not eligible for data streams because config contains one or more settings that are not compatible with data streams: {"index"=\>"original-data"}

---

<div class="post-metadata">

**Author:** ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)\
**Post date:** [May 4, 2023, 4:26pm UTC](https://discuss.elastic.co/t/how-to-upload-json-file-via-logstash-into-elasticserch-what-i-did-wrong/331377/2 "2023-05-04T16:26:56Z")

</div>

Starting with version 8.x the elasticsearch output defaults the data\_stream parameter as auto. Sounds like it thinks this data should be a data stream but the original-data is not setup that way in the cluster. Try setting data\_stream to false (which was the default in 7.x). For example:

```auto
elasticsearch {
    hosts => "http://localhost:9200"
    index => "original-data"
    user => "elastic"
    password => "password_redacted"
    data_stream => false
  }

```

Also, if you want to try another option the "Upload File" integration in Kibana (supports files up to 100MB by default). It can handle both json and csv file types.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 1, 2023, 4:27pm UTC](https://discuss.elastic.co/t/how-to-upload-json-file-via-logstash-into-elasticserch-what-i-did-wrong/331377/3 "2023-06-01T16:27:22Z")

</div>

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