<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[elkplus - Medium]]></title>
        <description><![CDATA[ELKPlus=ElasticSearch+Logstash+Kibana+Plugins+APPs - Medium]]></description>
        <link>https://medium.com/elkplus?source=rss----a245940b550f---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>elkplus - Medium</title>
            <link>https://medium.com/elkplus?source=rss----a245940b550f---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 19 May 2026 14:59:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/elkplus" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[在Web log 中找到駭客]]></title>
            <link>https://medium.com/elkplus/%E5%9C%A8web-log-%E4%B8%AD%E6%89%BE%E5%88%B0%E9%A7%AD%E5%AE%A2-6ee6f7802a63?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/6ee6f7802a63</guid>
            <category><![CDATA[bimap]]></category>
            <category><![CDATA[logstash]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Wed, 04 Oct 2017 10:00:54 GMT</pubDate>
            <atom:updated>2017-10-04T10:03:58.239Z</atom:updated>
            <content:encoded><![CDATA[<p>在IIS 的method 經常看見的是GET 和POST 的方式訪問網頁， 頂多有HEAD 等，多種method， 這下子該有的防護，就應該完整了</p><p>圖一：在10分鐘內，發現有8000 多筆異常的訪問</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*oenT5a89VOIPb8GSzqFWSg.png" /></figure><p>所有出現的異常method</p><pre>UPDATE<br>UNSUBSCRIBE<br>UNLOCK<br>UNCHECKOUT<br>TRACK<br>TRACE<br>TESTZZZ<br>SUBSCRIBE<br>SEARCH<br>RPC_OUT_DATA<br>RPC_IN_DATA<br>REPORT<br>PUT<br>PROPPATCH<br>PROPFIND<br>POST<br>POLL<br>PATCH<br>ORDERPATCH<br>OPTIONS<br>NOTIFY<br>MOVE<br>MKWORKSPACE<br>MKCOL<br>MKACTIVITY<br>MERGE<br>LOCK<br>LABEL<br>INDEX<br>HEAD<br>GET<br>DELETE<br>DEBUG<br>COPY<br>CONNECT<br>CHECKOUT<br>CHECKIN<br>BPROPPATCH<br>BPROPFIND<br>BMOVE<br>BDELETE<br>BCOPY<br>ACL</pre><p>看到 一個奇怪的IP 在10分鐘內， 用盡所有的方法訪問網頁， 應該列為黑名單還是白名單中，好好監管</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UovXgk-qz5uUMR4X3tZslA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ee6f7802a63" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/%E5%9C%A8web-log-%E4%B8%AD%E6%89%BE%E5%88%B0%E9%A7%AD%E5%AE%A2-6ee6f7802a63">在Web log 中找到駭客</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[在logstash 中計算時間差的ruby code]]></title>
            <link>https://medium.com/elkplus/%E5%9C%A8logstash-%E4%B8%AD%E8%A8%88%E7%AE%97%E6%99%82%E9%96%93%E5%B7%AE%E7%9A%84ruby-code-2f7498c3c01d?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/2f7498c3c01d</guid>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[logstash]]></category>
            <category><![CDATA[splunk]]></category>
            <category><![CDATA[big-data-analytics]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Sun, 01 Oct 2017 13:02:26 GMT</pubDate>
            <atom:updated>2017-10-01T13:02:26.371Z</atom:updated>
            <content:encoded><![CDATA[<p>在log 中， 經常出現2個時間，例如為開始時間和結束時間， 在導入elasticsearch 中，在logstash 中， 需要增加一個將時間差的欄位，無需另外的撰寫其他的落地程式。</p><pre>&quot;<a href="http://twitter.com/timestamp">@timestamp</a>&quot;: &quot;2015-10-20T13:52:47.000Z&quot; # this is when the host says the event occurred<br>&quot;received_at&quot;: &quot;2015-10-20T02:02:51.191Z&quot; # this is when Logstash forwarder received the event</pre><p>ruby code 範例</p><pre>filter {<br>  if [received_at] and [<a href="http://twitter.com/timestamp">@timestamp</a>] {<br>  # calculate the time difference in seconds between two different timestamps and add return to event as a new field<br>    ruby {<br>      init =&gt; &quot;require &#39;time&#39;&quot;<br>      code =&gt; &quot;event[&#39;time_difference&#39;]= (Time.parse(event[&#39;received_at&#39;]).to_i) - (Time.parse(event[&#39;<a href="http://twitter.com/timestamp">@timestamp</a>&#39;]).to_i)&quot;<br>      add_tag =&gt; [ &quot;calculated_time_difference&quot; ]<br>    }<br>  }<br>}</pre><p>原始<a href="https://discuss.elastic.co/t/logstash-ruby-filter-to-subtract-difference-between-two-timestamps-in-single-event/32580">範例說明：</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f7498c3c01d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/%E5%9C%A8logstash-%E4%B8%AD%E8%A8%88%E7%AE%97%E6%99%82%E9%96%93%E5%B7%AE%E7%9A%84ruby-code-2f7498c3c01d">在logstash 中計算時間差的ruby code</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[誰在用ELK]]></title>
            <link>https://medium.com/elkplus/%E8%AA%B0%E5%9C%A8%E7%94%A8elk-d8924de3c7b6?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/d8924de3c7b6</guid>
            <category><![CDATA[bimap]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[apm]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Thu, 15 Jun 2017 15:38:13 GMT</pubDate>
            <atom:updated>2017-06-16T01:40:57.474Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>數據及分析軟件供應商Elastic最近宣布旗下Elastic Stack的總下載量已突破一億大關。Elastic的產品除了是解決搜索、紀錄、保安分析、指標分析、營運分析等任務為首的關鍵應用，更被用作建立實時及可擴充的數據應用程式。</em></blockquote><h4><a href="http://itpromag.com/2017/03/12/elastic/">ELASTIC的ELASTIC STACK下載量突破1億</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eMxduvS1HeoMYP5UdzujrQ.jpeg" /><figcaption>圖片來自網路</figcaption></figure><h4><a href="https://www.elastic.co/use-cases/sprint">美國通訊服務公司 Sprint</a></h4><pre>通訊服務巨頭Sprint致力於創造更多更好的方式將客戶與他們最關心的事物聯繫起來。廣泛認可的開發，工程和部署新技術，包括來自美國國家運營商的第一個無線4G服務和全球一級互聯網骨幹，其對創新的承諾深深依賴於其數據。 Sprint知道，提高他們在這個競爭激烈的行業中的地位取決於從孤島解鎖數據。Elastic stack 使得創新成為可能。<br><br>Elastic 使公司能夠從任何來源，以任何格式攝取，搜索，分析和可視化實時數據，並立即分享以驅動關鍵業務決策。Sprint改進了客戶服務，並將問題解決時間從網站錯誤和零售中斷到銷售和營銷請求 - 從幾小時或幾天到幾分鐘甚至幾秒鐘的時間。他們也增加了銷售，通過Sprint.com的新手機銷售迅速攀升。</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7ByOEpjIuA5ufw-BqZs9g.jpeg" /><figcaption>圖片來自網路</figcaption></figure><h4><a href="https://read01.com/BG2xJ7.html">趨勢科技</a></h4><blockquote><em>團隊目前開發技術棧是：Python + MySQL + MongoDB + Redis + ELK + Hadoop。技術上需求主要有兩個，海量數據的處理和新技術方案的快速落地。移動安全作為新興的安全領域，近些年來得以快速崛起：要處理的樣本信息迅速從GB級別激增至PB級。同時為適應各種業務，配套的新技術方案也源源不斷從預演階段快速疊代至生產環境。在滿足業務增長需要的情況下，如何能合理有效的利用和管理資源是首要問題。具體來說，在資源共享和有效隔離的情況下，如何實現海量數據的分布式存儲、索引以及快速分析查詢。</em></blockquote><h4><a href="http://www.ithome.com.tw/news/89686">不怕爆量Log日增1億筆，華碩用開源搜尋引擎自製大資料平臺</a></h4><blockquote>華碩在2014年4月，採用Log蒐集儲存和解析的Logstash、企業級分析引擎Solr，以及提供視覺化報表功能的Kibana，還有用開源記憶體式資料庫Redis做為緩衝，來解決大量的Log資料處理與分析。</blockquote><h4><a href="http://2016.hadoopcon.org/wp/?p=120">ETC 資料的大數據應用與分析</a></h4><blockquote><em>將 ETC 的資料引入 Hadoop eco-system 存放，ElasticSearch 做<br>real-time 的呈現，並分析 ETC 的資料後提供特定路段的行車時間預測。</em></blockquote><h4><a href="http://tprc.tanet.edu.tw/tp1rc2016/105report.pptx">教育部資安防護中心</a>： PPT 下載</h4><ul><li>需要快速分析攻擊來源與型態</li><li>使用 Big Data 分析工具: ELK Stack</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wyVRFfv1uvSMUZ0QTFBZCA.png" /></figure><h4><a href="http://blog.91app.com/use-elk-to-process-system-log/">91APP 如何利用 ELK 處理系統巨量 Log</a></h4><p>從商業與營運角度出發，必須分析 Log 的內容，才能滿足下列需求：</p><ul><li><strong>攻擊事件分析：</strong>針對網路存取做分析處理，是資訊安全重要工作之一。常見做法為：定期分析所有服務 Log，檢視網路攻擊可能事件，如：大量異常 URL 存取等。透過營運人員不斷監控、回報、改善，才能提升系統安全。</li><li><strong>異常即時監控</strong>：當系統發生異常時，營運人員需要在第一時間快速通報。又或事後追查原因，都需要從 Log 檔分析著手。</li><li><strong>系統狀態與容量</strong>：管理階層需要基於統整系統狀態報表，做出對應決策。如：由系統使用率決定主機升級等。</li></ul><h4><a href="http://techshow.ctrip.com/archives/1042.html">携程ELK日志分析平台深耕之路</a></h4><blockquote>日誌，看似簡單簡單的文本，在網站運維人員眼裡卻似一座蘊含豐富的寶藏。<br>從2013年攜程網站運營中心成立伊始，集中化的運維日誌分析平台就被提上議事日程。作為中國最大的OTA網站，攜程基礎設施每日產生的各類日誌有好幾十種，量級在數個TB級別，如果採用Splunk這樣的商業軟件，每年的授權費用就要近千萬。昂貴的授權費用驅使我們深入研究這個領域，尋求商業軟件以外的替代方案。</blockquote><h4><a href="http://conf.elasticsearch.cn/2015/beijing.html">Sina ELK，從運維到服務之路</a></h4><blockquote><em>ELK服務作為一個日誌的解決方案，解決了大家在運維中日誌集中管理，分析， 檢索和可視化等多樣化的需求，簡單方便的實現也受到了廣大互聯網行業用戶的推崇。 但是，當服務的規模不斷擴大後，如何保證集群穩定性和性能，如何標準化日誌的管理， 以及給用戶提供簡單更實用的產品還是有很大的挑戰的。該演講主要和大家分享新浪/微博在ELK的實踐中從運維， 到平台建設，產品設計三個階段的心得和感悟，以及集群規模從幾台發展到50+台的過程中，我們遇到的問題和踩過的坑。</em></blockquote><p>集先鋒科技有限公司提供專業服務</p><ul><li>ELK 系統架構建置</li><li>ELK 使用的養成和培訓</li><li>ELK 客製化的開發</li><li>ELK 系統維護</li><li>大數據分析服務</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vroCRks7XiWyP8cdpCspFg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8924de3c7b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/%E8%AA%B0%E5%9C%A8%E7%94%A8elk-d8924de3c7b6">誰在用ELK</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[用ELK 的來追蹤SiteUptime 工作狀態]]></title>
            <link>https://medium.com/elkplus/%E7%94%A8elk-%E7%9A%84%E4%BE%86%E8%BF%BD%E8%B9%A4siteuptime-%E5%B7%A5%E4%BD%9C%E7%8B%80%E6%85%8B-4934b1a0c3f2?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/4934b1a0c3f2</guid>
            <category><![CDATA[bimap]]></category>
            <category><![CDATA[apm]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Mon, 12 Jun 2017 04:20:17 GMT</pubDate>
            <atom:updated>2017-06-12T04:20:17.337Z</atom:updated>
            <content:encoded><![CDATA[<p>SiteUptime 提供遠端的網站監控功能，以數個網路節點定時檢查網站是否出錯，當網站一發生狀況無法連線時，SiteUptime 就會即時以 E-Mail 通知您，減短您網站無法連線的時間。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*JxZHgzjqYf9kJKfCXui0Eg.png" /></figure><h4>訪問方式和訪問間隔</h4><ul><li>使用HEAD， 只取得head 的資料</li><li>平均15分鐘訪問一次</li><li>訪問三個地址</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbrzicOT01MjvqDdk7lt0Q.png" /></figure><h4>從那些國家訪問</h4><p>－主要從6個國家訪問， 主要來自新加坡和美國</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XCq_3-WbDSXK59I6mfiowg.png" /></figure><h4>訪問的IP</h4><ul><li>共訪問552 次， 來自18個IP</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K28JKVgxxe3TsDRGAPO6qQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uYBx7FD5p18FMTocCyNquQ.png" /></figure><h4>訪問的狀態</h4><ul><li>404 無法訪問的內容比例最大</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dGWEOx8YZIkZb0_fOIbtSw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4934b1a0c3f2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/%E7%94%A8elk-%E7%9A%84%E4%BE%86%E8%BF%BD%E8%B9%A4siteuptime-%E5%B7%A5%E4%BD%9C%E7%8B%80%E6%85%8B-4934b1a0c3f2">用ELK 的來追蹤SiteUptime 工作狀態</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[常用mutate 的命令範例]]></title>
            <link>https://medium.com/elkplus/%E5%B8%B8%E7%94%A8mutate-%E7%9A%84%E5%91%BD%E4%BB%A4%E7%AF%84%E4%BE%8B-e4526ebb9754?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/e4526ebb9754</guid>
            <category><![CDATA[logstash]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Mon, 12 Jun 2017 02:18:37 GMT</pubDate>
            <atom:updated>2017-06-12T02:18:37.014Z</atom:updated>
            <content:encoded><![CDATA[<h4>add_field</h4><pre>filter {<br>  mutate {<br>    add_field =&gt; { &quot;foo_%{somefield}&quot; =&gt; &quot;Hello world, from %{host}&quot; }<br>  }<br>}</pre><pre># You can also add multiple fields at once:<br>filter {<br>  mutate {<br>    add_field =&gt; {<br>      &quot;foo_%{somefield}&quot; =&gt; &quot;Hello world, from %{host}&quot;<br>      &quot;new_field&quot; =&gt; &quot;new_static_value&quot;<br>    }<br>  }<br>}</pre><h4>convert</h4><pre>filter {<br>  mutate {<br>    convert =&gt; { &quot;fieldname&quot; =&gt; &quot;integer&quot; }<br>  }<br>}</pre><h4>remove_field</h4><pre>filter {<br>  mutate {<br>    remove_field =&gt; [ &quot;foo_%{somefield}&quot; ]<br>  }<br>}</pre><pre># You can also remove multiple fields at once:<br>filter {<br>  mutate {<br>    remove_field =&gt; [ &quot;foo_%{somefield}&quot;, &quot;my_extraneous_field&quot; ]<br>  }<br>}</pre><h4>rename</h4><pre>filter {<br>  mutate {<br>    # Renames the &#39;HOSTORIP&#39; field to &#39;client_ip&#39;<br>    rename =&gt; { &quot;HOSTORIP&quot; =&gt; &quot;client_ip&quot; }<br>  }<br>}</pre><h4>參考資料</h4><ul><li>原創資料</li></ul><p><a href="https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html">Mutate filter plugin | Logstash Reference [8.2] | Elastic</a></p><ul><li>中文IIS範例</li></ul><p><a href="https://dotblogs.com.tw/supershowwei/2016/05/24/142844">[料理佳餚] ELK 搭檔 NXLog 收集 IIS Log | 軟體主廚的程式料理廚房</a></p><ul><li>中文的範例2－ rename</li></ul><p><a href="http://peihsinsu.blogspot.tw/2015/03/logstash-mutate-filter.html">知識過客</a></p><ul><li><strong>mutate split日志切分</strong></li></ul><p><a href="http://xiangcun168.blog.51cto.com/4788340/1661944">logstash mutate split日志切分 - xiangcun168 - 51CTO技术博客</a></p><pre>42.62.45.23 - - [15/Jun/2015:10:27:33 +0800] &quot;GET /www/delivery/aj.php?id=29 HTTP/1.1&quot; 200 10309 &quot;-&quot; &quot;-&quot; &quot;10.72.16.60:80&quot; 0.111 <br>72.62.45.23 - - [15/Jun/2015:10:27:33 +0800] &quot;GET /www/delivery/jo.php?id=29 HTTP/1.1&quot; 200 10309 &quot;-&quot; &quot;-&quot; &quot;10.72.16.60:80&quot; 0.111</pre><p>設定split</p><pre>mutate {<br>    split =&gt; [&quot;http_request&quot; ,&quot;?&quot;]  #http_request以问号为切割点<br>    add_field =&gt; [&quot;request_url&quot;, &quot;%{http_request[0]}&quot;]   #取出数组中第一个值，同时添加request_url为新的field<br>   <br>}</pre><p>重新启动logstash，</p><p>可以看出，我们的日志已经成功切分出来了</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4526ebb9754" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/%E5%B8%B8%E7%94%A8mutate-%E7%9A%84%E5%91%BD%E4%BB%A4%E7%AF%84%E4%BE%8B-e4526ebb9754">常用mutate 的命令範例</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[怎樣讓Logstash每次都從頭讀文件？]]></title>
            <link>https://medium.com/elkplus/%E6%80%8E%E6%A8%A3%E8%AE%93logstash%E6%AF%8F%E6%AC%A1%E9%83%BD%E5%BE%9E%E9%A0%AD%E8%AE%80%E6%96%87%E4%BB%B6-ac57b45fb909?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/ac57b45fb909</guid>
            <category><![CDATA[logstash]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Wed, 07 Jun 2017 15:25:11 GMT</pubDate>
            <atom:updated>2017-06-07T15:24:46.742Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*8Wdx44c8y3-gWur4gFz-ew.png" /></figure><p>每個上手 ELK 的新用戶，肯定都需要測試一下讀取文件輸出到終端這步。</p><p>不過很多新人的測試隨後就卡在第二步了：當你修改一下配置，準備添加一段 filter 配置再重復運行 logstash 命令時，發現終端一直停滯沒有輸出。</p><p>這是因為：Logstash 會記錄自己讀取文件內容的偏移量到一個隱藏文件里，默認情況下，下次啓動，他會從這個偏移量繼續往後讀，避免重復讀取數據。</p><p><a href="https://elasticsearch.cn/article/11">Day1: 怎样让Logstash每次都从头读文件？ - Elastic中文社区</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac57b45fb909" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/%E6%80%8E%E6%A8%A3%E8%AE%93logstash%E6%AF%8F%E6%AC%A1%E9%83%BD%E5%BE%9E%E9%A0%AD%E8%AE%80%E6%96%87%E4%BB%B6-ac57b45fb909">怎樣讓Logstash每次都從頭讀文件？</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iislog 的參數設定]]></title>
            <link>https://medium.com/elkplus/iislog-%E7%9A%84%E5%8F%83%E6%95%B8%E8%A8%AD%E5%AE%9A-3f89db0ab7a?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/3f89db0ab7a</guid>
            <category><![CDATA[weblog]]></category>
            <category><![CDATA[isis]]></category>
            <category><![CDATA[elk]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Wed, 07 Jun 2017 12:03:29 GMT</pubDate>
            <atom:updated>2017-05-26T06:44:05.632Z</atom:updated>
            <content:encoded><![CDATA[<h4>iislog 上的設定畫面選定</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/0*YViE-B_-LBKflTMT." /></figure><h3>iislog 文件的範本</h3><p>預設的用戶提供的iislog 中的參數中， 沒有time taken 的內容</p><pre>Software: Microsoft Internet Information Services 6.0<br>Version: 1.0<br>Date: 2016-06-28 06:05:45<br>Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status</pre><h3>iislog 日誌默認位置和存檔方式：</h3><pre>%systemroot%\system32\logfiles\w3svc1\，默認每天一個日誌</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/0*jauhxSLNfJLTADB0.png" /></figure><h3>iislog 文件產出範本：</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/0*SrYow47QrlEeOLpl.png" /></figure><h3>iislog 時間差的確認</h3><ul><li>如果沒有選定本地時間， 則log 內的時間，和本地時間會有時間差， 一般差別為8小時</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/0*Sg46-5R_E8D4aeqT." /></figure><h3>建議</h3><p>檢查預設的IIS log 設定值，依據不同web的用戶，設定不同的欄位，如果有效能問題，建議增加的內容</p><ul><li>已傳送位元組 (sc-bytes)：伺服器傳送的位元組數。</li><li>已接收位元組 (cs-bytes)：伺服器接收的位元組數。</li><li>花費時間 (time-taken)：動作所花費的時間長度 (毫秒)。</li></ul><p>Note：</p><ul><li>用戶端使用的瀏覽器類型(UserAgent), 除了特殊需求外， 通常分析的價值不大</li><li>Cookie： 可以對開多窗口的應用，可以增加欄位的收集。</li></ul><p>IIS log 欄位說明：</p><ul><li>日期 (date)：發生要求的日期。</li><li>時間 (time)：發生要求的時間，使用國際標準時間 (UTC)。</li><li>用戶端 IP 位址 (c-ip)：提出要求之用戶端的 IP 位址。</li><li>使用者名稱 (cs-username)：存取您的伺服器之已驗證使用者的名稱。匿名使用者會以連字號指示。</li><li>服務名稱 (s-sitename)：完成要求的網站執行個體編號。</li><li>伺服器名稱 (s-computername)：產生記錄檔項目之伺服器的名稱。</li><li>伺服器 IP 位址 (s-ip)：產生記錄檔項目之伺服器的 IP 位址。</li><li>伺服器連接埠 (s-port)：針對服務設定的伺服器連接埠號碼。</li><li>方法 (cs-mothod)：要求的動作，例如 GET 方法。</li><li>URI Stem (cs-uri-stem)：動作的「通用資源識別元」或目標。</li><li>URI 查詢 (cs-rui-query)：用戶端嘗試執行的查詢 (如果有的話)。只有針對動態頁面才需要執行通用資源識別元 (URI) 查詢。</li><li>通訊協定狀態 (sc-status)：HTTP 或 FTP 狀態代碼。</li><li>通訊協定子狀態 (sc-substatus)：HTTP 或 FTP 子狀態代碼。</li><li>Win32 狀態(sc-win32-status)：Windows 狀態代碼。</li><li>已傳送位元組 (sc-bytes)：伺服器傳送的位元組數。</li><li>已接收位元組 (cs-bytes)：伺服器接收的位元組數。</li><li>花費時間 (time-taken)：動作所花費的時間長度 (毫秒)。</li><li>通訊協定版本 (cs-version)：用戶端使用的通訊協定版本，可為 HTTP 或 FTP。</li><li>主機 (cs-host)：主機名稱 。</li><li>使用者代理程式 (cs(UserAgent))：用戶端使用的瀏覽器類型。</li><li>Cookie (cs(Cookie))：已傳送或已接收的 Cookie 內容 (如果有的話)。</li><li>推薦者 (cs(Referer))：使用者上次造訪的網站。此網站提供目前網站的連結。</li></ul><h3>參考資料</h3><ul><li><a href="https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/676400bc-8969-4aa7-851a-9319490a9bbb.mspx?mfr=true">microsoft iis 6.0 說明文件</a></li><li><a href="https://www.iis.net/configreference/system.applicationhost/sites/sitedefaults/logfile">Default Log File Settings for Web Sites</a></li><li><a href="https://technet.microsoft.com/zh-tw/library/hh831775(v=ws.11).aspx">設定 IIS 記錄</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f89db0ab7a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/iislog-%E7%9A%84%E5%8F%83%E6%95%B8%E8%A8%AD%E5%AE%9A-3f89db0ab7a">iislog 的參數設定</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ELK 課程培訓]]></title>
            <link>https://medium.com/elkplus/elk-%E8%AA%B2%E7%A8%8B%E5%9F%B9%E8%A8%93-1076bf9dde5f?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/1076bf9dde5f</guid>
            <category><![CDATA[kibana]]></category>
            <category><![CDATA[logstash]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Thu, 01 Jun 2017 08:38:40 GMT</pubDate>
            <atom:updated>2017-06-01T08:53:54.347Z</atom:updated>
            <content:encoded><![CDATA[<p>8小時學會 Elasticsearch、logstash和Kibana 三個大數據分析三個工具，經由專業的講解和並且實地的演練，讓你進入資料分析的世界。</p><h3>課程簡介：</h3><ul><li>培訓目的： 通過8小時的上課和演練，了解和熟悉ELK 的原理和操作</li><li>培訓日期： 7月20日/7月21日 (13:30 ~ 17:30)</li><li>培訓時間：8小時，分2天完成，每次上課4小時</li><li>ELK 的演練環境：每個人一個獨立的ELK 環境，可以實際操作</li><li>備註：請自帶筆電，以便實際操作</li><li>學員人數：小班制(10人內)</li><li>**<a href="https://docs.google.com/forms/d/1Ac3t4A1MF1ssNB11rWcO2TkYIb4XyS9gpOqH8rM3uZ0/viewform?edit_requested=true#response=ACYDBNj4ikzxHyhxChoFjdL3r__dOjDm5p1rJR6bv3_ZZzF4ahKdd0WK2qKL_m0">報名方式</a>**</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*GNO1StuQb07RqTP9I8Eprw.png" /></figure><h3>第一天：ELK 的基本介紹和操作</h3><p>上課時間： 13:30~17:30</p><p>報到: 13:00</p><p>課程內容：</p><ul><li>ELK 的基本介紹： 30分鐘</li><li>Logstash 基本原理說明： 30分鐘</li><li>ElasticSearch 的原理和操作： 50分鐘</li><li>中間休息： 20分鐘</li><li>Kibana 的 基本操作： 50分鐘</li><li>問題回答和 ELK 安裝(實際操作)： 60分鐘</li></ul><h3>第二天： ELK 演練和實作</h3><p>上課時間： 13:30~17:30</p><p>報到時間: 13:00</p><p>課程內容：</p><ul><li>apache log ELK 實際導入和dashboard 的製作： 60分鐘</li><li>twitter 爬文導入ELK 導入： 50分鐘</li><li>中間休息： 20分鐘</li><li>filebeat, topbeat 介紹.： 50分鐘</li><li>問題回答和 Logstash parsing(實際操作)： 60分鐘</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1076bf9dde5f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/elk-%E8%AA%B2%E7%A8%8B%E5%9F%B9%E8%A8%93-1076bf9dde5f">ELK 課程培訓</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ES 常用查詢語法]]></title>
            <link>https://medium.com/elkplus/es-%E5%B8%B8%E7%94%A8%E6%9F%A5%E8%A9%A2%E8%AA%9E%E6%B3%95-5f223835e255?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/5f223835e255</guid>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Tue, 30 May 2017 03:09:35 GMT</pubDate>
            <atom:updated>2017-07-20T02:51:57.910Z</atom:updated>
            <content:encoded><![CDATA[<p>elasticsearch 是採用 Apache上Lucene的查詢語法，包含<strong>欄位查詢、模糊查詢、鄰近查詢、範圍查詢、語詞權值群組查詢</strong></p><p><strong>字詞定義</strong></p><ul><li>單字例如 “test” 或 “hello”</li><li>雙引號包住的片語，例如 “hello dolly”</li><li>多語詞可以用布林運算子整合在一起來建構一個複雜的查詢</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*L4ziWxCqCpV3V-fK_JQQ2A.jpeg" /></figure><h3><strong>ES的查詢語法範例</strong></h3><h4>欄位的查詢</h4><ul><li>查詢status 包含active 值</li></ul><pre>status:active</pre><ul><li>查詢title 欄位中包含 quick 或是brown 的欄位， 其中的O 可以省列</li></ul><pre>title:(quick OR brown)<br>title:(quick brown)</pre><ul><li>精準查詢 author 欄位中包含 <strong><em>john smith</em></strong></li></ul><pre>author:”John Smith”</pre><ul><li>多欄位的查詢</li></ul><pre>field1:query_term OR field2:query_term </pre><ul><li>Wildcard 查詢， 可以使用wildcard 進行查詢</li></ul><pre>field:(qu?ck bro*)</pre><p><strong>Ranges 的查詢</strong></p><p>範圍的查詢可以指定日期、數字或是字串，同時可以使用</p><pre>[min TO max] : 查詢指定範圍內<br>{min TO max} : 查詢指定範圍外</pre><p>範圍的查詢範例</p><ul><li>All days in 2012:</li></ul><pre>date:[2012–01–01 TO 2012–12–31]</pre><ul><li>Numbers 1..5</li></ul><pre>count:[1 TO 5]</pre><ul><li>Tags 介於alpha 和omega, 但是不包含alpha 和omega:</li></ul><pre>tag:{alpha TO omega}</pre><ul><li>數字從10 以上的值</li></ul><pre>count:[10 TO *]</pre><ul><li>2012年前的日期</li></ul><pre>date:{* TO 2012–01–01}</pre><ul><li>[ 和} 混合查詢: 數字從1開始，但是不包含5 的值</li></ul><pre>count:[1 TO 5}</pre><ul><li>數字範圍查詢：</li></ul><pre>age:&gt;10<br>age:&gt;=10<br>age:&lt;10<br>age:&lt;=10<br>age:(&gt;=10 AND &lt;20)<br>age:(+&gt;=10 +&lt;20)</pre><h4><strong>組合查詢：</strong></h4><pre>(quick OR brown) AND fox<br>status:(active OR pending) title:(full text search)</pre><h4>查詢有包含這個欄位的內容</h4><p>如果有時候有些欄位有內容， 有時候沒有內容, 以下例子是查詢pname3 欄位中， pname3 有內容的值。</p><pre>_exists_:pname3</pre><h4>保留字</h4><p>如果需要查詢保留字，必須加上backslash 以判別保留字， 例如要查詢 (1+1)=2, 語法為 \(1\+1\)\=2.</p><p>保留字:</p><pre> + — = &amp;&amp; || &gt; &lt; ! ( ) { } [ ] ^ “ ~ * ? : \ /</pre><h3>IIS log 的常用的查詢範例</h3><ul><li>查詢cs_status 欄位 相關查詢</li></ul><pre>cs_status:404</pre><pre>cs_status:(404 OR 500)</pre><pre>cs_status:(400 TO 499)</pre><ul><li>查詢WEB07-IIS1 staus 404 和WEB08-IIS2 status 500 的內容</li></ul><pre>s_computername: WEB07 AND cs_status:400</pre><pre>s_computername: WEB08 AND cs_status:500</pre><pre>(s_computername: WEB08 AND cs_status:400 ) AND @timestamp:[2017-04-02 TO 2017-04-23]</pre><ul><li>查詢PriceService.svc 相關內容</li></ul><pre>cs_uri_stem_name:PriceService.svc</pre><pre>cs_uri_stem_name:PriceService.svc AND time_taken:(&gt;=200)</pre><pre>cs_uri_stem_name:PriceService.svc AND time_taken:(&gt;=5000 AND &lt;=10000)</pre><pre>cs_uri_stem_name:PriceService.svc AND time_taken:(&gt;=5000 AND &lt;=10000)  AND @timestamp:[2017-04-02 TO 2017-04-23]</pre><pre>cs_uri_stem_name:(PriceService.svc OR OperationService.svc) AND time_taken:(&gt;=5000 AND &lt;=10000) AND @timestamp:[2017-04-02 TO 2017-04-23]</pre><h3>參考資料</h3><ul><li><a href="http://mednoter.com/all-about-analyzer-part-one.html">Elasticsearch Analyzer 的内部机制</a></li><li><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax">Elastic Query string syntax</a></li><li><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax">Elastic Query String Query</a></li><li><a href="http://blog.xuite.net/garyhuan/programmer/8523257-Lucene%E7%9A%84%E6%9F%A5%E8%A9%A2%E8%AA%9E%E6%B3%95">Lucene的查詢語法</a></li></ul><p><a href="https://github.com/mcandre/cheatsheets/blob/master/lucene.md">mcandre/cheatsheets</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f223835e255" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/es-%E5%B8%B8%E7%94%A8%E6%9F%A5%E8%A9%A2%E8%AA%9E%E6%B3%95-5f223835e255">ES 常用查詢語法</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Log Parser 2.2]]></title>
            <link>https://medium.com/elkplus/log-parser-2-2-4cbbe98d07ee?source=rss----a245940b550f---4</link>
            <guid isPermaLink="false">https://medium.com/p/4cbbe98d07ee</guid>
            <dc:creator><![CDATA[Polin Chen]]></dc:creator>
            <pubDate>Tue, 30 May 2017 00:59:45 GMT</pubDate>
            <atom:updated>2017-05-30T00:59:45.568Z</atom:updated>
            <content:encoded><![CDATA[<p>日誌解析器是一個功能強大的多功能工具，可以對Windows®操作系統上的基於文本的數據（如日誌文件，XML文件和CSV文件）以及關鍵數據源（如事件日誌，註冊表， 文件系統和ActiveDirectory®。 您告訴Log Parser您需要什麼信息以及您希望處理哪些信息。 您的查詢的結果可以在基於文本的輸出中進行自定義格式，或者可以將其持久化到更多的特殊目標，如SQL，SYSLOG或圖表。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*qPt1tpKji2TVuqvjhAqFwQ.jpeg" /><figcaption>source:<a href="https://n0where.net/python-windows-event-log-parser-python-evtx/">https://n0where.net/python-windows-event-log-parser-python-evtx/</a></figcaption></figure><p>參考資料：</p><ul><li><a href="https://www.microsoft.com/en-us/download/details.aspx?id=24659">Log Parser overview</a></li><li><a href="http://blog.miniasp.com/post/2008/10/02/Useful-tool-Powerful-Log-Parser.aspx">介紹好用工具：Log Parser (分析多種 Log 格式的超強工具)</a></li><li><a href="http://blog.miniasp.com/post/2012/03/26/Useful-tool-Log-Parser-Lizard-GUI.aspx">介紹好用工具：Log Parser Lizard GUI (最佳視覺化 LP 工具)</a></li><li><a href="https://blogs.msdn.microsoft.com/friis/2014/02/06/how-to-analyse-iis-logs-using-logparser-logparser-studio/">How to analyse IIS logs using LogParser / LogParser Studio</a></li><li><a href="https://dotblogs.com.tw/jeff-yeh/2009/11/06/11457">開發API用Log Parser來讀取IIS Log</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cbbe98d07ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/elkplus/log-parser-2-2-4cbbe98d07ee">Log Parser 2.2</a> was originally published in <a href="https://medium.com/elkplus">elkplus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>