Kibana 基础4

2022-02-10 20:00:10 浏览数 (1)

访问

在浏览器中输入 http://192.168.100.101:5601/ 就可以成功访问了

查看 Kibana 的状态


导入实验数据

准备数据

代码语言:javascript复制
[root@h101 date]# curl -XPUT http://h102:9200/shakespeare -d '{
 "mappings" : {
  "_default_" : {
   "properties" : {
    "speaker" : {"type": "string", "index" : "not_analyzed" },
    "play_name" : {"type": "string", "index" : "not_analyzed" },
    "line_id" : { "type" : "integer" },
    "speech_number" : { "type" : "integer" }
   }
  }
 }
}
';
{"acknowledged":true}[root@h101 date]#
[root@h101 date]# curl -XPUT http://h102:9200/logstash-2015.05.18 -d '{
>   "mappings": {
>     "log": {
>       "properties": {
>         "geo": {
>           "properties": {
>             "coordinates": {
>               "type": "geo_point"
>             }
>           }
>         }
>       }
>     }
>   }
> }
> ';
{"acknowledged":true}[root@h101 date]# curl -XPUT http://h102:9200/logstash-2015.05.19 -d '
> {
>   "mappings": {
>     "log": {
>       "properties": {
>         "geo": {
>           "properties": {
>             "coordinates": {
>               "type": "geo_point"
>             }
>           }
>         }
>       }
>     }
>   }
> }
> ';
{"acknowledged":true}[root@h101 date]#
[root@h101 date]# curl -XPUT http://h102:9200/logstash-2015.05.20 -d '
> {
>   "mappings": {
>     "log": {
>       "properties": {
>         "geo": {
>           "properties": {
>             "coordinates": {
>               "type": "geo_point"
>             }
>           }
>         }
>       }
>     }
>   }
> }
> ';
{"acknowledged":true}[root@h101 date]#
[root@h101 date]# ls
accounts.zip  logs.jsonl.gz  shakespeare.json
[root@h101 date]# unzip accounts.zip 
Archive:  accounts.zip
  inflating: accounts.json           
[root@h101 date]# gunzip logs.jsonl.gz 
[root@h101 date]# ls
accounts.json  accounts.zip  logs.jsonl  shakespeare.json
[root@h101 date]# du -s * 
240	accounts.json
60	accounts.zip
52100	logs.jsonl
24628	shakespeare.json
[root@h101 date]#

Tip: 实验数据的地址,可以参考 Getting Started , 可以使用 wget 获取

代码语言:javascript复制
https://www.elastic.co/guide/en/kibana/3.0/snippets/shakespeare.json
https://github.com/bly2k/files/blob/master/accounts.zip?raw=true
https://download.elastic.co/demos/kibana/gettingstarted/logs.jsonl.gz

0 人点赞