ElasticSearch插件安装
一、安裝Kiabna
Kibana是一個(gè)為 ElasticSearch 提供的數(shù)據(jù)分析的 Web 接口。可使用它對(duì)日志進(jìn)行高效的搜索、可視化、分析等各種操作。
Kiabna的介紹可查考官方的說(shuō)明:https://www.elastic.co/cn/products/kibana
下載地址為:https://www.elastic.co/cn/downloads/kibana
下載解壓后:
修改config / kibana.yml文件,加入以下內(nèi)容:
把注釋去掉,并修改如下:
然后執(zhí)行bin目錄下的kibana.bat啟動(dòng)服務(wù)
瀏覽器訪問(wèn)地址:http://127.0.0.1:5601/
出現(xiàn)警告
Unabletofetchmapping.Doyouhaveindicesmatchingthepattern?
解決辦法:利用kibana中的Dev Tools 進(jìn)入https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html
PUT /logstash-2015.05.18
{
"mappings": {
"log": {
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
}
}
PUT /shakespeare
{
"mappings" : {
"_default_" : {
"properties" : {
"speaker" : {"type": "keyword" },
"play_name" : {"type": "keyword" },
"line_id" : { "type" : "integer" },
"speech_number" : { "type" : "integer" }
}
}
}
}
執(zhí)行以下,然后在返回到kibana首頁(yè),就會(huì)發(fā)現(xiàn)不會(huì)出現(xiàn)警告了!!!
然后點(diǎn)擊"Create"
二、下載安裝x-pack
x-pack是elasticsearch的一個(gè)擴(kuò)展包,將安全,警告,監(jiān)視,圖形和報(bào)告功能捆綁在一個(gè)易于安裝的軟件包中,雖然x-pack被設(shè)計(jì)為一個(gè)無(wú)縫的工作,但是你可以輕松的啟用或者關(guān)閉一些功能,X-Pack主要是添加身份權(quán)限的驗(yàn)證,
以及原先需要安裝其他各種Marvel、Head等各種功能插件添加到Kibana上使用才能使用的功能。
1、直接下載安裝
轉(zhuǎn)到elasticsearchin目錄:
打開命令框輸入:elasticsearch-plugin install x-pack
如果不需要該插件,也可以通過(guò)非常簡(jiǎn)單的方式刪除:
卸載:elasticsearch-plugin remove x-pack
2、也可以先下載文件再安裝
下載路徑:https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.5.2.zip
轉(zhuǎn)到elasticsearchin目錄:
打開命令框輸入:elasticsearch-plugin install file:///D:workElasticSearchx-pack-5.5.2.zip
重新啟動(dòng)elasticsearch報(bào)下面的錯(cuò)誤:
moreCaused by: java.io.FileNotFoundException: //./pipe/controller_log_4992 (系統(tǒng)找不到指定的文件。)在網(wǎng)上找了半天才找到解決方法
在網(wǎng)上查詢資料
在Elasticsearch/config/elasticsearch.yml加入以下參數(shù):
#action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*
xpack.security.enabled:true
xpack.monitoring.enabled: false
xpack.graph.enabled: false
xpack.watcher.enabled: false
xpack.ml.enabled: false
再次啟動(dòng)
成功運(yùn)行
然后在Kibana中也安裝x-pack,安裝方式如下:
直接命令安裝:kibana-plugin install x-pack
卸載:kibana-plugin remove x-pack
或下載后安裝
安裝命令:kibana-plugin install file:///D:workElasticSearchx-pack-5.5.2.zip
啟動(dòng)ElasticSearch服務(wù)和kibana.bat
打開瀏覽器,輸入:http://127.0.0.1:5601
會(huì)自動(dòng)彈出登錄框,輸入初始用戶名和密碼
用戶名:elastic
密碼:changeme
登錄到Kibana會(huì)發(fā)現(xiàn) elastic是一個(gè)最高級(jí)別的user,擁有所有權(quán)限,其角色是superuser。
當(dāng)然在這里我們也可以添加自定義的用戶,并為其分配角色,不同的角色對(duì)應(yīng)不同的功能。
三、安裝Logstash
Logstash是一款輕量級(jí)的日志搜集處理框架,可以方便的把分散的、多樣化的日志搜集起來(lái),并進(jìn)行自定義的處理,然后傳輸?shù)街付ǖ奈恢茫热缒硞€(gè)服務(wù)器或者文件。
官網(wǎng)下載地址為:https://www.elastic.co/downloads/logstash
下載下來(lái)之后,解壓如下:
然后添加配置文件:first-pipeline.conf
添加內(nèi)容
然后啟動(dòng)服務(wù):logstash.bat-ffirst-pipeline.conf
四、ElasticsearchSQL查詢插件
Elasticsearch-sql 是給予es的提供sql查詢服務(wù)。你可以很方便的用sql的方式查詢es的數(shù)據(jù)。不必困擾于ES變態(tài)的查詢表達(dá)式,同時(shí)提供了超越sql的功能。Github地址:https://github.com/NLPchina/elasticsearch-sql/
安裝命令:elasticsearch-plugininstallhttps://github.com/NLPchina/elasticsearch-sql/releases/download/5.5.1.0/elasticsearch-sql-5.5.1.0.zip
然后下載客戶端 :https://github.com/NLPchina/elasticsearch-sql/releases
總結(jié)
以上是生活随笔為你收集整理的ElasticSearch插件安装的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 什么是I帧,P帧,B帧
- 下一篇: 【编译原理】自顶向下的递归下降语法分析器