Elasticsearch 導入 kibana 的樣例數據

1. 下載數據

下載地址html

2. 根據官方頁面說明創建相關索引

3. 將數據導入Elasticsearch

  • 必須在文件目錄下執行導入命令,windows下須要將單引號替換爲雙引號json

    curl -H "Content-Type: application/json" -XPOST "localhost:9200/bank/account/_bulk?pretty&refresh" --data-binary "@accounts.json"
    curl -H "Content-Type: application/x-ndjson" -XPOST "localhost:9200/_bulk?pretty" --data-binary @logs.jsonl
    curl -H "Content-Type: application/x-ndjson" -XPOST "localhost:9200/shakespeare/doc/_bulk?pretty" --data-binary @shakespeare_6.0.json

    Windows的cmd沒有curl功能,我是在 cmder 中執行的windows

相關文章
相關標籤/搜索