1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      通過使用filebeat收集mysql慢查詢?nèi)罩驹敿?xì)步驟

      下文主要給大家?guī)硗ㄟ^使用filebeat收集MySQL慢查詢?nèi)罩驹敿?xì)步驟,希望這些內(nèi)容能夠帶給大家實(shí)際用處,這也是我編輯通過使用filebeat收集mysql慢查詢?nèi)罩驹敿?xì)步驟這篇文章的主要目的。好了,廢話不多說,大家直接看下文吧。

      創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè),安國企業(yè)網(wǎng)站建設(shè),安國品牌網(wǎng)站建設(shè),網(wǎng)站定制,安國網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營銷,網(wǎng)絡(luò)優(yōu)化,安國網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力。可充分滿足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

      環(huán)境介紹:
      操作系統(tǒng)版本:CentOS Linux release 7.3.1611 (Core) 64bit
      Mysql版本: 5.6.28
      Logstash版本: logstash 5.3.0
      Elasticsearch版本:elasticsearch 5.3.0
      Kibana版本:Kibana 5.3.0
      Java版本:1.8.0_121

      Mysql版本: 5.6.28及mysql慢日志

      [bash]# Time: 170420 1:41:04
      # User@Host: root[root] @ [192.168.1.178] Id: 2238895756
      # Query_time: 3.887598 Lock_time: 0.000099 Rows_sent: 19 Rows_examined: 19
      SET timestamp=1492623664;
      select * from users_test;
      # User@Host: root[root] @ [192.168.1.178] Id: 2238895828
      # Query_time: 3.161184 Lock_time: 0.000150 Rows_sent: 28 Rows_examined: 28
      SET timestamp=1492623664;
      select * from users_test;
      # Time: 170420 1:41:12[/bash]

      filebeat及l(fā)ogstash配置

      filebeat.yml配置文件

      [bash]filebeat:
      prospectors:
      -
      paths:
      - /data/mysql/xxx-slow.log
      document_type: mysqlslow
      multiline:
      pattern: "^# User@Host: "
      negate: true
      match: after
      registry_file: /var/lib/filebeat/registry
      output:
      logstash:
      hosts: ["192.168.1.63:5044"][/bash]

      logstash.conf

      [bash]input {
      beats {
      port => 5044
      }
      }
      filter {
      
      grok {
      match => [ "message", "(?m)^# User@Host: %{USER:query_user}\[[^\]]+\] @ (?:(?\S*) )?\[(?:%{IP:query_ip})?\]\s*Id: %{NUMBER:id:int}\s+# Query_time: %{NUMBER:query_time:float}\s+Lock_time: %{NUMBER:lock_time:float}\s+Rows_sent: %{NUMBER:rows_sent:int}\s+Rows_examined: %{NUMBER:rows_examined:int}\s*(?:use %{DATA:database};\s*)?SET timestamp=%{NUMBER:timestamp};\s*(?(?\w+)\s+.*)" ]
      }
      grok {
      match => { "message" => "# Time: " }
      add_tag => [ "drop" ]
      tag_on_failure =>[]
      }
      if "drop" in [tags] {
      drop {}
      }
      date {
      match => [ "timestamp", "UNIX", "YYYY-MM-dd HH:mm:ss"]
      remove_field => [ "timestamp" ]
      }
      
      }
      output {
      elasticsearch {
      hosts => "192.168.1.63:9200"
      manage_template => false
      index => "%{[@metadata][beat]}-%{[type]}-%{+YYYY.MM.dd}"
      document_type => "%{[@metadata][type]}"
      }
      }[/bash]

      對(duì)于以上關(guān)于通過使用filebeat收集mysql慢查詢?nèi)罩驹敿?xì)步驟,大家是不是覺得非常有幫助。如果需要了解更多內(nèi)容,請(qǐng)繼續(xù)關(guān)注我們的行業(yè)資訊,相信你會(huì)喜歡上這些內(nèi)容的。


      當(dāng)前題目:通過使用filebeat收集mysql慢查詢?nèi)罩驹敿?xì)步驟
      瀏覽路徑:http://www.ef60e0e.cn/article/gojhjj.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        板桥市| 和龙市| 彰武县| 垣曲县| 临武县| 体育| 卫辉市| 新余市| 扶风县| 新昌县| 卓资县| 灌云县| 玛沁县| 韶山市| 舒兰市| 民丰县| 大埔县| 蒙自县| 廉江市| 蒙城县| 晋宁县| 龙井市| 靖西县| 赤壁市| 丽水市| 青龙| 赣榆县| 哈密市| 错那县| 墨竹工卡县| 太和县| 平潭县| 太康县| 自治县| 陇南市| 棋牌| 霍州市| 宁城县| 儋州市| 祁阳县| 黄陵县|