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)
檢視、分析四家航空公司的資料。
添加完畢後: