Watcher to run bulk index

hello

I can execute bulk index API via curl successfully:
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @data.json

I want to use watcher to run bulk index from a json (data.json) file daily automatically, without human interventions.
From the link https://www.elastic.co/guide/en/x-pack/6.2/input-http.html ,watcher is able to execute http endpoint api. But how to pass the json file (data.json) to request.body?

any help is appreciated. Thanks.

This really isn't what Watcher is designed to do. Why not use Filebeat or Logstash to assist with your data ingest?

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