Index not updated in Kibana with cURL post

Hello,

I am trying to create the index "indexname" in Kibana with the following command:
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/indexname/_bulk?pretty' --data-binary @file.json
Then I create the index pattern and when I assess it with “GET /_cat/indices?v” I get:
yellow open indexname uuid-uoZxtnXnYROA 1 1 100 0 12.5kb
My index looks fine, isn’t it?
Usually the first time I send the file to my index (which creates the index) it works well, BUT not always.
Then I try to update the index with :
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/indexname/_bulk?pretty' --data-binary @otherfile.json
Two different things happen in Kibana :

  • No more data are available in visualize or dashboard no matter the time range
  • Sometimes there is only my previous data, but not my new updated one
    I also tried with “curl -H 'Content-Type: application/x-ndjson' -XPUT 'localhost:9200/indexname/_bulk?pretty' --data-binary @otherfile.json” for the bad same result.
    More info:
  • Running my Elastic Stack with Docker on Linux virtual machine
  • Tried to delete and recreate my index several times
  • My json file format:
    {"index":{"_id":"1"}}
    {"firstName":"John","lastName":"Doe","age":60,"heartrate":70,"painrating":19,"date":"2020-05-13T09:10:14.325"}
  • I choose “date” at Time Filter field name when I create my index
    Can you please help me? Thank you.

Any idea? Can I have help please?

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