Kibana安装完毕后,在访问http://localhost:5601时,如果界面出现类似"Add Data to Kibana"这样的字样,则说明Kibana没有在Elasticsearch中找到合适的index用来展示。
可以直接在Kibana中添加数据,在页面中直接点击“Add Data”即可,示例数据添加后Elasticsearch日志中会有如下字样:
[2019-04-14T14:10:14,792][INFO ][o.e.c.m.MetaDataCreateIndexService] [linux1] [kibana_sample_data_flights] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc][2019-04-14T14:10:14,804][INFO ][o.e.c.r.a.AllocationService] [linux1] updating number_of_replicas to [0] for indices [kibana_sample_data_flights][2019-04-14T14:10:37,404][INFO ][o.e.c.m.MetaDataCreateIndexService] [linux1] [kibana_sample_data_logs] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc][2019-04-14T14:10:37,409][INFO ][o.e.c.r.a.AllocationService] [linux1] updating number_of_replicas to [0] for indices [kibana_sample_data_logs][2019-04-14T14:10:38,003][INFO ][o.e.c.m.MetaDataMappingService] [linux1] [kibana_sample_data_logs/ALa56BzXSlqW24tiYEpgBQ] update_mapping [_doc]
查询Elasticsearch的Index:
[[email protected] ~]$ curl -X GET 'http://localhost:9200/_cat/indices?v'health status index uuid pri rep docs.count docs.deleted store.size pri.store.sizeyellow open accounts jcGk9RhVQx6C7cclV-nTZw 1 1 2 0 6.9kb 6.9kbgreen open kibana_sample_data_ecommerce B2pYN_k_QruL7QPs3DzS6Q 1 0 4675 0 4.6mb 4.6mbgreen open .kibana_task_manager WirFb89BTaiCFbo8t_EZwA 1 0 2 0 45.5kb 45.5kbyellow open index1 9jeo0t0eSh-Lw3Ntb73g5A 1 1 0 0 283b 283bgreen open kibana_sample_data_logs ALa56BzXSlqW24tiYEpgBQ 1 0 14005 0 11.3mb 11.3mbgreen open .kibana_1 rx3LSQdzSRW-gddkXY9B6A 1 0 140 0 1mb 1mbgreen open kibana_sample_data_flights wnpNKjwxRVe3W8jam398Ow 1 0 13059 0 6.4mb 6.4mb
目前可以添加三类示例数据:
(1) 电子商务订单(eCommerce orders)
包括产品相关信息,比如成本、利润、价格等。
(2)网站日志(Web logs)
可以用于分析网站流量。
(3)航空相关数据(Flight data)
查看、分析四家航空公司的数据。
添加完毕后:
