SlideShare a Scribd company logo
ELK Stack - Kibana操作實務
Elasticsearch, Logstash, Kibana一起講不完
從看得見的操作面開始
總管理處資訊管理部 張凱迪
kedy.ch@udngroup.com
1
Outline
• Basic Concept
• Discover
• Visualization
• Dashboard
• Conclusion
2
Kibana
• 有點像Splunk的東西
• 嚴格說起來不能比
• 認真說來也買不起
3
欄位名稱
搜尋條件
符合搜尋條件之事件數分布
符合搜尋條件之事件內容
功能表選單
基礎觀念
4https://kedy.gitbooks.io/elkstack/content/elasticsearch-01.html
5http://log.udngroup.com:9200/_plugin/kopf
基礎觀念
6
• 主要欄位
• @source_host
• @source_host_ip
• @timestamp
• @version
• 資料型態
• 文字
• 地點
• 時間
• 數字
基礎觀念
• Documents in Elasticsearch
• 可以是非結構化型態
• 不定義欄位也可以搜尋跟儲存
• 但不好分析 (無法視覺化)
• 要定義欄位
7
Discover
8
Discover
9
• 關鍵字搜尋
• 邏輯運算子
• 指定欄位
• 數值範圍
• 可組合運用
現在有什麼
• 假單(IIS5)
• type: iis5
• Oracle ERP (Apache)
• type: apache
• Paloalto (類syslog)
• type: paloalto
• 當logstash grok解析錯誤時會加上tag: _grokparsefailure
10
1973年 蔣經國於行政院長任內公開演講
• 當時工商界的困境
• 政府借錢給企業,限定用在工業商業活動
• 醬油的錢就是買醬油、買醋的錢就是買醋
11
12
賺錢要正當、用錢要恰當
• 日誌分析也是
• IIS的response就是IIS的response
• Apache的response就是apache的response
• 不能混為一談
• type要限定好
13
基礎觀念
• 先清楚什麼type存什麼log
• 框好圈圈, 找到結果才正確
• 預期要找IIS server Reponse=500
• 使用使用resposne: 500去找
• 結果會有一堆apache的response:500 (因為都是response欄位)
• 建議搜尋都要指定好type
• 同時看不同設備 再用布林運算 OR 同時呈現不同條件
14
Discover-搜尋
• SourceAddress: “10.201.80.51”
• 聯經數位假單系統測試主機
• 每分鐘觸發6000筆事件紀錄,累計約6300萬筆
15
Discover-搜尋
• SourceAddress: “10.201.80.51”
• 聯經數位假單系統測試主機
• 每天觸發50萬到100萬次不等,聞到怪怪的味道
• 接著查連去哪、做什麼(才有前面的故事可以講)
16
Discover-搜尋
• 好
亂
喔
17
Discover-搜尋
• 顯示特定欄位-欄位後方按下add
18
•常用的搜尋做完記得存檔
• 關鍵字搜尋
• 邏輯運算子
• 指定欄位
• 數值範圍
• 可組合運用
操作時間
1. ERP非200 OK回應數量比例
• Tip: 從左側欄位列看比例
2. 外部存取ERP 回應為
404 not found最多是誰
3. 假單70851取得請假紀錄次數
• Tip: GetPersonalLeave.asp
• Tip: txtUserID
4. 今年八月PA commit次數
• 要求: 只顯示日期、命令
5. 今年八月PA email密碼嘗試
• POP3, SMTP, IMAP比例
• 先觀察,用直覺累積經驗 19
• ERP系統非200 OK回應
• type: apache AND NOT tags:"_grokparsefailure" AND NOT
response:200
操作時間1
20
操作時間2
• 外部存取ERP 回應為404 not found最多是誰
• type: apache AND NOT tags:"_grokparsefailure" AND
response:404 AND NOT clientip:10.*
• RFC定義之private IP更廣, 可自行嘗試
21
操作時間3
• 假單70851取得請假紀錄
• Tip: GetPersonalLeave.asp
• Tip: txtUserID
• type: iis5 AND NOT tags:"_grokparsefailure" AND
"GetPersonalLeave.asp" AND "txtUserID=70851"
22
收件匣清單程式
取得趕快核數量
個人請假報表清單程式
取得員工請假紀錄
計算工作誌列追事項數量
操作時間4
• 今年八月PA commit紀錄、只顯示日期、命令
• type: paloalto AND Type:CONFIG AND NOT
tags:_grokparsefailure AND Cmd:commit
23
操作時間5
• PA email密碼暴力嘗試紀錄
• type: paloalto AND Type:Threat AND ThreatID:"MAIL: User
Login Brute Force Attempt(40007)“
24
操作時間5
• PA email密碼暴力嘗試紀錄
• 沒看到IMAP!?
• type: paloalto AND Type:Threat AND ThreatID:"MAIL: User
Login Brute Force Attempt(40007)" AND NOT
(Application:smtp OR Application:pop3)
25
Visualize
26
27
Visualize-視覺化
• 建立視覺化搜尋
• 選定視覺化類型
• 設定呈現內容
• Y軸
• 加總, 計算, 統計
• X軸
• 分線, 分圖, 堆疊
• 站在自己肩膀上
• 儲存再利用
28
Area chart
• 以面積堆疊方式呈現結果
29
Data table
• 簡單來說 就是個表格
30
Line chart
• 可以想成面積個別不堆疊
31
Markdown widget
32
Metric
• 簡易計算結果呈現
• 加減乘除標準差
• 最大最小平均值
33
Pie chart
• 其實就是圓餅圖
34
Pie chart
• 其實就是圓餅圖
• 可以看更多
35
Tile map
• 資料型態需為geoip
36
Vertical bar chart
• 垂直霸圖
37
Vertical bar chart
• 垂直霸圖
• 分霸一下
• 比較霸氣
38
Visualize-視覺化
• 建立視覺化搜尋
• 選定視覺化類型
• 設定呈現內容
• Y軸
• 加總, 計算, 統計
• X軸
• 分線, 分圖, 堆疊
• 站在自己肩膀上
• 儲存再利用
39
操作時間
1. 用Mertic算出PA九月前七天傳輸總量(收/送/總和)
2. 用Data table做九月前七天傳輸總量來源IP前10名
3. 用Line chart做九月前七天傳輸總量來源IP前10名
4. 用Pie chart做九月前七天傳輸總量來源IP前10名
• 多展現該IP使用的Application
5. 自由發揮
40
操作時間1
• 前面就有囉
• 有認真聽嗎
41
操作時間2
• 用Data table做九月前七天傳輸總量來源IP前10名
42
• 用Line chart做九月前七天傳輸總量來源IP前10名
操作時間3
43
操作時間3
• 用Line chart做九月前七天傳輸總量來源IP前10名
44
操作時間4
• 用Pie chart做九月前七天傳輸總量來源IP前10名
45
操作時間4
• 用Pie chart做九月前七天傳輸總量來源IP前10名
• 多展現該IP使用的Application
46
Dashboard
47
Dashboard-儀錶板
• 要看的東西太多了
• IP 流量 應用程式 威脅數量 威脅種類 內容….
• 一個一個看視覺化會切到俗翹翹
• 看這個我已經忘了前一個是什麼
• 身為網管人,要「綜觀全局」
• 一次看多一點
48
Dashboard-儀錶板
49
• 視覺化做好要存檔
• 直接call來用比較快
Dashboard-儀錶板
50
• 可以拖放尺寸位置、做完記得存檔
操作時間
• 青菜蘿蔔各有所好,沒有絕對好壞對錯。
• 適合判讀的儀表,就是好儀表。
• 請由存檔的視覺,製作儀表並解釋其意義。
51
Conclusion
• Kibana結合Elasticsearch成為分析資料快速上手的工具
• 正確搜尋是一切根基
• Garbage in garbage out
• 基於搜尋建立有意義的視覺分析
• 日誌分析是最基本功能
• 每門日誌都是一門學問
• 匯聚有效的視覺分析,建立易於判讀的儀表板
52

More Related Content

What's hot

Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
Flink Forward
 
A Technical Introduction to WiredTiger
A Technical Introduction to WiredTigerA Technical Introduction to WiredTiger
A Technical Introduction to WiredTiger
MongoDB
 
Introduction To Kibana
Introduction To KibanaIntroduction To Kibana
Introduction To Kibana
Jen Stirrup
 
Introduction to Kibana
Introduction to KibanaIntroduction to Kibana
Introduction to Kibana
Vineet .
 
Elk devops
Elk devopsElk devops
Elk devops
Ideato
 
Understanding Query Plans and Spark UIs
Understanding Query Plans and Spark UIsUnderstanding Query Plans and Spark UIs
Understanding Query Plans and Spark UIs
Databricks
 
An Intro to Elasticsearch and Kibana
An Intro to Elasticsearch and KibanaAn Intro to Elasticsearch and Kibana
An Intro to Elasticsearch and Kibana
ObjectRocket
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Databricks
 
Optimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL JoinsOptimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL Joins
Databricks
 
[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영
NAVER D2
 
Hyperspace for Delta Lake
Hyperspace for Delta LakeHyperspace for Delta Lake
Hyperspace for Delta Lake
Databricks
 
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Edureka!
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
Yoshinori Matsunobu
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco
Angel Borroy López
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Flink Forward
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
Owen O'Malley
 
Elastic search overview
Elastic search overviewElastic search overview
Elastic search overview
ABC Talks
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache Spark
Databricks
 
Elastic Stack Introduction
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction
Vikram Shinde
 

What's hot (20)

Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
 
A Technical Introduction to WiredTiger
A Technical Introduction to WiredTigerA Technical Introduction to WiredTiger
A Technical Introduction to WiredTiger
 
Introduction To Kibana
Introduction To KibanaIntroduction To Kibana
Introduction To Kibana
 
Introduction to Kibana
Introduction to KibanaIntroduction to Kibana
Introduction to Kibana
 
Elk devops
Elk devopsElk devops
Elk devops
 
Understanding Query Plans and Spark UIs
Understanding Query Plans and Spark UIsUnderstanding Query Plans and Spark UIs
Understanding Query Plans and Spark UIs
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
An Intro to Elasticsearch and Kibana
An Intro to Elasticsearch and KibanaAn Intro to Elasticsearch and Kibana
An Intro to Elasticsearch and Kibana
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
 
Optimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL JoinsOptimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL Joins
 
[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영[236] 카카오의데이터파이프라인 윤도영
[236] 카카오의데이터파이프라인 윤도영
 
Hyperspace for Delta Lake
Hyperspace for Delta LakeHyperspace for Delta Lake
Hyperspace for Delta Lake
 
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
 
Elastic search overview
Elastic search overviewElastic search overview
Elastic search overview
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache Spark
 
Elastic Stack Introduction
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction
 

Similar to ELK Stack - Kibana操作實務

Elastic stack day-1
Elastic stack day-1Elastic stack day-1
Elastic stack day-1
YI-CHING WU
 
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledgeLinux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
Angel Boy
 
Introduction to big data
Introduction to big dataIntroduction to big data
Introduction to big data
邦宇 叶
 
⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨
Wen-Tien Chang
 
改善Programmer生活的sql技能
改善Programmer生活的sql技能改善Programmer生活的sql技能
改善Programmer生活的sql技能Rack Lin
 
Binary exploitation - AIS3
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3
Angel Boy
 
做自己的可可豆夾 @ cocoahead.tw
做自己的可可豆夾 @ cocoahead.tw做自己的可可豆夾 @ cocoahead.tw
做自己的可可豆夾 @ cocoahead.tw
Kai-Yuan Cheng
 
Comment System of 56.com
Comment System of 56.comComment System of 56.com
Comment System of 56.com
Ho Kim
 
网站离线数据安全分析漫谈 2012cert
网站离线数据安全分析漫谈 2012cert网站离线数据安全分析漫谈 2012cert
网站离线数据安全分析漫谈 2012cert
ph4nt0m
 
Spark tutorial
Spark tutorialSpark tutorial
Spark tutorial
Lin JiaMing
 
Data Analyse Black Horse - ClickHouse
Data Analyse Black Horse - ClickHouseData Analyse Black Horse - ClickHouse
Data Analyse Black Horse - ClickHouse
Jack Gao
 
美团前端架构简介
美团前端架构简介美团前端架构简介
美团前端架构简介pan weizeng
 
scrapy+sphinx搭建搜索引擎
scrapy+sphinx搭建搜索引擎scrapy+sphinx搭建搜索引擎
scrapy+sphinx搭建搜索引擎Ping Yin
 
合久必分,分久必合
合久必分,分久必合合久必分,分久必合
合久必分,分久必合
Qiangning Hong
 
Template mb-kao
Template mb-kaoTemplate mb-kao
Template mb-kaoxwcoder
 
QCon - 一次 Clojure Web 编程实战
QCon - 一次 Clojure Web 编程实战QCon - 一次 Clojure Web 编程实战
QCon - 一次 Clojure Web 编程实战
dennis zhuang
 
淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践丁 宇
 

Similar to ELK Stack - Kibana操作實務 (20)

Elastic stack day-1
Elastic stack day-1Elastic stack day-1
Elastic stack day-1
 
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledgeLinux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
 
Introduction to big data
Introduction to big dataIntroduction to big data
Introduction to big data
 
⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨
 
改善Programmer生活的sql技能
改善Programmer生活的sql技能改善Programmer生活的sql技能
改善Programmer生活的sql技能
 
Binary exploitation - AIS3
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3
 
做自己的可可豆夾 @ cocoahead.tw
做自己的可可豆夾 @ cocoahead.tw做自己的可可豆夾 @ cocoahead.tw
做自己的可可豆夾 @ cocoahead.tw
 
Comment System of 56.com
Comment System of 56.comComment System of 56.com
Comment System of 56.com
 
网站离线数据安全分析漫谈 2012cert
网站离线数据安全分析漫谈 2012cert网站离线数据安全分析漫谈 2012cert
网站离线数据安全分析漫谈 2012cert
 
Win dbg入门
Win dbg入门Win dbg入门
Win dbg入门
 
Windbg入门
Windbg入门Windbg入门
Windbg入门
 
Spark tutorial
Spark tutorialSpark tutorial
Spark tutorial
 
Data Analyse Black Horse - ClickHouse
Data Analyse Black Horse - ClickHouseData Analyse Black Horse - ClickHouse
Data Analyse Black Horse - ClickHouse
 
美团前端架构简介
美团前端架构简介美团前端架构简介
美团前端架构简介
 
Javascript
JavascriptJavascript
Javascript
 
scrapy+sphinx搭建搜索引擎
scrapy+sphinx搭建搜索引擎scrapy+sphinx搭建搜索引擎
scrapy+sphinx搭建搜索引擎
 
合久必分,分久必合
合久必分,分久必合合久必分,分久必合
合久必分,分久必合
 
Template mb-kao
Template mb-kaoTemplate mb-kao
Template mb-kao
 
QCon - 一次 Clojure Web 编程实战
QCon - 一次 Clojure Web 编程实战QCon - 一次 Clojure Web 编程实战
QCon - 一次 Clojure Web 编程实战
 
淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践
 

ELK Stack - Kibana操作實務

Editor's Notes

  1. ERP 1,506,249 type: apache AND NOT tags:"_grokparsefailure" 2016-01-20 00:00:00.000 2016-04-21 00:00:00.000 假單 28,482,059 type: iis5 AND NOT tags:"_grokparsefailure“ 2013-12-30 00:00:00.000 2016-02-20 00:00:00.000