From daf34902f34b16bc13f3307ed69edfbe284c8be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20G=C3=B3mez?= Date: Tue, 11 Sep 2018 13:32:41 -0300 Subject: [PATCH] update script for new Elasticsearch REST Requests update bulk index script for new Elasticsearch REST Requests like said on this link https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests --- bulk_index.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bulk_index.sh b/bulk_index.sh index e39f480..50ead1e 100644 --- a/bulk_index.sh +++ b/bulk_index.sh @@ -6,5 +6,5 @@ while read LINE; do echo '{"index": {"_index":"cowrie","_type":"cowrieevents"}}' >> /tmp/cowrieevents.json echo $LINE >> /tmp/cowrieevents.json done <"$1" -curl -s XPOST --data-binary @/tmp/cowrieevents.json localhost:9200/_bulk +curl -s XPOST -H'Content-Type: application/json' --data-binary @/tmp/cowrieevents.json localhost:9200/_bulk rm /tmp/cowrieevents.json