99偷拍视频精品区一区二,口述久久久久久久久久久久,国产精品夫妇激情啪发布,成人永久免费网站在线观看,国产精品高清免费在线,青青草在线观看视频观看,久久久久久国产一区,天天婷婷久久18禁,日韩动漫av在线播放直播

ELK+syslog+nginx訪問日志收集+分詞處理-創新互聯

一、nginx訪問日志配置:

創新互聯專注于企業成都全網營銷推廣、網站重做改版、當陽網站定制設計、自適應品牌網站建設、H5技術商城網站開發、集團公司官網建設、外貿營銷網站建設、高端網站制作、響應式網頁設計等建站業務,價格優惠性價比高,為當陽等各大城市提供網站開發制作服務。

1、日志格式配置:

log_format json '{"@timestamp":"$time_iso8601",'

          '"host":"$server_addr",'

          '"clientip":"$remote_addr",'

          '"size":$body_bytes_sent,'

          '"xff":"$http_x_forwarded_for",'

          '"upstreamhost":"$upstream_addr",'

          '"status":"$status",'

          '"responsetime":$request_time,'

          '"upstreamtime":"$upstream_response_time",'

          '"http_host":"$host",'

          '"url":"$uri"}';

2、訪問日志配置:

access_log  syslog:server=xx.xx.xx.xx:5140 json;

二、logstash配置

input {

   syslog{

      port => "5140"

     }

}

filter {

   json {

     source =>"message"

     remove_field => ["message"]

     }

}

output {

     elasticsearch { hosts => ['xx.xx.xx.xx:9200','xx.xx.xx.xx:9200']

             index => 'nginx_rfd-%{+YYYY.MM.dd.HH}'

             template => "/usr/local/logstash/nginx.json"

             template_name => "nginx_*"

             template_overwrite => true

            }

}

注意index名稱要包含到template_name里

三、自定義mappings

cat /usr/local/logstash/nginx.json

{

  "template": "nginx_*",

  "order":1,

  "settings": { "index.refresh_interval" : "60s" },

  "mappings": {

    "_default_": {

      "_all" : { "enabled" : false },

      "properties": {

        "@timestamp" : { "type" : "date" },

        "@version" : { "type" : "integer", "index" : "not_analyzed" },

        "url": {

          "type": "string",

          "index": "not_analyzed"

        },

        "host": {

          "type": "ip",

          "index": "not_analyzed"

        },

        "clientip": {

          "type": "ip",

          "index": "not_analyzed"

        },

        "size": {

          "type": "integer"

        },

        "xff": {

          "type": "string",

          "index": "not_analyzed"

        },

        "upstreamhost": {

          "type": "string",

          "index": "not_analyzed"

        },

        "http_host": {

          "type": "string",

          "index": "not_analyzed"

        },

        "status": {

          "type": "integer"

        },

        "responseTime": {

          "type": "string",

          "index": "not_analyzed"

        },

        "upstreamtime": {

          "type": "string",

          "index": "not_analyzed"

        }

      }

    }

  }

}

四、生成統計圖形

ELK+syslog+nginx訪問日志收集+分詞處理

五、參考文檔

https://elasticsearch.cn/article/154

http://blog.csdn.net/choelea/article/details/53320140

http://www.cnblogs.com/hanyifeng/p/5860731.html

另外有需要云服務器可以了解下創新互聯cdcxhl.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

網頁標題:ELK+syslog+nginx訪問日志收集+分詞處理-創新互聯
文章來源:http://www.yijiale78.com/article32/doccpc.html

成都網站建設公司_創新互聯,為您提供域名注冊網站制作企業網站制作手機網站建設小程序開發用戶體驗

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

營銷型網站建設