1、題記
工慾善其事必先利其器,ELK Stack的學習和實戰更是如此,特將工作中用到的“高效”工具分享給大家。
希望能借助“工具”提高開發、運維效率!
2、工具分類概覽
2.1 基礎類工具
1. Head插件
1)功能概述:
ES集羣狀態查看、索引數據查看、ES DSL實現(增、刪、改、查操作)
比較實用的地方:json串的格式化
2)地址:http://mobz.github.io/elasticsearch-head/
2. Kibana工具
除了支持各種數據的可視化之外,最重要的是:支持Dev Tool進行RESTFUL API增刪改查操作。
——比Postman工具和curl都方便很多。
地址:https://www.elastic.co/products/kibana
3. ElasticHD工具
強勢功能——支持sql轉DSL,不要完全依賴,可以借鑑用。
地址:https://github.com/360EntSecGroup-Skylar/ElasticHD
2.2 集羣監控工具
4. cerebro工具
地址:https://github.com/lmenezes/cerebro
5. Elaticsearch-HQ工具
管理elasticsearch集羣以及通過web界面來進行查詢操作
地址:https://github.com/royrusso/elasticsearch-HQ
2.3 集羣遷移工具
6. Elasticsearch-migration工具
支持多個版本間的數據遷移,使用scroll+bulk
地址:https://github.com/medcl/elasticsearch-migration
7. Elasticsearch-Exporter
將ES中的數據向其他導出的簡單腳本實現。
地址:https://github.com/mallocator/Elasticsearch-Exporter
8. Elasticsearch-dump
移動和保存索引的工具。
地址:https://github.com/taskrabbit/elasticsearch-dump
2.4 集羣數據處理工具
9. elasticsearch-curator
elasticsearch官方工具,能實現諸如數據只保留前七天的數據的功能。
地址:https://pypi.python.org/pypi/elasticsearch-curator
另外 ES6.3(還未上線) 有一個 Index LifeCycle Management 可以很方便的管理索引的保存期限。
2.5 安全類工具
10. x-pack工具
地址:https://www.elastic.co/downloads/x-pack
11. search-guard 第三方工具
Search Guard 是 Elasticsearch 的安全插件。它爲後端系統(如LDAP或Kerberos)提供身份驗證和授權,並向Elasticsearch添加審覈日誌記錄和文檔/字段級安全性。
Search Guard所有基本安全功能(非全部)都是免費的,並且內置在Search Guard中。Search Guard支持OpenSSL並與Kibana和logstash配合使用。
地址:https://github.com/floragunncom/search-guard
2.6 可視化類工具
12. grafana工具
地址:https://grafana.com/grafana
grafana工具與kibana可視化的區別:
① 如果你的業務線數據較少且單一,可以用kibana做出很棒很直觀的數據分析。
② 而如果你的數據源很多並且業務線也多,建議使用grafana,可以減少你的工作量
對比:https://www.zhihu.com/question/54388690
2.7 自動化運維工具
elasticsearch免費的自動化運維工具
13. Ansible
https://github.com/elastic/ansible-elasticsearch
14. Puppet
https://github.com/elastic/puppet-elasticsearch
15. Cookbook
https://github.com/elastic/cookbook-elasticsearch
以上三個工具來自medcl大神社區問題的回覆,我沒有實踐過三個工具。
2.8 類SQl查詢工具
16. Elasticsearch-sql 工具
sql 一款國人NLP-china團隊寫的通過類似sql語法進行查詢的工具
地址:https://github.com/NLPchina/elasticsearch-sql
ES6.3+以後的新版本會集成sql。
2.9 增強類工具
17. Conveyor 工具
kibna插件——圖形化數據導入工具
地址:http://t.cn/REOhwGT
18. kibana_markdown_doc_view 工具
Kibana文檔查看強化插件,以markdown格式展示文檔
地址:http://t.cn/REOhKgB
19. indices_view工具
indices_view 是新蛋網開源的一個 kibana APP 插件項目,可以安裝在 kibana 中,快速、高效、便捷的查看elasticsearch 中 indices 相關信息
地址:https://gitee.com/newegg/indices_view
20. dremio 工具
支持sql轉DSL,
支持elasticsearch、mysql、oracle、mongo、csv等多種格式可視化處理;
支持ES多表的Join操作
地址:https://www.dremio.com/
2.10 報警類
21. elastalert
ElastAlert 是 Yelp 公司開源的一套用 Python2.6 寫的報警框架。屬於後來 Elastic.co 公司出品的 Watcher 同類產品。
官網地址: http://elastalert.readthedocs.org/
使用舉例:當我們把ELK搭建好、病順利的收集到日誌,但是日誌裏發生了什麼事,我們並不能第一時間知道日誌裏到底發生了什麼,運維需要第一時間知道日誌發生了什麼事,所以就有了ElastAlert的郵件報警。
22. sentinl
SENTINL 6擴展了Siren Investigate和Kibana的警報和報告功能,使用標準查詢,可編程驗證器和各種可配置操作來監控,通知和報告數據系列更改 - 將其視爲一個獨立的“Watcher” “報告”功能(支持PNG / PDF快照)。
SENTINL還旨在簡化在Siren Investigate / Kibana 6.x中通過其本地應用程序界面創建和管理警報和報告的過程,或通過在Kibana 6.x +中使用本地監視工具來創建和管理警報和報告的過程。
官網地址:https://github.com/sirensolutions/sentinl
3、小結
突然想起魯迅先生筆下的孔乙己“茴香豆的茴字有幾種寫法?”
管幾種寫法,適合自己的工具纔是最好的!
http://t.cn/RB4MVZ0
出處:https://mp.weixin.qq.com/s/s2ema4tIXKcqTNUUhjGt1w