728x90
๋ฐ์ํ
SMALL
https://www.elastic.co/guide/en/kibana/7.1/tutorial-load-dataset.html
๋ฒ์ ์ ๋ง์ถฐ์ sample log data๋ฅผ elasticsearch์ ๋ฐ์ด ๋ฃ์ด์ค๋ค
์ฐธ๊ณ
๋ณธ๊ฒฉ ๋ฃ๊ธฐ ์ ์ ๋งตํ์ ํด์ฃผ๋๊ฒ ์ค์ํ๋ค
1. ๋งตํ!
PUT /logstash-2015.05.18
{
"mappings": {
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
}
์ด๋ฐ์์ผ๋ก ๋์ด์๋๊ฑฐ ๋ค ํด์ค๋ค.
2. ๋ก์ปฌ์ ํ์ผ ๋ค์ด๋ก๋
curl -O https://download.elastic.co/demos/kibana/gettingstarted/7.x/shakespeare.json
curl -O https://download.elastic.co/demos/kibana/gettingstarted/7.x/accounts.zip
curl -O https://download.elastic.co/demos/kibana/gettingstarted/7.x/logs.jsonl.gz
๋๋ curl๋ก ๋ค ํ๋ค
3. ์์ถํด์
unzip accounts.zip
gunzip logs.jsonl.gz
4. ํ๊ธด
5. ์ ๋ก๋
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/_bulk?pretty' --data-binary @shakespeare.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @logs.jsonl
์ด๋ฌ๋ฉด ์ ๋ก๋ ๋
6. ์ต์ข ํ์ธ
GET /_cat/indices?v
728x90
๋ฐ์ํ
LIST